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

hyatt at apple.com hyatt at apple.com
Wed Dec 22 18:37:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2f8085df5e00214374867f5e47bb18406312b17d
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 23:01:51 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=50970
    
    Reviewed by Dan Bernstein.
    
    It's arguably a bug, but we don't let inline flow layers paint floating
    descendants.  The containing block of the inline flow paints them instead.
    However our shouldPaint logic has always been flawed and has turned off propagation
    of painting when an inline flow layer is enclosing the float.
    
    Change enclosingSelfPaintingLayer to enclosingFloatPaintingLayer to be more precise
    and for now limit it to RenderBoxes.
    
    Added fast/block/float/floatstack.html
    
    WebCore:
    
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::addOverhangingFloats):
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::enclosingFloatPaintingLayer):
    * rendering/RenderBox.h:
    * rendering/RenderObject.cpp:
    * rendering/RenderObject.h:
    
    LayoutTests:
    
    * fast/block/float/floatstack.html: Added.
    * platform/mac/fast/block/float/floatstack-expected.checksum: Added.
    * platform/mac/fast/block/float/floatstack-expected.png: Added.
    * platform/mac/fast/block/float/floatstack-expected.txt: Added.
    * platform/mac/fast/repaint/positioned-document-element-expected.checksum:
    * platform/mac/fast/repaint/positioned-document-element-expected.png:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f7deb93..16ee217 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,26 @@
+2010-12-14  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50970
+        
+        It's arguably a bug, but we don't let inline flow layers paint floating
+        descendants.  The containing block of the inline flow paints them instead.
+        However our shouldPaint logic has always been flawed and has turned off propagation
+        of painting when an inline flow layer is enclosing the float.
+        
+        Change enclosingSelfPaintingLayer to enclosingFloatPaintingLayer to be more precise
+        and for now limit it to RenderBoxes. 
+        
+        Added fast/block/float/floatstack.html
+
+        * fast/block/float/floatstack.html: Added.
+        * platform/mac/fast/block/float/floatstack-expected.checksum: Added.
+        * platform/mac/fast/block/float/floatstack-expected.png: Added.
+        * platform/mac/fast/block/float/floatstack-expected.txt: Added.
+        * platform/mac/fast/repaint/positioned-document-element-expected.checksum:
+        * platform/mac/fast/repaint/positioned-document-element-expected.png:
+
 2010-12-14  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r74040.
