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

hyatt at apple.com hyatt at apple.com
Wed Dec 22 12:50:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1215367af0d64f403dfdb469452a1ce2ab9fc542
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 31 16:30:16 2010 +0000

    WebCore: https://bugs.webkit.org/show_bug.cgi?id=44956, paginate block-level replaced elements.
           <rdar://problem/8000991> Images with display:block get split between columns or pages
    
    Reviewed by Adam Roben.
    
    Added fast/multicol/paginate-block-replaced.html
    
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::paintChildren):
    
    LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=44956, paginate block-level replaced elements.
    
    Reviewed by Adam Roben.
    
    * fast/multicol/paginate-block-replaced.html: Added.
    * platform/mac/fast/multicol/paginate-block-replaced-expected.checksum: Added.
    * platform/mac/fast/multicol/paginate-block-replaced-expected.png: Added.
    * platform/mac/fast/multicol/paginate-block-replaced-expected.txt: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66492 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b096603..683e54d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-31  Dave Hyatt  <hyatt at apple.com>
+
+        Reviewed by Adam Roben.
+
+        https://bugs.webkit.org/show_bug.cgi?id=44956, paginate block-level replaced elements.
+
+        * fast/multicol/paginate-block-replaced.html: Added.
+        * platform/mac/fast/multicol/paginate-block-replaced-expected.checksum: Added.
+        * platform/mac/fast/multicol/paginate-block-replaced-expected.png: Added.
+        * platform/mac/fast/multicol/paginate-block-replaced-expected.txt: Added.
+
 2010-08-31  Philippe Normand  <pnormand at igalia.com>
 
         Unreviewed, unskip fixed test for the GTK port.
