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

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:01:45 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 354b1a428dcc2058c6206784151e05038b52fe5c
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Nov 16 07:29:59 2002 +0000

    	Fix for livepage.apple.com slowness.  Ensure that
    	clipped regions only paint their own rectangles
    	when they or any children inside of them need to
    	be reflowed.
    
    	This fix is intended as an interim band-aid for a much
    	larger problem (that all of layout doesn't just auto-invalidate
    	the regions it needs to, and that DHTML doesn't have
    	specialized behavior to avoid async repainting or even
    	relayout when only a repaint is required).
    
            * khtml/khtmlview.cpp:
            (KHTMLView::timerEvent):
            * khtml/rendering/render_container.cpp:
            (RenderContainer::removeChildNode):
            (RenderContainer::appendChildNode):
            (RenderContainer::insertChildNode):
            (RenderContainer::layout):
            * khtml/rendering/render_object.cpp:
            (RenderObject::setLayouted):
            (RenderObject::scheduleRelayout):
            * khtml/rendering/render_root.cpp:
            (RenderRoot::repaintRectangle):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2707 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 61179be..1b83b3c 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,31 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Fix for livepage.apple.com slowness.  Ensure that 
+	clipped regions only paint their own rectangles
+	when they or any children inside of them need to
+	be reflowed.
+
+	This fix is intended as an interim band-aid for a much
+	larger problem (that all of layout doesn't just auto-invalidate
+	the regions it needs to, and that DHTML doesn't have
+	specialized behavior to avoid async repainting or even
+	relayout when only a repaint is required).
+	
+        * khtml/khtmlview.cpp:
+        (KHTMLView::timerEvent):
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+        (RenderContainer::appendChildNode):
+        (RenderContainer::insertChildNode):
+        (RenderContainer::layout):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::setLayouted):
+        (RenderObject::scheduleRelayout):
+        * khtml/rendering/render_root.cpp:
+        (RenderRoot::repaintRectangle):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix the problem where the last lines of paragrpahs were getting
 	justified incorrectly.
 	
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 61179be..1b83b3c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,31 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Fix for livepage.apple.com slowness.  Ensure that 
+	clipped regions only paint their own rectangles
+	when they or any children inside of them need to
+	be reflowed.
+
+	This fix is intended as an interim band-aid for a much
+	larger problem (that all of layout doesn't just auto-invalidate
+	the regions it needs to, and that DHTML doesn't have
+	specialized behavior to avoid async repainting or even
+	relayout when only a repaint is required).
+	
+        * khtml/khtmlview.cpp:
+        (KHTMLView::timerEvent):
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+        (RenderContainer::appendChildNode):
+        (RenderContainer::insertChildNode):
+        (RenderContainer::layout):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::setLayouted):
+        (RenderObject::scheduleRelayout):
+        * khtml/rendering/render_root.cpp:
+        (RenderRoot::repaintRectangle):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix the problem where the last lines of paragrpahs were getting
 	justified incorrectly.
 	
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 61179be..1b83b3c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,31 @@
 2002-11-15  David Hyatt  <hyatt at apple.com>
 
+	Fix for livepage.apple.com slowness.  Ensure that 
+	clipped regions only paint their own rectangles
+	when they or any children inside of them need to
+	be reflowed.
+
+	This fix is intended as an interim band-aid for a much
+	larger problem (that all of layout doesn't just auto-invalidate
+	the regions it needs to, and that DHTML doesn't have
+	specialized behavior to avoid async repainting or even
+	relayout when only a repaint is required).
+	
+        * khtml/khtmlview.cpp:
+        (KHTMLView::timerEvent):
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+        (RenderContainer::appendChildNode):
+        (RenderContainer::insertChildNode):
+        (RenderContainer::layout):
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::setLayouted):
+        (RenderObject::scheduleRelayout):
+        * khtml/rendering/render_root.cpp:
+        (RenderRoot::repaintRectangle):
+
+2002-11-15  David Hyatt  <hyatt at apple.com>
+
 	Fix the problem where the last lines of paragrpahs were getting
 	justified incorrectly.
 	
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index b0a6962..f30c22f 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -1460,7 +1460,7 @@ void KHTMLView::timerEvent ( QTimerEvent *e )
         d->timerId = 0;
 
         //scheduleRepaint(contentsX(),contentsY(),visibleWidth(),visibleHeight());