diff --git a/LayoutTests/platform/mac/fast/block/float/floatstack-expected.checksum b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.checksum
new file mode 100644
index 0000000..e2a5d2f
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.checksum
@@ -0,0 +1 @@
+4be38c2144444ed9e2169a79a8faa64b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/block/float/floatstack-expected.png b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.png
new file mode 100644
index 0000000..d4a8f40
Binary files /dev/null and b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/block/float/floatstack-expected.txt b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.txt
new file mode 100644
index 0000000..2b2d7d9
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/block/float/floatstack-expected.txt
@@ -0,0 +1,14 @@
+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 (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 300x300 [bgcolor=#EEEEEE]
+        RenderText {#text} at (0,0) size 0x0
+        RenderBlock (floating) {DIV} at (50,0) size 100x100 [bgcolor=#00FF00]
+        RenderText {#text} at (0,0) size 0x0
+layer at (18,18) size 29x18
+  RenderInline (relative positioned) {SPAN} at (0,0) size 29x18 [bgcolor=#FFFF00]
+    RenderBlock (floating) {DIV} at (0,0) size 100x100 [bgcolor=#0000FF]
+    RenderText {#text} at (150,0) size 29x18
+      text run at (150,0) width 29: "Text"
diff --git a/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.checksum b/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.checksum
index 8bf5046..b937d4e 100644
--- a/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.checksum
+++ b/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.checksum
@@ -1 +1 @@
-6c8fc5a6a844d01709534b22be37be5d
\ No newline at end of file
+844d7ff73a472423c0f8dae9ba99068d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.png b/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.png
index 25dcc16..7130fb7 100644
Binary files a/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.png and b/LayoutTests/platform/mac/fast/repaint/positioned-document-element-expected.png differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 30907d0..ef3848d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-12-14  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=50970
+        
+        It's arguably a bug, but we don't let inline flow layers paint floating
+        descendants.  The containing block of the inline flow paints them instead.
+        However our shouldPaint logic has always been flawed and has turned off propagation
+        of painting when an inline flow layer is enclosing the float.
+        
+        Change enclosingSelfPaintingLayer to enclosingFloatPaintingLayer to be more precise
+        and for now limit it to RenderBoxes. 
+        
+        Added fast/block/float/floatstack.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::addOverhangingFloats):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::enclosingFloatPaintingLayer):
+        * rendering/RenderBox.h:
+        * rendering/RenderObject.cpp:
+        * rendering/RenderObject.h:
+
 2010-12-14  Mihai Parparita  <mihaip at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 78a92a8..cdfdf73 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -3566,7 +3566,7 @@ int RenderBlock::addOverhangingFloats(RenderBlock* child, int logicalLeftOffset,
                 // behaves properly).  We always want to propagate the desire to paint the float as
                 // far out as we can, to the outermost block that overlaps the float, stopping only
                 // if we hit a self-painting layer boundary.
-                if (r->m_renderer->enclosingSelfPaintingLayer() == enclosingSelfPaintingLayer())
+                if (r->m_renderer->enclosingFloatPaintingLayer() == enclosingFloatPaintingLayer())
                     r->m_shouldPaint = false;
                 else
                     floatingObj->m_shouldPaint = false;
@@ -3582,7 +3582,7 @@ int RenderBlock::addOverhangingFloats(RenderBlock* child, int logicalLeftOffset,
             }
         } else {
             if (makeChildPaintOtherFloats && !r->m_shouldPaint && !r->m_renderer->hasSelfPaintingLayer() &&
-                r->m_renderer->isDescendantOf(child) && r->m_renderer->enclosingLayer() == child->enclosingLayer()) {
+                r->m_renderer->isDescendantOf(child) && r->m_renderer->enclosingFloatPaintingLayer() == child->enclosingFloatPaintingLayer()) {
                 // The float is not overhanging from this block, so if it is a descendant of the child, the child should
                 // paint it (the other case is that it is intruding into the child), unless it has its own layer or enclosing
                 // layer.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 0f3926b..e4417a9 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -3178,6 +3178,19 @@ int RenderBox::baselinePosition(FontBaseline baselineType, bool /*firstLine*/, L
     return 0;
 }
 
+
+RenderLayer* RenderBox::enclosingFloatPaintingLayer() const
+{
+    const RenderObject* curr = this;
+    while (curr) {
+        RenderLayer* layer = curr->hasLayer() && curr->isBox() ? toRenderBoxModelObject(curr)->layer() : 0;
+        if (layer && layer->isSelfPaintingLayer())
+            return layer;
+        curr = curr->parent();
+    }
+    return 0;
+}
+
 IntRect RenderBox::logicalVisualOverflowRectForPropagation(RenderStyle* parentStyle) const
 {
     IntRect rect = visualOverflowRectForPropagation(parentStyle);
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index d68d174..67ac103 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -357,6 +357,8 @@ public:
 
     void removeFloatingOrPositionedChildFromBlockLists();
     
+    RenderLayer* enclosingFloatPaintingLayer() const;
+    
     virtual int firstLineBoxBaseline() const { return -1; }
     virtual int lastLineBoxBaseline() const { return -1; }
 
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index caff3bd..8802fb8 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -538,18 +538,6 @@ RenderLayer* RenderObject::enclosingLayer() const
     return 0;
 }
 
-RenderLayer* RenderObject::enclosingSelfPaintingLayer() const
-{
-    const RenderObject* curr = this;
-    while (curr) {
-        RenderLayer* layer = curr->hasLayer() ? toRenderBoxModelObject(curr)->layer() : 0;
-        if (layer && layer->isSelfPaintingLayer())
-            return layer;
-        curr = curr->parent();
-    }
-    return 0;
-}
-
 RenderBox* RenderObject::enclosingBox() const
 {
     RenderObject* curr = const_cast<RenderObject*>(this);
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index 5c68a6d..d254986 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -159,7 +159,6 @@ public:
     // properly added and removed.  Since containership can be implemented by any subclass, and since a hierarchy
     // can contain a mixture of boxes and other object types, these functions need to be in the base class.
     RenderLayer* enclosingLayer() const;
-    RenderLayer* enclosingSelfPaintingLayer() const;
     void addLayers(RenderLayer* parentLayer, RenderObject* newObject);
     void removeLayers(RenderLayer* parentLayer);
     void moveLayers(RenderLayer* oldParent, RenderLayer* newParent);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list