diff --git a/LayoutTests/fast/multicol/paginate-block-replaced.html b/LayoutTests/fast/multicol/paginate-block-replaced.html
new file mode 100644
index 0000000..c2663df
--- /dev/null
+++ b/LayoutTests/fast/multicol/paginate-block-replaced.html
@@ -0,0 +1,12 @@
+<div style="-webkit-column-width:300px;border:2px solid black; height:400px">
+This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>
+<img style="height:300px;width:250px;background-color:green;display:block">
+This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>This is some text.<br>
+This is some text.<br>This is some text.<br>This is some text.<br>
diff --git a/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.checksum b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.checksum
new file mode 100644
index 0000000..c5b1d1e
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.checksum
@@ -0,0 +1 @@
+7a3d46fe4171454bd76c7b1a22b08bf6
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.png b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.png
new file mode 100644
index 0000000..f0679b1
Binary files /dev/null and b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.txt b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.txt
new file mode 100644
index 0000000..ebc8f06
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/multicol/paginate-block-replaced-expected.txt
@@ -0,0 +1,130 @@
+layer at (0,0) size 1586x585
+  RenderView at (0,0) size 800x585
+layer at (0,0) size 1586x585
+  RenderBlock {HTML} at (0,0) size 800x585
+    RenderBody {BODY} at (8,8) size 784x569
+layer at (8,8) size 1578x404
+  RenderBlock {DIV} at (0,0) size 784x404 [border: (2px solid #000000)]
+    RenderBlock (anonymous) at (2,2) size 382x180
+      RenderText {#text} at (0,0) size 110x18
+        text run at (0,0) width 110: "This is some text."
+      RenderBR {BR} at (110,14) size 0x0
+      RenderText {#text} at (0,18) size 110x18
+        text run at (0,18) width 110: "This is some text."
+      RenderBR {BR} at (110,32) size 0x0
+      RenderText {#text} at (0,36) size 110x18
+        text run at (0,36) width 110: "This is some text."
+      RenderBR {BR} at (110,50) size 0x0
+      RenderText {#text} at (0,54) size 110x18
+        text run at (0,54) width 110: "This is some text."
+      RenderBR {BR} at (110,68) size 0x0
+      RenderText {#text} at (0,72) size 110x18
+        text run at (0,72) width 110: "This is some text."
+      RenderBR {BR} at (110,86) size 0x0
+      RenderText {#text} at (0,90) size 110x18
+        text run at (0,90) width 110: "This is some text."
+      RenderBR {BR} at (110,104) size 0x0
+      RenderText {#text} at (0,108) size 110x18
+        text run at (0,108) width 110: "This is some text."
+      RenderBR {BR} at (110,122) size 0x0
+      RenderText {#text} at (0,126) size 110x18
+        text run at (0,126) width 110: "This is some text."
+      RenderBR {BR} at (110,140) size 0x0
+      RenderText {#text} at (0,144) size 110x18
+        text run at (0,144) width 110: "This is some text."
+      RenderBR {BR} at (110,158) size 0x0
+      RenderText {#text} at (0,162) size 110x18
+        text run at (0,162) width 110: "This is some text."
+      RenderBR {BR} at (110,176) size 0x0
+    RenderImage {IMG} at (2,182) size 250x300 [bgcolor=#008000]
+    RenderBlock (anonymous) at (2,482) size 382x540
+      RenderText {#text} at (0,0) size 110x18
+        text run at (0,0) width 110: "This is some text."
+      RenderBR {BR} at (110,14) size 0x0
+      RenderText {#text} at (0,18) size 110x18
+        text run at (0,18) width 110: "This is some text."
+      RenderBR {BR} at (110,32) size 0x0
+      RenderText {#text} at (0,36) size 110x18
+        text run at (0,36) width 110: "This is some text."
+      RenderBR {BR} at (110,50) size 0x0
+      RenderText {#text} at (0,54) size 110x18
+        text run at (0,54) width 110: "This is some text."
+      RenderBR {BR} at (110,68) size 0x0
+      RenderText {#text} at (0,72) size 110x18
+        text run at (0,72) width 110: "This is some text."
+      RenderBR {BR} at (110,86) size 0x0
+      RenderText {#text} at (0,90) size 110x18
+        text run at (0,90) width 110: "This is some text."
+      RenderBR {BR} at (110,104) size 0x0
+      RenderText {#text} at (0,108) size 110x18
+        text run at (0,108) width 110: "This is some text."
+      RenderBR {BR} at (110,122) size 0x0
+      RenderText {#text} at (0,126) size 110x18
+        text run at (0,126) width 110: "This is some text."
+      RenderBR {BR} at (110,140) size 0x0
+      RenderText {#text} at (0,144) size 110x18
+        text run at (0,144) width 110: "This is some text."
+      RenderBR {BR} at (110,158) size 0x0
+      RenderText {#text} at (0,162) size 110x18
+        text run at (0,162) width 110: "This is some text."
+      RenderBR {BR} at (110,176) size 0x0
+      RenderText {#text} at (0,180) size 110x18
+        text run at (0,180) width 110: "This is some text."
+      RenderBR {BR} at (110,194) size 0x0
+      RenderText {#text} at (0,198) size 110x18
+        text run at (0,198) width 110: "This is some text."
+      RenderBR {BR} at (110,212) size 0x0
+      RenderText {#text} at (0,216) size 110x18
+        text run at (0,216) width 110: "This is some text."
+      RenderBR {BR} at (110,230) size 0x0
+      RenderText {#text} at (0,234) size 110x18
+        text run at (0,234) width 110: "This is some text."
+      RenderBR {BR} at (110,248) size 0x0
+      RenderText {#text} at (0,252) size 110x18
+        text run at (0,252) width 110: "This is some text."
+      RenderBR {BR} at (110,266) size 0x0
+      RenderText {#text} at (0,270) size 110x18
+        text run at (0,270) width 110: "This is some text."
+      RenderBR {BR} at (110,284) size 0x0
+      RenderText {#text} at (0,288) size 110x18
+        text run at (0,288) width 110: "This is some text."
+      RenderBR {BR} at (110,302) size 0x0
+      RenderText {#text} at (0,306) size 110x18
+        text run at (0,306) width 110: "This is some text."
+      RenderBR {BR} at (110,320) size 0x0
+      RenderText {#text} at (0,324) size 110x18
+        text run at (0,324) width 110: "This is some text."
+      RenderBR {BR} at (110,338) size 0x0
+      RenderText {#text} at (0,342) size 110x18
+        text run at (0,342) width 110: "This is some text."
+      RenderBR {BR} at (110,356) size 0x0
+      RenderText {#text} at (0,360) size 110x18
+        text run at (0,360) width 110: "This is some text."
+      RenderBR {BR} at (110,374) size 0x0
+      RenderText {#text} at (0,378) size 110x18
+        text run at (0,378) width 110: "This is some text."
+      RenderBR {BR} at (110,392) size 0x0
+      RenderText {#text} at (0,396) size 110x18
+        text run at (0,396) width 110: "This is some text."
+      RenderBR {BR} at (110,410) size 0x0
+      RenderText {#text} at (0,414) size 110x18
+        text run at (0,414) width 110: "This is some text."
+      RenderBR {BR} at (110,428) size 0x0
+      RenderText {#text} at (0,432) size 110x18
+        text run at (0,432) width 110: "This is some text."
+      RenderBR {BR} at (110,446) size 0x0
+      RenderText {#text} at (0,450) size 110x18
+        text run at (0,450) width 110: "This is some text."
+      RenderBR {BR} at (110,464) size 0x0
+      RenderText {#text} at (0,468) size 110x18
+        text run at (0,468) width 110: "This is some text."
+      RenderBR {BR} at (110,482) size 0x0
+      RenderText {#text} at (0,486) size 110x18
+        text run at (0,486) width 110: "This is some text."
+      RenderBR {BR} at (110,500) size 0x0
+      RenderText {#text} at (0,504) size 110x18
+        text run at (0,504) width 110: "This is some text."
+      RenderBR {BR} at (110,518) size 0x0
+      RenderText {#text} at (0,522) size 110x18
+        text run at (0,522) width 110: "This is some text."
+      RenderBR {BR} at (110,536) size 0x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 196596f..5421e93 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-31  Dave Hyatt  <hyatt at apple.com>
+
+        Reviewed by Adam Roben.
+
+        https://bugs.webkit.org/show_bug.cgi?id=44956, paginate block-level replaced elements.
+       <rdar://problem/8000991> Images with display:block get split between columns or pages
+
+        Added fast/multicol/paginate-block-replaced.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::paintChildren):
+
 2010-08-31  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 04d8fd0..1ef5c9d 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -2105,8 +2105,12 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
     PaintInfo info(paintInfo);
     info.phase = newPhase;
     info.updatePaintingRootForChildren(this);
+    
+    RenderView* renderView = view();
+    bool usePrintRect = !renderView->printRect().isEmpty() && !document()->settings()->paginateDuringLayoutEnabled();
+    
     bool checkPageBreaks = document()->paginated() && !document()->settings()->paginateDuringLayoutEnabled();
-    bool checkColumnBreaks = !checkPageBreaks && !view()->printRect().isEmpty() && !document()->settings()->paginateDuringLayoutEnabled();
+    bool checkColumnBreaks = !checkPageBreaks && usePrintRect;
 
     for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {        
         // Check for page-break-before: always, and if it's set, break and bail.
@@ -2118,6 +2122,17 @@ void RenderBlock::paintChildren(PaintInfo& paintInfo, int tx, int ty)
             return;
         }
 
+        if (child->isReplaced() && usePrintRect && child->height() <= renderView->printRect().height()) {
+            // Paginate block-level replaced elements.
+            if (ty + child->y() + child->height() > renderView->printRect().bottom()) {
+                if (ty + child->y() < renderView->truncatedAt())
+                    renderView->setBestTruncatedAt(ty + child->y(), child);
+                // If we were able to truncate, don't paint.
+                if (ty + child->y() >= renderView->truncatedAt())
+                    break;
+            }
+        }
+
         if (!child->hasSelfPaintingLayer() && !child->isFloating())
             child->paint(info, tx, ty);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list