Reviewed by Eric.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2005 06:55:39 +0000 (06:55 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Oct 2005 06:55:39 +0000 (06:55 +0000)
        Crash: Drag element with CSS ::Before absolute positioning applied to it
        http://bugzilla.opendarwin.org/show_bug.cgi?id=4088

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMouseMoveEvent):

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

WebCore/ChangeLog-2005-12-19
WebCore/kwq/KWQKHTMLPart.mm

index 544f4278eba2bbca0d0ffb05e3aa8bf6628b057b..07befa7c61ad3008090fc41d4a4e80d83987cbd2 100644 (file)
@@ -1,3 +1,13 @@
+2005-10-11  Darin Adler  <darin@apple.com>
+
+        Reviewed by Eric.
+
+        Crash: Drag element with CSS ::Before absolute positioning applied to it
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=4088
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::khtmlMouseMoveEvent):
+
 2005-10-11  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Darin.
index 0939e84bd51bd1fed2a9ab020761f4ac835d74ec..4f6a4165a1cdd91a638c15c06695a38a54eb739f 100644 (file)
@@ -2324,16 +2324,17 @@ void KWQKHTMLPart::khtmlMouseMoveEvent(MouseMoveEvent *event)
             // try to find an element that wants to be dragged
             RenderObject::NodeInfo nodeInfo(true, false);
             renderer()->layer()->hitTest(nodeInfo, _mouseDownX, _mouseDownY);
-            _dragSrc.reset(nodeInfo.innerNode()->renderer()->draggableNode(_dragSrcMayBeDHTML, _dragSrcMayBeUA, _mouseDownX, _mouseDownY, _dragSrcIsDHTML));
-            if (_dragSrc.isNull()) {
+            NodeImpl *node = nodeInfo.innerNode();
+            _dragSrc = (node && node->renderer()) ? node->renderer()->draggableNode(_dragSrcMayBeDHTML, _dragSrcMayBeUA, _mouseDownX, _mouseDownY, _dragSrcIsDHTML) : 0;
+            if (!_dragSrc) {
                 _mouseDownMayStartDrag = false;     // no element is draggable
             } else {
                 // remember some facts about this source, while we have a NodeInfo handy
-                NodeImpl *node = nodeInfo.URLElement();
-                _dragSrcIsLink = node ? node->isLink() : false;
+                node = nodeInfo.URLElement();
+                _dragSrcIsLink = node && node->isLink();
 
                 node = nodeInfo.innerNonSharedNode();
-                _dragSrcIsImage = (node && node->renderer() && node->renderer()->isImage());
+                _dragSrcIsImage = node && node->renderer() && node->renderer()->isImage();
 
                 _dragSrcInSelection = isPointInsideSelection(_mouseDownX, _mouseDownY);
             }