Title: [97888] trunk
Revision
97888
Author
m...@apple.com
Date
2011-10-19 15:42:12 -0700 (Wed, 19 Oct 2011)

Log Message

Incorrect pagination in flipped-blocks writing modes with border/padding before
https://bugs.webkit.org/show_bug.cgi?id=70444

Reviewed by Darin Adler.

Source/WebCore: 

Test: fast/multicol/flipped-blocks-border-after.html

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Account for flipped blocks when adjusting the page offset.

LayoutTests: 

* fast/multicol/flipped-blocks-border-after-expected.png: Added.
* fast/multicol/flipped-blocks-border-after-expected.txt: Added.
* fast/multicol/flipped-blocks-border-after.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (97887 => 97888)


--- trunk/LayoutTests/ChangeLog	2011-10-19 22:40:18 UTC (rev 97887)
+++ trunk/LayoutTests/ChangeLog	2011-10-19 22:42:12 UTC (rev 97888)
@@ -1,3 +1,14 @@
+2011-10-19  Dan Bernstein  <m...@apple.com>
+
+        Incorrect pagination in flipped-blocks writing modes with border/padding before
+        https://bugs.webkit.org/show_bug.cgi?id=70444
+
+        Reviewed by Darin Adler.
+
+        * fast/multicol/flipped-blocks-border-after-expected.png: Added.
+        * fast/multicol/flipped-blocks-border-after-expected.txt: Added.
+        * fast/multicol/flipped-blocks-border-after.html: Added.
+
 2011-10-19  Beth Dakin  <bda...@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=70396

Added: trunk/LayoutTests/fast/multicol/flipped-blocks-border-after-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/fast/multicol/flipped-blocks-border-after-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/fast/multicol/flipped-blocks-border-after-expected.txt (0 => 97888)


--- trunk/LayoutTests/fast/multicol/flipped-blocks-border-after-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/flipped-blocks-border-after-expected.txt	2011-10-19 22:42:12 UTC (rev 97888)
@@ -0,0 +1,21 @@
+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
+layer at (8,8) size 100x150
+  RenderBlock {DIV} at (0,0) size 100x150 [bgcolor=#FF0000] [border: (50px solid #008000) none]
+    RenderBlock {DIV} at (0,0) size 50x100 [bgcolor=#008000]
+    RenderBlock {DIV} at (0,100) size 50x100 [bgcolor=#008000]
+layer at (8,158) size 100x150
+  RenderBlock {DIV} at (0,150) size 100x150 [bgcolor=#FF0000] [border: none (50px solid #008000) none]
+    RenderBlock {DIV} at (0,0) size 50x100 [bgcolor=#008000]
+    RenderBlock {DIV} at (0,100) size 50x100 [bgcolor=#008000]
+layer at (8,308) size 150x100
+  RenderBlock {DIV} at (0,300) size 150x100 [bgcolor=#FF0000] [border: none (50px solid #008000)]
+    RenderBlock {DIV} at (0,0) size 100x50 [bgcolor=#008000]
+    RenderBlock {DIV} at (100,0) size 100x50 [bgcolor=#008000]
+layer at (8,408) size 150x100
+  RenderBlock {DIV} at (0,400) size 150x100 [bgcolor=#FF0000] [border: none (50px solid #008000) none]
+    RenderBlock {DIV} at (0,0) size 100x50 [bgcolor=#008000]
+    RenderBlock {DIV} at (100,0) size 100x50 [bgcolor=#008000]

Added: trunk/LayoutTests/fast/multicol/flipped-blocks-border-after.html (0 => 97888)


--- trunk/LayoutTests/fast/multicol/flipped-blocks-border-after.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/flipped-blocks-border-after.html	2011-10-19 22:42:12 UTC (rev 97888)
@@ -0,0 +1,24 @@
+<style>
+    div.outer { border-width: 0; border-color: green; border-style: solid; background-color: red; width: 100px; height: 100px; -webkit-column-gap: 0; -webkit-columns: 2; }
+    div.outer div { background-color: green; }
+</style>
+
+<div class="outer" style="-webkit-writing-mode: horizontal-bt; border-top-width: 50px;">
+    <div style="height: 100px;"></div>
+    <div style="height: 100px; -webkit-column-break-before: always;"></div>
+</div>
+
+<div class="outer" style="-webkit-writing-mode: horizontal-tb; border-bottom-width: 50px;">
+    <div style="height: 100px;"></div>
+    <div style="height: 100px; -webkit-column-break-before: always;"></div>
+</div>
+
+<div class="outer" style="-webkit-writing-mode: vertical-rl; border-left-width: 50px;">
+    <div style="width: 100px;"></div>
+    <div style="width: 100px; -webkit-column-break-before: always;"></div>
+</div>
+
+<div class="outer" style="-webkit-writing-mode: vertical-lr; border-right-width: 50px;">
+    <div style="width: 100px;"></div>
+    <div style="width: 100px; -webkit-column-break-before: always;"></div>
+</div>

Modified: trunk/Source/WebCore/ChangeLog (97887 => 97888)


--- trunk/Source/WebCore/ChangeLog	2011-10-19 22:40:18 UTC (rev 97887)
+++ trunk/Source/WebCore/ChangeLog	2011-10-19 22:42:12 UTC (rev 97888)
@@ -1,3 +1,15 @@
+2011-10-19  Dan Bernstein  <m...@apple.com>
+
+        Incorrect pagination in flipped-blocks writing modes with border/padding before
+        https://bugs.webkit.org/show_bug.cgi?id=70444
+
+        Reviewed by Darin Adler.
+
+        Test: fast/multicol/flipped-blocks-border-after.html
+
+        * rendering/LayoutState.cpp:
+        (WebCore::LayoutState::LayoutState): Account for flipped blocks when adjusting the page offset.
+
 2011-10-19  Beth Dakin  <bda...@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=70396

Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (97887 => 97888)


--- trunk/Source/WebCore/rendering/LayoutState.cpp	2011-10-19 22:40:18 UTC (rev 97887)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp	2011-10-19 22:42:12 UTC (rev 97888)
@@ -85,8 +85,9 @@
     // We can compare this later on to figure out what part of the page we're actually on,
     if (pageLogicalHeight || m_columnInfo) {
         m_pageLogicalHeight = pageLogicalHeight;
-        m_pageOffset = LayoutSize(m_layoutOffset.width() + renderer->borderLeft() + renderer->paddingLeft(),
-                               m_layoutOffset.height() + renderer->borderTop() + renderer->paddingTop());
+        bool isFlipped = renderer->style()->isFlippedBlocksWritingMode();
+        m_pageOffset = LayoutSize(m_layoutOffset.width() + (!isFlipped ? renderer->borderLeft() + renderer->paddingLeft() : renderer->borderRight() + renderer->paddingRight()),
+                               m_layoutOffset.height() + (!isFlipped ? renderer->borderTop() + renderer->paddingTop() : renderer->borderBottom() + renderer->paddingBottom()));
         m_pageLogicalHeightChanged = pageLogicalHeightChanged;
     } else {
         // If we don't establish a new page height, then propagate the old page height and offset down.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to