Title: [101319] trunk/Source/WebCore
Revision
101319
Author
commit-qu...@webkit.org
Date
2011-11-28 19:39:36 -0800 (Mon, 28 Nov 2011)

Log Message

Upstream BlackBerry porting of page.
https://bugs.webkit.org/show_bug.cgi?id=73143

Patch by Jacky Jiang <zhaji...@rim.com> on 2011-11-28
Reviewed by Daniel Bates.

Upstream BlackBerry porting of WebCore/page.
Define DragImageRef for BlackBerry platform.

Initial upstream, can't be built yet, no test cases.

* page/blackberry/DragControllerBlackBerry.cpp: Added.
(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::maxDragImageSize):
(WebCore::DragController::cleanupAfterSystemDrag):
(WebCore::DragController::dragOperation):
* page/blackberry/EventHandlerBlackBerry.cpp: Added.
(WebCore::EventHandler::eventActivatedView):
(WebCore::EventHandler::passMouseMoveEventToSubframe):
(WebCore::EventHandler::passMousePressEventToSubframe):
(WebCore::EventHandler::passMouseReleaseEventToSubframe):
(WebCore::EventHandler::passWheelEventToWidget):
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::tabsToAllFormControls):
(WebCore::EventHandler::accessKeyModifiers):
(WebCore::EventHandler::focusDocumentView):
(WebCore::EventHandler::createDraggingClipboard):
* page/blackberry/FrameBlackBerry.cpp: Added.
(WebCore::Frame::dragImageForSelection):
* platform/DragImage.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101318 => 101319)


--- trunk/Source/WebCore/ChangeLog	2011-11-29 03:33:47 UTC (rev 101318)
+++ trunk/Source/WebCore/ChangeLog	2011-11-29 03:39:36 UTC (rev 101319)
@@ -1,3 +1,35 @@
+2011-11-28  Jacky Jiang  <zhaji...@rim.com>
+
+        Upstream BlackBerry porting of page.
+        https://bugs.webkit.org/show_bug.cgi?id=73143
+
+        Reviewed by Daniel Bates.
+
+        Upstream BlackBerry porting of WebCore/page.
+        Define DragImageRef for BlackBerry platform.
+
+        Initial upstream, can't be built yet, no test cases.
+
+        * page/blackberry/DragControllerBlackBerry.cpp: Added.
+        (WebCore::DragController::isCopyKeyDown):
+        (WebCore::DragController::maxDragImageSize):
+        (WebCore::DragController::cleanupAfterSystemDrag):
+        (WebCore::DragController::dragOperation):
+        * page/blackberry/EventHandlerBlackBerry.cpp: Added.
+        (WebCore::EventHandler::eventActivatedView):
+        (WebCore::EventHandler::passMouseMoveEventToSubframe):
+        (WebCore::EventHandler::passMousePressEventToSubframe):
+        (WebCore::EventHandler::passMouseReleaseEventToSubframe):
+        (WebCore::EventHandler::passWheelEventToWidget):
+        (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
+        (WebCore::EventHandler::tabsToAllFormControls):
+        (WebCore::EventHandler::accessKeyModifiers):
+        (WebCore::EventHandler::focusDocumentView):
+        (WebCore::EventHandler::createDraggingClipboard):
+        * page/blackberry/FrameBlackBerry.cpp: Added.
+        (WebCore::Frame::dragImageForSelection):
+        * platform/DragImage.h:
+
 2011-11-28  Shawn Singh  <shawnsi...@chromium.org>
 
         [chromium] Create CCDamageTracker class to determine regions of change for a surface.

Added: trunk/Source/WebCore/page/blackberry/DragControllerBlackBerry.cpp (0 => 101319)


--- trunk/Source/WebCore/page/blackberry/DragControllerBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/blackberry/DragControllerBlackBerry.cpp	2011-11-29 03:39:36 UTC (rev 101319)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ * Copyright (C) 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 "DragController.h"
+
+#if ENABLE(DRAG_SUPPORT)
+#include "DragData.h"
+#include "EventHandler.h"
+
+#include "NotImplemented.h"
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+const double EventHandler::TextDragDelay = 0;
+const int DragController::LinkDragBorderInset = 2;
+const int DragController::MaxOriginalImageArea = 1500 * 1500;
+const int DragController::DragIconRightInset = 7;
+const int DragController::DragIconBottomInset = 3;
+const float DragController::DragImageAlpha = 0.75f;
+
+bool DragController::isCopyKeyDown(DragData*)
+{
+    notImplemented();
+    return false;
+}
+
+const IntSize& DragController::maxDragImageSize()
+{
+    notImplemented();
+    // FIXME: Remove this when no stubs use it anymore.
+    DEFINE_STATIC_LOCAL(const WebCore::IntSize, nullSize, ());
+    return nullSize;
+}
+
+void DragController::cleanupAfterSystemDrag()
+{
+    notImplemented();
+}
+
+DragOperation DragController::dragOperation(DragData*)
+{
+    notImplemented();
+    return DragOperationNone;
+}
+} // namespace WebCore
+#endif // ENABLE(DRAG_SUPPORT)

