Title: [101936] trunk/Source/WebCore
Revision
101936
Author
[email protected]
Date
2011-12-03 15:11:14 -0800 (Sat, 03 Dec 2011)

Log Message

Upstream 4 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73614

Patch by Mary Wu <[email protected]> on 2011-12-03
Reviewed by Eric Seidel.

* platform/blackberry/CursorBlackBerry.cpp: Added.
(WebCore::AllCursors::AllCursors):
(WebCore::getCursor):
(WebCore::Cursor::Cursor):
(WebCore::Cursor::~Cursor):
(WebCore::Cursor::operator=):
(WebCore::aliasCursor):
(WebCore::cellCursor):
(WebCore::columnResizeCursor):
(WebCore::contextMenuCursor):
(WebCore::copyCursor):
(WebCore::crossCursor):
(WebCore::eastResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::grabbingCursor):
(WebCore::grabCursor):
(WebCore::handCursor):
(WebCore::helpCursor):
(WebCore::iBeamCursor):
(WebCore::moveCursor):
(WebCore::noDropCursor):
(WebCore::noneCursor):
(WebCore::northEastResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::notAllowedCursor):
(WebCore::pointerCursor):
(WebCore::progressCursor):
(WebCore::rowResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::verticalTextCursor):
(WebCore::waitCursor):
(WebCore::westResizeCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
* platform/blackberry/DragDataBlackBerry.cpp: Added.
(WebCore::DragData::canSmartReplace):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::containsFiles):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::containsURL):
(WebCore::DragData::asFilenames):
(WebCore::DragData::asColor):
(WebCore::DragData::asPlainText):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):
* platform/blackberry/DragImageBlackBerry.cpp: Added.
(WebCore::createDragImageFromImage):
(WebCore::createDragImageIconForCachedImage):
(WebCore::deleteDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::scaleDragImage):
(WebCore::dragImageSize):
* platform/blackberry/EventLoopBlackBerry.cpp: Added.
(WebCore::EventLoop::platformInit):
(WebCore::EventLoop::cycle):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101935 => 101936)


--- trunk/Source/WebCore/ChangeLog	2011-12-03 21:53:29 UTC (rev 101935)
+++ trunk/Source/WebCore/ChangeLog	2011-12-03 23:11:14 UTC (rev 101936)
@@ -1,3 +1,82 @@
+2011-12-03  Mary Wu  <[email protected]>
+
+        Upstream 4 files into WebCore/platform/blackberry
+        https://bugs.webkit.org/show_bug.cgi?id=73614
+
+        Reviewed by Eric Seidel.
+
+        * platform/blackberry/CursorBlackBerry.cpp: Added.
+        (WebCore::AllCursors::AllCursors):
+        (WebCore::getCursor):
+        (WebCore::Cursor::Cursor):
+        (WebCore::Cursor::~Cursor):
+        (WebCore::Cursor::operator=):
+        (WebCore::aliasCursor):
+        (WebCore::cellCursor):
+        (WebCore::columnResizeCursor):
+        (WebCore::contextMenuCursor):
+        (WebCore::copyCursor):
+        (WebCore::crossCursor):
+        (WebCore::eastResizeCursor):
+        (WebCore::eastWestResizeCursor):
+        (WebCore::grabbingCursor):
+        (WebCore::grabCursor):
+        (WebCore::handCursor):
+        (WebCore::helpCursor):
+        (WebCore::iBeamCursor):
+        (WebCore::moveCursor):
+        (WebCore::noDropCursor):
+        (WebCore::noneCursor):
+        (WebCore::northEastResizeCursor):
+        (WebCore::northEastSouthWestResizeCursor):
+        (WebCore::northResizeCursor):
+        (WebCore::northSouthResizeCursor):
+        (WebCore::northWestResizeCursor):
+        (WebCore::northWestSouthEastResizeCursor):
+        (WebCore::notAllowedCursor):
+        (WebCore::pointerCursor):
+        (WebCore::progressCursor):
+        (WebCore::rowResizeCursor):
+        (WebCore::southEastResizeCursor):
+        (WebCore::southResizeCursor):
+        (WebCore::southWestResizeCursor):
+        (WebCore::verticalTextCursor):
+        (WebCore::waitCursor):
+        (WebCore::westResizeCursor):
+        (WebCore::zoomInCursor):
+        (WebCore::zoomOutCursor):
+        (WebCore::middlePanningCursor):
+        (WebCore::eastPanningCursor):
+        (WebCore::northPanningCursor):
+        (WebCore::northEastPanningCursor):
+        (WebCore::northWestPanningCursor):
+        (WebCore::southPanningCursor):
+        (WebCore::southEastPanningCursor):
+        (WebCore::southWestPanningCursor):
+        (WebCore::westPanningCursor):
+        * platform/blackberry/DragDataBlackBerry.cpp: Added.
+        (WebCore::DragData::canSmartReplace):
+        (WebCore::DragData::containsColor):
+        (WebCore::DragData::containsCompatibleContent):
+        (WebCore::DragData::containsFiles):
+        (WebCore::DragData::containsPlainText):
+        (WebCore::DragData::containsURL):
+        (WebCore::DragData::asFilenames):
+        (WebCore::DragData::asColor):
+        (WebCore::DragData::asPlainText):
+        (WebCore::DragData::asURL):
+        (WebCore::DragData::asFragment):
+        * platform/blackberry/DragImageBlackBerry.cpp: Added.
+        (WebCore::createDragImageFromImage):
+        (WebCore::createDragImageIconForCachedImage):
+        (WebCore::deleteDragImage):
+        (WebCore::dissolveDragImageToFraction):
+        (WebCore::scaleDragImage):
+        (WebCore::dragImageSize):
+        * platform/blackberry/EventLoopBlackBerry.cpp: Added.
+        (WebCore::EventLoop::platformInit):
+        (WebCore::EventLoop::cycle):
+
 2011-12-03  Andreas Kling  <[email protected]>
 
         Cache CSSInitialValue instances per-document.