-	d->updateRect = QRect(contentsX(),contentsY(),visibleWidth(),visibleHeight());
+        d->updateRect = QRect(contentsX(),contentsY(),visibleWidth(),visibleHeight());
     }
 
     if( m_part->xmlDocImpl() ) {
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index cbf1401..f2099e2 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -183,10 +183,9 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
     oldChild->setNextSibling(0);
     oldChild->setParent(0);
 
-    setLayouted( false );
     setMinMaxKnown( false );
-
-          
+    setLayouted( false );
+    
     return oldChild;
 }
 
@@ -252,12 +251,13 @@ void RenderContainer::appendChildNode(RenderObject* newChild)
         setFirstChild(newChild);
 
     setLastChild(newChild);
-    newChild->setLayouted( false );
-    newChild->setMinMaxKnown( false );
     
     // Keep our layer hierarchy updated.
     if (newChild->layer())
         enclosingLayer()->addChild(newChild->layer());
+        
+    newChild->setMinMaxKnown( false );
+    newChild->setLayouted( false );
 }
 
 void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeChild)
@@ -282,14 +282,15 @@ void RenderContainer::insertChildNode(RenderObject* child, RenderObject* beforeC
     child->setPreviousSibling(prev);
 
     child->setParent(this);
-    child->setLayouted( false );
-    child->setMinMaxKnown( false );
     
     // Keep our layer hierarchy updated.
     // XXX Need this to do an insertion and really find the right place to
     // put the new layer. -dwh
     if (child->layer())
         enclosingLayer()->addChild(child->layer());
+       
+    child->setMinMaxKnown( false );
+    child->setLayouted( false );
 }
 
 
@@ -300,9 +301,9 @@ void RenderContainer::layout()
 
     RenderObject *child = firstChild();
     while( child ) {
-	if( !child->layouted() )
-	    child->layout();
-	child = child->nextSibling();
+        if( !child->layouted() )
+            child->layout();
+        child = child->nextSibling();
     }
     setLayouted();
 }
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index 7837d7b..e4bb312 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -220,6 +220,13 @@ RenderObject* RenderObject::offsetParent() const
     return curr;
 }
 
+// This function now contains a rather unsavory hack.  If an attempt is made to
+// setLayout(false) an object inside a clipped (overflow:hidden) object, we just
+// lay that object out immediately and then repaint only the clipped rectangle.
+// scheduleRelayout always causes a full repaint, so we have to avoid it.  This
+// is gross, and we want to fix scheduleRelayout not to always do a full repaint
+// in the future. -dwh
+static RenderObject* gClipObject = 0;
 void RenderObject::setLayouted(bool b) 
 {
     m_layouted = b;
@@ -234,12 +241,28 @@ void RenderObject::setLayouted(bool b)
     else {
         RenderObject *o = m_parent;
         RenderObject *root = this;
+            
+        RenderObject* clippedObj = (style()->overflow() == OHIDDEN) ? this : 0;
+        
         while( o ) {
             o->m_layouted = false;
+            if (o->style()->overflow() == OHIDDEN && !clippedObj)
+                clippedObj = o;
             root = o;
             o = o->m_parent;
         }
-        root->scheduleRelayout();
+        
+        if (!gClipObject) {
+            if (clippedObj) {
+                gClipObject = clippedObj;
+                root->layout();
+                clippedObj->repaintRectangle(0,0,clippedObj->contentWidth(),clippedObj->contentHeight());
+                gClipObject = 0;
+            }
+            else
+                root->scheduleRelayout();
+        }
+                
     }
 }
     
@@ -1148,7 +1171,7 @@ void RenderObject::scheduleRelayout()
     if (!isRoot()) return;
     KHTMLView *view = static_cast<RenderRoot *>(this)->view();
     if ( view )
-	view->scheduleRelayout();
+        view->scheduleRelayout();
 }
 
 
diff --git a/WebCore/khtml/rendering/render_root.cpp b/WebCore/khtml/rendering/render_root.cpp
index 52fa062..575bde5 100644
--- a/WebCore/khtml/rendering/render_root.cpp
+++ b/WebCore/khtml/rendering/render_root.cpp
@@ -245,7 +245,9 @@ void RenderRoot::repaintRectangle(int x, int y, int w, int h, bool f)
     QRect ur(x, y, w, h);
 
     if (ur.intersects(vr))
-        if (m_view) m_view->scheduleRepaint(x, y, w, h);
+        if (m_view)
+            //m_view->updateContents(ur);
+            m_view->scheduleRepaint(x, y, w, h);
 }
 
 void RenderRoot::repaint()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list