Added: trunk/Source/WebCore/page/blackberry/EventHandlerBlackBerry.cpp (0 => 101319)


--- trunk/Source/WebCore/page/blackberry/EventHandlerBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/blackberry/EventHandlerBlackBerry.cpp	2011-11-29 03:39:36 UTC (rev 101319)
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ * Copyright (C) 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 "EventHandler.h"
+
+#include "ClipboardBlackBerry.h"
+#include "FocusController.h"
+#include "Frame.h"
+#include "KeyboardEvent.h"
+#include "MouseEventWithHitTestResults.h"
+#include "NotImplemented.h"
+#include "Page.h"
+#include "PlatformKeyboardEvent.h"
+#include "PlatformWheelEvent.h"
+#include "Widget.h"
+
+namespace WebCore {
+
+bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
+{
+    notImplemented();
+    return false;
+}
+
+bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
+{
+    subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
+    return true;
+}
+
+bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
+{
+    subframe->eventHandler()->handleMousePressEvent(mev.event());
+    return true;
+}
+
+bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
+{
+    subframe->eventHandler()->handleMouseReleaseEvent(mev.event());
+    return true;
+}
+
+bool EventHandler::passWheelEventToWidget(PlatformWheelEvent&, Widget*)
+{
+    notImplemented();
+    return false;
+}
+
+bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&)
+{
+    notImplemented();
+    return false;
+}
+
+bool EventHandler::tabsToAllFormControls(KeyboardEvent*) const
+{
+    return true;
+}
+
+unsigned EventHandler::accessKeyModifiers()
+{
+    return PlatformKeyboardEvent::AltKey;
+}
+
+void EventHandler::focusDocumentView()
+{
+    Page* page = m_frame->page();
+    if (!page)
+        return;
+    page->focusController()->setFocusedFrame(m_frame);
+}
+
+#if ENABLE(DRAG_SUPPORT)
+WTF::PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
+{
+    return ClipboardBlackBerry::create(ClipboardWritable);
+}
+#endif
+
+} // namespace WebCore

Added: trunk/Source/WebCore/page/blackberry/FrameBlackBerry.cpp (0 => 101319)


--- trunk/Source/WebCore/page/blackberry/FrameBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/blackberry/FrameBlackBerry.cpp	2011-11-29 03:39:36 UTC (rev 101319)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ * Copyright (C) 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 "Frame.h"
+
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+DragImageRef Frame::dragImageForSelection()
+{
+    notImplemented();
+    return 0;
+}
+
+} // namespace WebCore

Modified: trunk/Source/WebCore/platform/DragImage.h (101318 => 101319)


--- trunk/Source/WebCore/platform/DragImage.h	2011-11-29 03:33:47 UTC (rev 101318)
+++ trunk/Source/WebCore/platform/DragImage.h	2011-11-29 03:39:36 UTC (rev 101319)
@@ -72,7 +72,7 @@
     typedef wxDragImage* DragImageRef;
 #elif PLATFORM(GTK)
     typedef cairo_surface_t* DragImageRef;
-#elif PLATFORM(EFL)
+#elif PLATFORM(EFL) || PLATFORM(BLACKBERRY)
     typedef void* DragImageRef;
 #endif
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to