[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

dglazkov at chromium.org dglazkov at chromium.org
Wed Dec 22 13:30:20 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit dc3d24f6d1b63737716319379b314f4c2e73a83d
Author: dglazkov at chromium.org <dglazkov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 17 16:13:52 2010 +0000

    2010-09-17  Dimitri Glazkov  <dglazkov at chromium.org>
    
            Reviewed by David Hyatt.
    
            Remove extraneous RenderObject traversal.
            https://bugs.webkit.org/show_bug.cgi?id=45821
    
            This code always exits in the first iteration of the loop,
            because in the context of this call, node->renderer()->node() != 0
            is always true.
    
            No behavior change, covered by existing tests.
    
            * page/EventHandler.cpp:
            (WebCore::EventHandler::canMouseDownStartSelect): Removed the loop.
            (WebCore::EventHandler::canMouseDragExtendSelect): Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9ce8b16..1c84629 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-17  Dimitri Glazkov  <dglazkov at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Remove extraneous RenderObject traversal.
+        https://bugs.webkit.org/show_bug.cgi?id=45821
+
+        This code always exits in the first iteration of the loop,
+        because in the context of this call, node->renderer()->node() != 0
+        is always true.
+
+        No behavior change, covered by existing tests.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::canMouseDownStartSelect): Removed the loop.
+        (WebCore::EventHandler::canMouseDragExtendSelect): Ditto.
+
 2010-09-17  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index c0a87a3..e70df0b 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2149,12 +2149,7 @@ bool EventHandler::canMouseDownStartSelect(Node* node)
     if (!node->canStartSelection())
         return false;
             
-    for (RenderObject* curr = node->renderer(); curr; curr = curr->parent()) {
-        if (Node* node = curr->node())
-            return node->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
-    }
-
-    return true;
+    return node->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
 }
 
 #if ENABLE(DRAG_SUPPORT)
@@ -2163,12 +2158,7 @@ bool EventHandler::canMouseDragExtendSelect(Node* node)
     if (!node || !node->renderer())
         return true;
             
-    for (RenderObject* curr = node->renderer(); curr; curr = curr->parent()) {
-        if (Node* node = curr->node())
-            return node->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
-    }
-
-    return true;
+    return node->dispatchEvent(Event::create(eventNames().selectstartEvent, true, true));
 }
 #endif // ENABLE(DRAG_SUPPORT)
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list