Upstream 5 files into WebCore/platform/blackberry
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 18:24:35 +0000 (18:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 18:24:35 +0000 (18:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73632

Patch by Mary Wu <mary.wu@torchmobile.com.cn> on 2011-12-07
Reviewed by Rob Buis.

Initial upstream, no new tests.

* PlatformBlackBerry.cmake: Remove two empty files from build list.
* platform/blackberry/PopupMenuBlackBerry.cpp: Added.
(WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry):
(WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry):
(WebCore::PopupMenuBlackBerry::show):
(WebCore::PopupMenuBlackBerry::hide):
(WebCore::PopupMenuBlackBerry::updateFromElement):
(WebCore::PopupMenuBlackBerry::disconnectClient):
* platform/blackberry/PopupMenuBlackBerry.h: Added.
(WebCore::PopupMenuBlackBerry::client):
* platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added.
(WebCore::ScrollbarTheme::nativeTheme):
* platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added.
(WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry):
(WebCore::SearchPopupMenuBlackBerry::popupMenu):
(WebCore::SearchPopupMenuBlackBerry::enabled):
(WebCore::SearchPopupMenuBlackBerry::saveRecentSearches):
(WebCore::SearchPopupMenuBlackBerry::loadRecentSearches):
* platform/blackberry/SearchPopupMenuBlackBerry.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebCore/platform/blackberry/PopupMenuBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/blackberry/PopupMenuBlackBerry.h [new file with mode: 0644]
Source/WebCore/platform/blackberry/ScrollbarThemeBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.h [new file with mode: 0644]

index 5dae87d..eae46e7 100644 (file)
@@ -1,3 +1,32 @@
+2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
+
+        Upstream 5 files into WebCore/platform/blackberry
+        https://bugs.webkit.org/show_bug.cgi?id=73632
+
+        Reviewed by Rob Buis.
+
+        Initial upstream, no new tests.
+
+        * PlatformBlackBerry.cmake: Remove two empty files from build list.
+        * platform/blackberry/PopupMenuBlackBerry.cpp: Added.
+        (WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry):
+        (WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry):
+        (WebCore::PopupMenuBlackBerry::show):
+        (WebCore::PopupMenuBlackBerry::hide):
+        (WebCore::PopupMenuBlackBerry::updateFromElement):
+        (WebCore::PopupMenuBlackBerry::disconnectClient):
+        * platform/blackberry/PopupMenuBlackBerry.h: Added.
+        (WebCore::PopupMenuBlackBerry::client):
+        * platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added.
+        (WebCore::ScrollbarTheme::nativeTheme):
+        * platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added.
+        (WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry):
+        (WebCore::SearchPopupMenuBlackBerry::popupMenu):
+        (WebCore::SearchPopupMenuBlackBerry::enabled):
+        (WebCore::SearchPopupMenuBlackBerry::saveRecentSearches):
+        (WebCore::SearchPopupMenuBlackBerry::loadRecentSearches):
+        * platform/blackberry/SearchPopupMenuBlackBerry.h: Added.
+
 2011-12-07  Dan Bernstein  <mitz@apple.com>
 
         Fixed the definition of BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING from r102246.
index dcdc582..ee19c26 100644 (file)
@@ -154,8 +154,6 @@ LIST(APPEND WebCore_SOURCES
     platform/blackberry/PopupMenuBlackBerry.cpp
     platform/blackberry/RenderThemeBlackBerry.cpp
     platform/blackberry/SSLKeyGeneratorBlackBerry.cpp
-    platform/blackberry/ScrollViewBlackBerry.cpp
-    platform/blackberry/ScrollbarBlackBerry.cpp
     platform/blackberry/ScrollbarThemeBlackBerry.cpp
     platform/blackberry/SearchPopupMenuBlackBerry.cpp
     platform/blackberry/SharedTimerBlackBerry.cpp
diff --git a/Source/WebCore/platform/blackberry/PopupMenuBlackBerry.cpp b/Source/WebCore/platform/blackberry/PopupMenuBlackBerry.cpp
new file mode 100644 (file)
index 0000000..d56fb62
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "PopupMenuBlackBerry.h"
+
+#include "PopupMenuClient.h"
+
+namespace WebCore {
+
+PopupMenuBlackBerry::PopupMenuBlackBerry(PopupMenuClient* client)
+    : m_popupClient(client)
+{
+}
+
+PopupMenuBlackBerry::~PopupMenuBlackBerry()
+{
+}
+
+void PopupMenuBlackBerry::show(const IntRect&, FrameView*, int)
+{
+}
+
+void PopupMenuBlackBerry::hide()
+{
+    m_popupClient->popupDidHide();
+}
+
+void PopupMenuBlackBerry::updateFromElement()
+{
+}
+
+void PopupMenuBlackBerry::disconnectClient()
+{
+    m_popupClient = 0;
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/blackberry/PopupMenuBlackBerry.h b/Source/WebCore/platform/blackberry/PopupMenuBlackBerry.h
new file mode 100644 (file)
index 0000000..c84edcd
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef PopupMenuBlackBerry_h
+#define PopupMenuBlackBerry_h
+
+#include "PopupMenu.h"
+
+namespace WebCore {
+
+class PopupMenuClient;
+
+class PopupMenuBlackBerry : public PopupMenu {
+public:
+    PopupMenuBlackBerry(PopupMenuClient*);
+    ~PopupMenuBlackBerry();
+
+    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;
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/platform/blackberry/ScrollbarThemeBlackBerry.cpp b/Source/WebCore/platform/blackberry/ScrollbarThemeBlackBerry.cpp
new file mode 100644 (file)
index 0000000..23ea439
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "ScrollbarTheme.h"
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+ScrollbarTheme* ScrollbarTheme::nativeTheme()
+{
+    notImplemented();
+    DEFINE_STATIC_LOCAL(ScrollbarTheme, theme, ());
+    return &theme;
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.cpp b/Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.cpp
new file mode 100644 (file)
index 0000000..4719167
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2009, 2010 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "SearchPopupMenuBlackBerry.h"
+
+#include "NotImplemented.h"
+
+#include <wtf/text/AtomicString.h>
+
+namespace WebCore {
+
+SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry(PopupMenuClient* client)
+    : m_popup(adoptRef(new PopupMenuBlackBerry(client)))
+{
+    notImplemented();
+}
+
+PopupMenu* SearchPopupMenuBlackBerry::popupMenu()
+{
+    return m_popup.get();
+}
+
+bool SearchPopupMenuBlackBerry::enabled()
+{
+    notImplemented();
+    return false;
+}
+
+void SearchPopupMenuBlackBerry::saveRecentSearches(AtomicString const&, const Vector<String>&)
+{
+    notImplemented();
+}
+
+void SearchPopupMenuBlackBerry::loadRecentSearches(AtomicString const&, Vector<String>&)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.h b/Source/WebCore/platform/blackberry/SearchPopupMenuBlackBerry.h
new file mode 100644 (file)
index 0000000..cced0a8
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009, 2010 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef SearchPopupMenuBlackBerry_h
+#define SearchPopupMenuBlackBerry_h
+
+#include "PopupMenuBlackBerry.h"
+#include "SearchPopupMenu.h"
+
+namespace WebCore {
+
+class SearchPopupMenuBlackBerry : public SearchPopupMenu {
+public:
+    SearchPopupMenuBlackBerry(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<PopupMenuBlackBerry> m_popup;
+};
+
+}
+
+#endif // SearchPopupMenuBlackBerry_h