[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:55:22 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit ddbec0aaac6b5859262fd944899afb4d572c207c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 6 01:13:11 2010 +0000

    2010-01-05  James Robinson  <jamesr at google.com>
    
            Reviewed by Eric Seidel.
    
            Typing in Google Wave repaints the whole screen
            https://bugs.webkit.org/show_bug.cgi?id=32295
    
            Add a repaint test to make sure that when mutations happen in a grandchild of a block element that has no in-flow children
            the entire block element is not unnecessarily repainted.
            The bug only shows up when running pixel tests.
    
            * fast/repaint/block-no-inflow-children.html: Added.
            * platform/mac/fast/repaint/block-no-inflow-children-expected.checksum: Added.
            * platform/mac/fast/repaint/block-no-inflow-children-expected.png: Added.
            * platform/mac/fast/repaint/block-no-inflow-children-expected.txt: Added.
    2010-01-05  James Robinson  <jamesr at google.com>
    
            Reviewed by Eric Seidel.
    
            Typing in Google Wave repaints the whole screen
            https://bugs.webkit.org/show_bug.cgi?id=32295
    
            Marks a RenderBlock without block children for layout and painting when it has no line boxes only if it has inline immediate children.
            The existing logic uses the existence of line boxes as a dirty flag to indicate that line boxes need to be regenerated.  This heuristic
            fails when the RenderBlock does not have any in-flow children at all, causing the RenderBlock to get unnecessarily marked for layout and
            painting.  This is particularly bad for common scrollbar manipulation tricks like putting one positioned div inside another - this
            structure caused the entire outer div's bounds to get scheduled for a paint whenever there was any mutation of any descendant.
    
            Test: LayoutTests/fast/repaint/block-no-inline-children.html (only shows up in pixel tests)
    
            * rendering/RenderBlockLineLayout.cpp:
            (WebCore::RenderBlock::layoutInlineChildren):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52839 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2e6c19d..1a91ca5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-05  James Robinson  <jamesr at google.com>
+
+        Reviewed by Eric Seidel.
+
+        Typing in Google Wave repaints the whole screen
+        https://bugs.webkit.org/show_bug.cgi?id=32295
+
+        Add a repaint test to make sure that when mutations happen in a grandchild of a block element that has no in-flow children
+        the entire block element is not unnecessarily repainted.
+        The bug only shows up when running pixel tests.
+
+        * fast/repaint/block-no-inflow-children.html: Added.
+        * platform/mac/fast/repaint/block-no-inflow-children-expected.checksum: Added.
+        * platform/mac/fast/repaint/block-no-inflow-children-expected.png: Added.
+        * platform/mac/fast/repaint/block-no-inflow-children-expected.txt: Added.
+
 2010-01-05  Ojan Vafai  <ojan at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/repaint/block-no-inflow-children.html b/LayoutTests/fast/repaint/block-no-inflow-children.html
new file mode 100644
index 0000000..4620f69
--- /dev/null
+++ b/LayoutTests/fast/repaint/block-no-inflow-children.html
@@ -0,0 +1,14 @@
+<body style="margin: 0;" onload="runRepaintTest()">
+    <script>
+        function repaintTest()
+        {
+            document.getElementById("target").innerText += " la";
+        }
+    </script>
+    <script src="resources/repaint.js"></script>
+    <div style="height:200px; width:200px">
+      <div style="position:absolute">
+        <div id="target">La la la</div>
+      </div>
+    </div>
+</body>
diff --git a/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.checksum b/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.checksum
new file mode 100644
index 0000000..d802436
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.checksum
@@ -0,0 +1 @@
+ed8e2f37427955f0a87cabf760417f2a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt b/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt
new file mode 100644
index 0000000..1c750f6
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/repaint/block-no-inflow-children-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (0,0) size 800x600
+      RenderBlock {DIV} at (0,0) size 200x200
+layer at (0,0) size 62x18
+  RenderBlock (positioned) {DIV} at (0,0) size 62x18
+    RenderBlock {DIV} at (0,0) size 62x18
+      RenderText {#text} at (0,0) size 62x18
+        text run at (0,0) width 62: "La la la la"
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1a928d7..5e19f0e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-05  James Robinson  <jamesr at google.com>
+
+        Reviewed by Eric Seidel.
+
+        Typing in Google Wave repaints the whole screen
+        https://bugs.webkit.org/show_bug.cgi?id=32295
+
+        Marks a RenderBlock without block children for layout and painting when it has no line boxes only if it has inline immediate children.
+        The existing logic uses the existence of line boxes as a dirty flag to indicate that line boxes need to be regenerated.  This heuristic
+        fails when the RenderBlock does not have any in-flow children at all, causing the RenderBlock to get unnecessarily marked for layout and
+        painting.  This is particularly bad for common scrollbar manipulation tricks like putting one positioned div inside another - this
+        structure caused the entire outer div's bounds to get scheduled for a paint whenever there was any mutation of any descendant.
+
+        Test: LayoutTests/fast/repaint/block-no-inline-children.html (only shows up in pixel tests)
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::layoutInlineChildren):
+
 2010-01-05  James Robinson  <jamesr at chromium.org>
 
         Reviewed by David Hyatt.
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index 471fa81..8e2c49f 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2000 Lars Knoll (knoll at kde.org)
  * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009 Apple Inc. All right reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -843,6 +844,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
         bool endOfInline = false;
         RenderObject* o = bidiFirst(this, 0, false);
         Vector<FloatWithRect> floats;
+        bool hasInlineChild = false;
         while (o) {
             if (o->isReplaced() || o->isFloating() || o->isPositioned()) {
                 RenderBox* box = toRenderBox(o);
@@ -865,6 +867,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
                     o->layoutIfNeeded();
                 }
             } else if (o->isText() || (o->isRenderInline() && !endOfInline)) {
+                hasInlineChild = true;
                 if (fullLayout || o->selfNeedsLayout())
                     dirtyLineBoxesForRenderer(o, fullLayout);
                 o->setNeedsLayout(false);
@@ -881,7 +884,7 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int& repaintTop, i
         bool previousLineBrokeCleanly = true;
         RootInlineBox* startLine = determineStartPosition(firstLine, fullLayout, previousLineBrokeCleanly, resolver, floats, floatIndex);
 
-        if (fullLayout && !selfNeedsLayout()) {
+        if (fullLayout && hasInlineChild && !selfNeedsLayout()) {
             setNeedsLayout(true, false);  // Mark ourselves as needing a full layout. This way we'll repaint like
                                           // we're supposed to.
             RenderView* v = view();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list