Title: [173664] trunk/Source/WebCore
Revision
173664
Author
[email protected]
Date
2014-09-16 11:09:21 -0700 (Tue, 16 Sep 2014)

Log Message

Videos with controls enabled never receive 'dragstart' events.
https://bugs.webkit.org/show_bug.cgi?id=136837

Reviewed by Eric Carlson.

Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.

* page/DragController.cpp:
(WebCore::DragController::startDrag):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173663 => 173664)


--- trunk/Source/WebCore/ChangeLog	2014-09-16 18:08:13 UTC (rev 173663)
+++ trunk/Source/WebCore/ChangeLog	2014-09-16 18:09:21 UTC (rev 173664)
@@ -1,3 +1,16 @@
+2014-09-16  Jer Noble  <[email protected]>
+
+        Videos with controls enabled never receive 'dragstart' events.
+        https://bugs.webkit.org/show_bug.cgi?id=136837
+
+        Reviewed by Eric Carlson.
+
+        Fixes a crash regression introduced by r173631. Node::contains() has an interesting property of returning false
+        if `this` is NULL. Rather than depending on this behavior, explicitly NULL-check state.source and bail early.
+
+        * page/DragController.cpp:
+        (WebCore::DragController::startDrag):
+
 2014-09-16  Csaba Osztrogonác  <[email protected]>
 
         URTBF after r173659.

Modified: trunk/Source/WebCore/page/DragController.cpp (173663 => 173664)


--- trunk/Source/WebCore/page/DragController.cpp	2014-09-16 18:08:13 UTC (rev 173663)
+++ trunk/Source/WebCore/page/DragController.cpp	2014-09-16 18:09:21 UTC (rev 173664)
@@ -717,7 +717,7 @@
 
 bool DragController::startDrag(Frame& src, const DragState& state, DragOperation srcOp, const PlatformMouseEvent& dragEvent, const IntPoint& dragOrigin)
 {
-    if (!src.view() || !src.contentRenderer())
+    if (!src.view() || !src.contentRenderer() || !state.source)
         return false;
 
     HitTestResult hitTestResult = src.eventHandler().hitTestResultAtPoint(dragOrigin, HitTestRequest::ReadOnly | HitTestRequest::Active);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to