Added: trunk/Source/WebCore/platform/blackberry/CursorBlackBerry.cpp (0 => 101936)


--- trunk/Source/WebCore/platform/blackberry/CursorBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/CursorBlackBerry.cpp	2011-12-03 23:11:14 UTC (rev 101936)
@@ -0,0 +1,285 @@
+/*
+ * Copyright (C) 2009, 2010, 2011 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 "Cursor.h"
+
+#include "Image.h"
+
+#include <string>
+
+typedef BlackBerry::Platform::CursorType CursorType;
+
+namespace WebCore {
+
+struct AllCursors {
+    AllCursors()
+    {
+        for (int i = 0; i < BlackBerry::Platform::NumCursorTypes; ++i)
+            m_cursors[i] = Cursor(BlackBerry::Platform::BlackBerryCursor((CursorType)i));
+    }
+    Cursor m_cursors[BlackBerry::Platform::NumCursorTypes];
+};
+
+static const Cursor& getCursor(CursorType type)
+{
+    static AllCursors allCursors;
+    return allCursors.m_cursors[type];
+}
+
+Cursor::Cursor(const Cursor& other)
+    : m_platformCursor(other.m_platformCursor)
+{
+}
+
+Cursor::Cursor(Image* image, const IntPoint& hotspot)
+: m_platformCursor(BlackBerry::Platform::CursorCustomized, std::string(), hotspot)
+{
+}
+
+Cursor::~Cursor()
+{
+}
+
+Cursor& Cursor::operator=(const Cursor& other)
+{
+    m_platformCursor = other.m_platformCursor;
+    return *this;
+}
+
+Cursor::Cursor(PlatformCursor c)
+: m_platformCursor(c)
+{
+}
+
+const Cursor& aliasCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorAlias);
+}
+
+const Cursor& cellCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorCell);
+}
+
+const Cursor& columnResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorColumnResize);
+}
+
+const Cursor& contextMenuCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorContextMenu);
+}
+
+const Cursor& copyCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorCopy);
+}
+
+const Cursor& crossCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorCross);
+}
+
+const Cursor& eastResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorEastResize);
+}
+
+const Cursor& eastWestResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorEastWestResize);
+}
+
+const Cursor& grabbingCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorHand);
+}
+
+const Cursor& grabCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorHand);
+}
+
+const Cursor& handCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorHand);
+}
+
+const Cursor& helpCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorHelp);
+}
+
+const Cursor& iBeamCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorBeam);
+}
+
+const Cursor& moveCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorMove);
+}
+
+const Cursor& noDropCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNoDrop);
+}
+
+const Cursor& noneCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNone);
+}
+
+const Cursor& northEastResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthEastResize);
+}
+
+const Cursor& northEastSouthWestResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthEastSouthWestResize);
+}
+
+const Cursor& northResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthResize);
+}
+
+const Cursor& northSouthResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthSouthResize);
+}
+
+const Cursor& northWestResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthWestResize);
+}
+
+const Cursor& northWestSouthEastResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNorthWestSouthEastResize);
+}
+
+const Cursor& notAllowedCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorNotAllowed);
+}
+
+const Cursor& pointerCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorPointer);
+}
+
+const Cursor& progressCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorProgress);
+}
+
+const Cursor& rowResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorRowResize);
+}
+
+const Cursor& southEastResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorSouthEastResize);
+}
+
+const Cursor& southResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorSouthResize);
+}
+
+const Cursor& southWestResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorSouthWestResize);
+}
+
+const Cursor& verticalTextCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorVerticalText);
+}
+
+const Cursor& waitCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorWait);
+}
+
+const Cursor& westResizeCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorWestResize);
+}
+
+const Cursor& zoomInCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorZoomIn);
+}
+
+const Cursor& zoomOutCursor()
+{
+    return getCursor(BlackBerry::Platform::CursorZoomOut);
+}
+
+const Cursor& middlePanningCursor()
+{
+    return moveCursor();
+}
+
+const Cursor& eastPanningCursor()
+{
+    return eastResizeCursor();
+}
+
+const Cursor& northPanningCursor()
+{
+    return northResizeCursor();
+}
+
+const Cursor& northEastPanningCursor()
+{
+    return northEastResizeCursor();
+}
+
+const Cursor& northWestPanningCursor()
+{
+    return northWestResizeCursor();
+}
+
+const Cursor& southPanningCursor()
+{
+    return southResizeCursor();
+}
+
+const Cursor& southEastPanningCursor()
+{
+    return southEastResizeCursor();
+}
+
+const Cursor& southWestPanningCursor()
+{
+    return southWestResizeCursor();
+}
+
+const Cursor& westPanningCursor()
+{
+    return westResizeCursor();
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/platform/blackberry/DragDataBlackBerry.cpp (0 => 101936)


--- trunk/Source/WebCore/platform/blackberry/DragDataBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/DragDataBlackBerry.cpp	2011-12-03 23:11:14 UTC (rev 101936)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009, 2010, 2011 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 "DragData.h"
+
+#include "Color.h"
+#include "DocumentFragment.h"
+#include "NotImplemented.h"
+#include "PlatformString.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+bool DragData::canSmartReplace() const
+{
+    notImplemented();
+    return false;
+}
+
+bool DragData::containsColor() const
+{
+    notImplemented();
+    return false;
+}
+
+bool DragData::containsCompatibleContent() const
+{
+    notImplemented();
+    return false;
+}
+
+bool DragData::containsFiles() const
+{
+    notImplemented();
+    return false;
+}
+
+bool DragData::containsPlainText() const
+{
+    notImplemented();
+    return false;
+}
+
+bool DragData::containsURL(Frame*, FilenameConversionPolicy filenamePolicy) const
+{
+    notImplemented();
+    return false;
+}
+
+void DragData::asFilenames(WTF::Vector<String, 0u>& result) const
+{
+    // FIXME: remove explicit 0 size in result template once this is implemented
+    notImplemented();
+}
+
+Color DragData::asColor() const
+{
+    notImplemented();
+    return Color();
+}
+
+String DragData::asPlainText(Frame*) const
+{
+    notImplemented();
+    return String();
+}
+
+String DragData::asURL(Frame*, FilenameConversionPolicy filenamePolicy, String* title) const
+{
+    notImplemented();
+    return String();
+}
+
+WTF::PassRefPtr<DocumentFragment> DragData::asFragment(Frame*, PassRefPtr<Range> context,
+                                            bool allowPlainText, bool& chosePlainText) const
+{
+    notImplemented();
+    return 0;
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/platform/blackberry/DragImageBlackBerry.cpp (0 => 101936)


--- trunk/Source/WebCore/platform/blackberry/DragImageBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/DragImageBlackBerry.cpp	2011-12-03 23:11:14 UTC (rev 101936)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009, 2010, 2011 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 "DragImage.h"
+
+#include "CachedImage.h"
+#include "FloatSize.h"
+#include "Image.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+void* createDragImageFromImage(Image*)
+{
+    notImplemented();
+    return 0;
+}
+
+void* createDragImageIconForCachedImage(CachedImage*)
+{
+    notImplemented();
+    return 0;
+}
+
+void deleteDragImage(void*)
+{
+    notImplemented();
+}
+
+void* dissolveDragImageToFraction(void*, float)
+{
+    notImplemented();
+    return 0;
+}
+
+void* scaleDragImage(void*, FloatSize)
+{
+    notImplemented();
+    return 0;
+}
+
+IntSize dragImageSize(void*)
+{
+    notImplemented();
+    return IntSize();
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/platform/blackberry/EventLoopBlackBerry.cpp (0 => 101936)


--- trunk/Source/WebCore/platform/blackberry/EventLoopBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/blackberry/EventLoopBlackBerry.cpp	2011-12-03 23:11:14 UTC (rev 101936)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009, 2010, 2011 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 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.
+ */
+
+#include "config.h"
+#include "EventLoop.h"
+
+#include <BlackBerryPlatformMessageClient.h>
+
+namespace WebCore {
+
+void EventLoop::platformInit()
+{
+}
+
+void EventLoop::cycle()
+{
+    ASSERT(BlackBerry::Platform::webKitThreadMessageClient());
+    BlackBerry::Platform::webKitThreadMessageClient()->processNextMessage();
+}
+
+} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to