- Revision
- 109140
- Author
- [email protected]
- Date
- 2012-02-28 12:46:29 -0800 (Tue, 28 Feb 2012)
Log Message
Incorrect before child parent calculation when adding new children
to anonymous column blocks.
https://bugs.webkit.org/show_bug.cgi?id=79755
Reviewed by David Hyatt.
Source/WebCore:
before child can be wrapped in anonymous containers, so need to
take care of that in before child parent calculation.
Test: fast/multicol/span/before-child-anonymous-column-block.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
LayoutTests:
Test passes if you don't see the div block inside table and you see
two blocks in different columns in the pixel test.
* fast/multicol/span/before-child-anonymous-column-block-expected.png: Added.
* fast/multicol/span/before-child-anonymous-column-block-expected.txt: Added.
* fast/multicol/span/before-child-anonymous-column-block.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (109139 => 109140)
--- trunk/LayoutTests/ChangeLog 2012-02-28 20:43:17 UTC (rev 109139)
+++ trunk/LayoutTests/ChangeLog 2012-02-28 20:46:29 UTC (rev 109140)
@@ -1,3 +1,18 @@
+2012-02-28 Abhishek Arya <[email protected]>
+
+ Incorrect before child parent calculation when adding new children
+ to anonymous column blocks.
+ https://bugs.webkit.org/show_bug.cgi?id=79755
+
+ Reviewed by David Hyatt.
+
+ Test passes if you don't see the div block inside table and you see
+ two blocks in different columns in the pixel test.
+
+ * fast/multicol/span/before-child-anonymous-column-block-expected.png: Added.
+ * fast/multicol/span/before-child-anonymous-column-block-expected.txt: Added.
+ * fast/multicol/span/before-child-anonymous-column-block.html: Added.
+
2012-02-28 Adam Klein <[email protected]>
Mark compositing/repaint/opacity-between-absolute.html as flaky.
Added: trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.png (0 => 109140)
--- trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.png (rev 0)
+++ trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.png 2012-02-28 20:46:29 UTC (rev 109140)
@@ -0,0 +1,5 @@
+\x89PNG
+
+
+IHDR X \x9Av\x82p )tEXtchecksum b9e509570b3ae5a2447adbb3fdd9d91b\xB4+\xF5o \x85IDATx\x9C\xEDٱ
+A A\x8C\xE8\xBFe\x93\xA1\xCFy\xED?S\x80\xE5\xCCZyvw_ \x81\xF7\xE9 \x80\xE7 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 \x99Ͽf\xE6\x8E=~v\xF7\xD6y \x9C\xE5N p\xE5 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @fvwO/ <\x83 \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 \x99/C\xDC\xA993\xEA IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.txt (0 => 109140)
--- trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block-expected.txt 2012-02-28 20:46:29 UTC (rev 109140)
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x52
+ RenderBlock {HTML} at (0,0) size 800x52
+ RenderBody {BODY} at (16,16) size 768x20
+layer at (16,16) size 768x20
+ RenderBlock {DIV} at (0,0) size 768x20
+ RenderBlock (anonymous multi-column span) at (0,0) size 768x0
+ RenderBlock {DIV} at (0,0) size 768x0
+layer at (16,16) size 768x20
+ RenderBlock (anonymous multi-column) at (0,0) size 768x20
+ RenderBlock {DIV} at (0,0) size 374x20
+ RenderText {#text} at (0,0) size 20x20
+ text run at (0,0) width 20: "3"
+ RenderTable at (0,20) size 20x20
+ RenderTableSection {DIV} at (0,0) size 20x20
+ RenderTableRow (anonymous) at (0,0) size 20x20
+ RenderTableCell (anonymous) at (0,0) size 20x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (0,0) size 20x20
+ text run at (0,0) width 20: "4"
Added: trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block.html (0 => 109140)
--- trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block.html (rev 0)
+++ trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block.html 2012-02-28 20:46:29 UTC (rev 109140)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html style="font-family: ahem; font-size: 10px; -webkit-font-smoothing: none;">
+<body>
+<style>
+#test1 { -webkit-column-count: 2; }
+#test2 { -webkit-column-span: all; }
+#test3 { content: counter(c); }
+</style>
+<script>
+_onload_ = function() {
+test1 = document.createElement('div');
+test1.setAttribute('id', 'test1');
+document.body.appendChild(test1);
+test2 = document.createElement('div');
+test2.setAttribute('id', 'test2');
+test1.appendChild(test2);
+test3 = document.createElement('div');
+test3.setAttribute('id', 'test3');
+test1.appendChild(test3);
+test4 = document.createElement('div');
+test1.appendChild(test4);
+test4.style.display = 'table-row-group';
+test3.appendChild(document.createTextNode('3'));
+test4.appendChild(document.createTextNode('4'));
+document.body.offsetTop;
+document.body.style.zoom = 2;
+}
+</script>
+</body>
+</html>
Property changes on: trunk/LayoutTests/fast/multicol/span/before-child-anonymous-column-block.html
___________________________________________________________________
Added: svn:executable
Modified: trunk/Source/WebCore/ChangeLog (109139 => 109140)
--- trunk/Source/WebCore/ChangeLog 2012-02-28 20:43:17 UTC (rev 109139)
+++ trunk/Source/WebCore/ChangeLog 2012-02-28 20:46:29 UTC (rev 109140)
@@ -1,3 +1,19 @@
+2012-02-28 Abhishek Arya <[email protected]>
+
+ Incorrect before child parent calculation when adding new children
+ to anonymous column blocks.
+ https://bugs.webkit.org/show_bug.cgi?id=79755
+
+ Reviewed by David Hyatt.
+
+ before child can be wrapped in anonymous containers, so need to
+ take care of that in before child parent calculation.
+
+ Test: fast/multicol/span/before-child-anonymous-column-block.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
+
2012-02-28 Ned Holbrook <[email protected]>
Reimplement pathFromFont() in SimpleFontDataMac.mm
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (109139 => 109140)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-02-28 20:43:17 UTC (rev 109139)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2012-02-28 20:46:29 UTC (rev 109140)
@@ -380,8 +380,17 @@
ASSERT(!continuation()); // We don't yet support column spans that aren't immediate children of the multi-column block.
// The goal is to locate a suitable box in which to place our child.
- RenderBlock* beforeChildParent = toRenderBlock(beforeChild && beforeChild->parent()->isRenderBlock() ? beforeChild->parent() : lastChild());
-
+ RenderBlock* beforeChildParent = 0;
+ if (beforeChild) {
+ RenderObject* curr = beforeChild;
+ while (curr && curr->parent() != this)
+ curr = curr->parent();
+ beforeChildParent = toRenderBlock(curr);
+ ASSERT(beforeChildParent);
+ ASSERT(beforeChildParent->isAnonymousColumnsBlock() || beforeChildParent->isAnonymousColumnSpanBlock());
+ } else
+ beforeChildParent = toRenderBlock(lastChild());
+
// If the new child is floating or positioned it can just go in that block.
if (newChild->isFloatingOrPositioned()) {
beforeChildParent->addChildIgnoringAnonymousColumnBlocks(newChild, beforeChild);