summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/efl
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-04 11:41:34 +0100
committerSteve Block <steveblock@google.com>2010-08-09 12:04:44 +0100
commitdb14019a23d96bc8a444b6576a5da8bd1cfbc8b0 (patch)
tree9f793c5b0f5e1f2aca8247158920e2c4bf962bbf /WebCore/platform/efl
parentbf916837aa84f1e4b00e6ed6268516c2acd27545 (diff)
downloadexternal_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.zip
external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.gz
external_webkit-db14019a23d96bc8a444b6576a5da8bd1cfbc8b0.tar.bz2
Merge WebKit at r64523 : Initial merge by git.
Change-Id: Ibb796c6802e757b1d9b40f58205cfbe4da95fcd4
Diffstat (limited to 'WebCore/platform/efl')
-rw-r--r--WebCore/platform/efl/PopupMenuEfl.cpp18
-rw-r--r--WebCore/platform/efl/PopupMenuEfl.h53
-rw-r--r--WebCore/platform/efl/SearchPopupMenuEfl.cpp18
-rw-r--r--WebCore/platform/efl/SearchPopupMenuEfl.h44
4 files changed, 119 insertions, 14 deletions
diff --git a/WebCore/platform/efl/PopupMenuEfl.cpp b/WebCore/platform/efl/PopupMenuEfl.cpp
index 9dc6986..401f24f 100644
--- a/WebCore/platform/efl/PopupMenuEfl.cpp
+++ b/WebCore/platform/efl/PopupMenuEfl.cpp
@@ -3,6 +3,7 @@
* Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
* Copyright (C) 2009-2010 ProFUSION embedded systems
* Copyright (C) 2009-2010 Samsung Electronics
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,29 +23,30 @@
*/
#include "config.h"
-#include "PopupMenu.h"
+#include "PopupMenuEfl.h"
#include "Chrome.h"
#include "ChromeClientEfl.h"
#include "FrameView.h"
#include "NotImplemented.h"
+#include "PopupMenuClient.h"
namespace WebCore {
-PopupMenu::PopupMenu(PopupMenuClient* client)
+PopupMenuEfl::PopupMenuEfl(PopupMenuClient* client)
: m_popupClient(client)
, m_view(0)
{
}
-PopupMenu::~PopupMenu()
+PopupMenuEfl::~PopupMenuEfl()
{
// Tell client to destroy data related to this popup since this object is
// going away.
hide();
}
-void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
+void PopupMenuEfl::show(const IntRect& rect, FrameView* view, int index)
{
ASSERT(m_popupClient);
ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(view->frame()->page()->chrome()->client());
@@ -54,7 +56,7 @@ void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
chromeClient->createSelectPopup(m_popupClient, index, rect);
}
-void PopupMenu::hide()
+void PopupMenuEfl::hide()
{
ASSERT(m_view);
ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(m_view->frame()->page()->chrome()->client());
@@ -63,14 +65,14 @@ void PopupMenu::hide()
chromeClient->destroySelectPopup();
}
-void PopupMenu::updateFromElement()
+void PopupMenuEfl::updateFromElement()
{
client()->setTextFromItem(client()->selectedIndex());
}
-bool PopupMenu::itemWritingDirectionIsNatural()
+void PopupMenuEfl::disconnectClient()
{
- return true;
+ m_popupClient = 0;
}
}
diff --git a/WebCore/platform/efl/PopupMenuEfl.h b/WebCore/platform/efl/PopupMenuEfl.h
new file mode 100644
index 0000000..4a2dbfc
--- /dev/null
+++ b/WebCore/platform/efl/PopupMenuEfl.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef PopupMenuEfl_h
+#define PopupMenuEfl_h
+
+#include "IntRect.h"
+#include "PopupMenu.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class FrameView;
+class Scrollbar;
+class PopupMenuClient;
+
+class PopupMenuEfl : public PopupMenu {
+public:
+ PopupMenuEfl(PopupMenuClient*);
+ ~PopupMenuEfl();
+
+ virtual void show(const IntRect&, FrameView*, int index);
+ virtual void hide();
+ virtual void updateFromElement();
+ virtual void disconnectClient();
+
+private:
+ PopupMenuClient* client() const { return m_popupClient; }
+
+ PopupMenuClient* m_popupClient;
+ FrameView* m_view;
+};
+
+}
+
+#endif // PopupMenuEfl_h
diff --git a/WebCore/platform/efl/SearchPopupMenuEfl.cpp b/WebCore/platform/efl/SearchPopupMenuEfl.cpp
index d18174f..20ecb09 100644
--- a/WebCore/platform/efl/SearchPopupMenuEfl.cpp
+++ b/WebCore/platform/efl/SearchPopupMenuEfl.cpp
@@ -2,6 +2,7 @@
* Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
* Copyright (C) 2009-2010 ProFUSION embedded systems
* Copyright (C) 2009-2010 Samsung Electronics
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,29 +20,34 @@
*/
#include "config.h"
-#include "SearchPopupMenu.h"
+#include "SearchPopupMenuEfl.h"
#include "NotImplemented.h"
namespace WebCore {
-SearchPopupMenu::SearchPopupMenu(PopupMenuClient* client)
- : PopupMenu(client)
+SearchPopupMenuEfl::SearchPopupMenuEfl(PopupMenuClient* client)
+ : m_popup(adoptRef(new PopupMenuEfl(client)))
{
notImplemented();
}
-void SearchPopupMenu::saveRecentSearches(const AtomicString&, const Vector<String>&)
+PopupMenu* SearchPopupMenuEfl::popupMenu()
+{
+ return m_popup.get();
+}
+
+void SearchPopupMenuEfl::saveRecentSearches(const AtomicString&, const Vector<String>&)
{
notImplemented();
}
-void SearchPopupMenu::loadRecentSearches(const AtomicString&, Vector<String>&)
+void SearchPopupMenuEfl::loadRecentSearches(const AtomicString&, Vector<String>&)
{
notImplemented();
}
-bool SearchPopupMenu::enabled()
+bool SearchPopupMenuEfl::enabled()
{
notImplemented();
return true;
diff --git a/WebCore/platform/efl/SearchPopupMenuEfl.h b/WebCore/platform/efl/SearchPopupMenuEfl.h
new file mode 100644
index 0000000..4ffb62e
--- /dev/null
+++ b/WebCore/platform/efl/SearchPopupMenuEfl.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef SearchPopupMenuEfl_h
+#define SearchPopupMenuEfl_h
+
+#include "PopupMenuEfl.h"
+#include "SearchPopupMenu.h"
+
+namespace WebCore {
+
+class SearchPopupMenuEfl : public SearchPopupMenu {
+public:
+ SearchPopupMenuEfl(PopupMenuClient*);
+
+ virtual PopupMenu* popupMenu();
+ virtual void saveRecentSearches(const AtomicString& name, const Vector<String>& searchItems);
+ virtual void loadRecentSearches(const AtomicString& name, Vector<String>& searchItems);
+ virtual bool enabled();
+
+private:
+ RefPtr<PopupMenuEfl> m_popup;
+};
+
+}
+
+#endif // SearchPopupMenuEfl_h