[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:50 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7bfa5fccb4dd765893ee93bd5b901f279f81591f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 6 21:57:56 2003 +0000

            Reviewed by NOBODY (OOPS!).
    
            - fixed 3165295 -- Hang while triple clicking on page
    
            Flaws in the continuation logic we added to checkSelectionPoint made it take
            exponential time on pages with a lot of continuations.
    
            * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
            added virtual checkSelectionPointIgnoringContinuations.
            * khtml/rendering/render_object.cpp:
            (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
            the render object walking process, which we only want to do at the top level,
            since otherwise we will see the same nodes multiple times. Also optimizes by only
            looking at the inline continuations of inlines, not any continuations of a block.
            (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
            function that is overriden by RenderText. It is identical to the old version of
            checkSelectionPoint, minus the continuation logic.
    
            * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
            checkSelectionPointIgnoringContinuations.
            * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
            Changed the name, and nothing else.
    
            - fixed my build which was crashing on load
    
            * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index c60a450..07274e3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,32 @@
+2003-02-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+        - fixed 3165295 -- Hang while triple clicking on page
+
+        Flaws in the continuation logic we added to checkSelectionPoint made it take
+        exponential time on pages with a lot of continuations.
+
+        * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
+        added virtual checkSelectionPointIgnoringContinuations.
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
+        the render object walking process, which we only want to do at the top level,
+        since otherwise we will see the same nodes multiple times. Also optimizes by only
+        looking at the inline continuations of inlines, not any continuations of a block.
+        (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
+        function that is overriden by RenderText. It is identical to the old version of
+        checkSelectionPoint, minus the continuation logic.
+
+        * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
+        checkSelectionPointIgnoringContinuations.
+        * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
+        Changed the name, and nothing else.
+
+        - fixed my build which was crashing on load
+
+        * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
+
 2003-02-05  Trey Matteson  <trey at apple.com>
 
 	3137647 - ad frames get their own history entries at channels.netscape.com	
@@ -5,7 +34,7 @@
 
 	The logic for deciding whether new entries are added to history is moved here
 	from WebKit.  The advantage is that we can take specific action in each of the
-	relevant cases instead of WK the half-informed guessing WK was doing.
+	relevant cases instead of the half-informed guessing WK was doing.
 
 	Here is what we now use for the lockHistory param to scheduleRedirect():
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c60a450..07274e3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,32 @@
+2003-02-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+        - fixed 3165295 -- Hang while triple clicking on page
+
+        Flaws in the continuation logic we added to checkSelectionPoint made it take
+        exponential time on pages with a lot of continuations.
+
+        * khtml/rendering/render_object.h: Make checkSelectionPoint non-virtual, and
+        added virtual checkSelectionPointIgnoringContinuations.
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::checkSelectionPoint): Added. Does the inline continuation part of
+        the render object walking process, which we only want to do at the top level,
+        since otherwise we will see the same nodes multiple times. Also optimizes by only
+        looking at the inline continuations of inlines, not any continuations of a block.
+        (RenderObject::checkSelectionPointIgnoringContinuations): This is now the virtual
+        function that is overriden by RenderText. It is identical to the old version of
+        checkSelectionPoint, minus the continuation logic.
+
+        * khtml/rendering/render_text.h: Changed the name of checkSelectionPoint to
+        checkSelectionPointIgnoringContinuations.
+        * khtml/rendering/render_text.cpp: (RenderText::checkSelectionPointIgnoringContinuations):
+        Changed the name, and nothing else.
+
+        - fixed my build which was crashing on load
+
+        * WebCore.pbproj/project.pbxproj: Change seg1addr from 2200000 to 9000000.
+
 2003-02-05  Trey Matteson  <trey at apple.com>
 
 	3137647 - ad frames get their own history entries at channels.netscape.com	
@@ -5,7 +34,7 @@
 
 	The logic for deciding whether new entries are added to history is moved here
 	from WebKit.  The advantage is that we can take specific action in each of the
-	relevant cases instead of WK the half-informed guessing WK was doing.
+	relevant cases instead of the half-informed guessing WK was doing.
 
 	Here is what we now use for the lockHistory param to scheduleRedirect():
 
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index b7adc5b..c63af36 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -133,7 +133,7 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.2;
 				OPTIMIZATION_CFLAGS = "-Os";
 				OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DAPPLE_CHANGES -DHAVE_CONFIG_H";
-				OTHER_LDFLAGS = "-seg1addr 0x02200000 -no-c++filt";
+				OTHER_LDFLAGS = "-seg1addr 0x9000000 -no-c++filt";
 				PRECOMPILE_PREFIX_HEADER = YES;
 				PREFIX_HEADER = WebCorePrefix.h;
 				PRODUCT_NAME = WebCore;
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 7afe082..f5175fb 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -1084,13 +1084,28 @@ void RenderObject::arenaDelete(RenderArena *arena)
 
 FindSelectionResult RenderObject::checkSelectionPoint(int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int & offset )
 {
+    FindSelectionResult result = checkSelectionPointIgnoringContinuations(_x, _y, _tx, _ty, node, offset);
+    
+    if (isInline())
+        for (RenderObject *c = continuation(); result == SelectionPointAfter && c; c = c->continuation())
+            if (c->isInline()) {
+                int ncx, ncy;
+                c->absolutePosition(ncx, ncy);
+                result = c->checkSelectionPointIgnoringContinuations(_x, _y, ncx - c->xPos(), ncy - c->yPos(), node, offset);
+            }
+    
+    return result;
+}
+
+FindSelectionResult RenderObject::checkSelectionPointIgnoringContinuations(int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int & offset )
+{
     int lastOffset=0;
     int off = offset;
     DOM::NodeImpl* nod = node;
     DOM::NodeImpl* lastNode = 0;
     
     for (RenderObject *child = firstChild(); child; child=child->nextSibling()) {
-        khtml::FindSelectionResult pos = child->checkSelectionPoint(_x, _y, _tx+xPos(), _ty+yPos(), nod, off);
+        FindSelectionResult pos = child->checkSelectionPointIgnoringContinuations(_x, _y, _tx+xPos(), _ty+yPos(), nod, off);
         //kdDebug(6030) << this << " child->findSelectionNode returned " << pos << endl;
         switch(pos) {
         case SelectionPointBeforeInLine:
@@ -1119,16 +1134,6 @@ FindSelectionResult RenderObject::checkSelectionPoint(int _x, int _y, int _tx, i
         }
     }
     
-    RenderObject* nextCont = continuation();
-    while (nextCont && !nextCont->isInline()) {
-        nextCont = nextCont->continuation();
-    }
-    if (nextCont){
-        int ncx, ncy;
-        nextCont->absolutePosition(ncx, ncy);
-        return nextCont->checkSelectionPoint(_x, _y, ncx-nextCont->xPos(), ncy-nextCont->yPos(), node, offset);
-    }
-    
     node = lastNode;
     offset = lastOffset;
     return SelectionPointAfter;
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 3066a6a..9540581 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -352,8 +352,8 @@ public:
         bool m_active;
     };
 
-    virtual FindSelectionResult checkSelectionPoint( int _x, int _y, int _tx, int _ty,
-                                                     DOM::NodeImpl*&, int & offset );
+    FindSelectionResult checkSelectionPoint(int x, int y, int tx, int ty, DOM::NodeImpl*&, int& offset);
+    virtual FindSelectionResult checkSelectionPointIgnoringContinuations(int x, int y, int tx, int ty, DOM::NodeImpl*&, int& offset);
     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside=false);
     void setHoverAndActive(NodeInfo& info, bool oldinside, bool inside);
     
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index f8cc399..29313eb 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -491,7 +491,7 @@ bool RenderText::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, b
     return inside;
 }
 
-FindSelectionResult RenderText::checkSelectionPoint(int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int &offset)
+FindSelectionResult RenderText::checkSelectionPointIgnoringContinuations(int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int &offset)
 {
 //     kdDebug(6040) << "RenderText::checkSelectionPoint " << this << " _x=" << _x << " _y=" << _y
 //                   << " _tx=" << _tx << " _ty=" << _ty << endl;
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index a22497c..881bfad 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -153,8 +153,8 @@ public:
     virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside = false);
 
     // Return before, after (offset set to max), or inside the text, at @p offset
-    virtual FindSelectionResult checkSelectionPoint(int _x, int _y, int _tx, int _ty,
-                                                     DOM::NodeImpl*& node, int & offset );
+    virtual FindSelectionResult checkSelectionPointIgnoringContinuations
+        (int _x, int _y, int _tx, int _ty, DOM::NodeImpl*& node, int & offset);
 
     unsigned int length() const { return str->l; }
     QChar *text() const { return str->s; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list