<rdar://problem/9737435> Re-enable -webkit-column-break-inside: avoid
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 17:27:46 +0000 (17:27 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2011 17:27:46 +0000 (17:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64102

Reviewed by Simon Fraser.

Source/WebCore:

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild): Treat the child as unsplittable if
'-webkit-column-break-inside: avoid' was specified.

LayoutTests:

* fast/multicol/break-properties-expected.txt:
* fast/multicol/break-properties.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/multicol/break-properties-expected.txt
LayoutTests/fast/multicol/break-properties.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp

index 26068d3..c6f775d 100644 (file)
@@ -1,3 +1,13 @@
+2011-07-07  Dan Bernstein  <mitz@apple.com>
+
+        <rdar://problem/9737435> Re-enable -webkit-column-break-inside: avoid
+        https://bugs.webkit.org/show_bug.cgi?id=64102
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/break-properties-expected.txt:
+        * fast/multicol/break-properties.html:
+
 2011-07-07  Andras Becsi  <abecsi@webkit.org>
 
         [Qt]REGRESSION(r90471): It made 4 fast/notifications tests fail on Qt
index 9f5d55a..3d48ed1 100644 (file)
@@ -1,3 +1,4 @@
 PASS: 'break-before' is at (218, 8)
 PASS: 'after-break' is at (428, 8)
+PASS: 'no-break' is at (533, 8)
 
index e2428f7..aa9cf3a 100644 (file)
@@ -32,4 +32,5 @@
 
     testBoxPosition("break-before", 218, 8);
     testBoxPosition("after-break", 428, 8);
+    testBoxPosition("no-break", 533, 8);
 </script>
index eefff14..74436ba 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-07  Dan Bernstein  <mitz@apple.com>
+
+        <rdar://problem/9737435> Re-enable -webkit-column-break-inside: avoid
+        https://bugs.webkit.org/show_bug.cgi?id=64102
+
+        Reviewed by Simon Fraser.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::adjustForUnsplittableChild): Treat the child as unsplittable if
+        '-webkit-column-break-inside: avoid' was specified.
+
 2011-07-07  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: visual regressions in network panel
index a8a31ef..14d4999 100644 (file)
@@ -6038,7 +6038,7 @@ int RenderBlock::applyAfterBreak(RenderBox* child, int logicalOffset, MarginInfo
 
 int RenderBlock::adjustForUnsplittableChild(RenderBox* child, int logicalOffset, bool includeMargins)
 {
-    bool isUnsplittable = child->isReplaced() || child->scrollsOverflow();
+    bool isUnsplittable = child->isReplaced() || child->scrollsOverflow() || child->style()->columnBreakInside() == PBAVOID;
     if (!isUnsplittable)
         return logicalOffset;
     int childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : 0);