+2011-09-21 Abhishek Arya <inferno@chromium.org>
+
+ Not use anonymousContainer on beforeChild calculation
+ and let later code handle it.
+ https://bugs.webkit.org/show_bug.cgi?id=67656
+
+ Reviewed by David Hyatt.
+
+ * fast/table/quote-text-around-iframe.html: Added.
+ * fast/table/table-row-style-not-updated-with-after-content-expected.txt:
+ * platform/mac/fast/table/quote-text-around-iframe-expected.png: Added.
+ * platform/mac/fast/table/quote-text-around-iframe-expected.txt: Added.
+ and lot of style propagation rebaselines.
+
2011-09-21 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=68562
--- /dev/null
+<!DOCTYPE html>
+<!-- You should see Quote followed by A, followed by iframe, followed by B and ending in Quote -->
+<body>
+<q style="display: table-row;">
+A<iframe></iframe>B
+</q>
+<script>
+ document.body.offsetTop;
+ document.body.style.zoom = "200%";
+</script>
+</body>
+</html>
\ No newline at end of file
RenderBlock {HTML} at (0,0) size 800x64
RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
RenderBlock {DIV} at (0,0) size 784x48
- RenderTable at (0,0) size 64x16 [color=#000000]
+ RenderTable at (0,0) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
RenderTableRow (anonymous) at (0,0) size 64x16
- RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "ABCD"
RenderBlock {DIV} at (0,16) size 784x16
RenderText {#text} at (0,0) size 64x16
text run at (0,0) width 64: "1234"
- RenderTable at (0,32) size 64x16 [color=#000000]
+ RenderTable at (0,32) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
RenderTableRow (anonymous) at (0,0) size 64x16
- RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "EFGH"
RenderBlock {HTML} at (0,0) size 800x64
RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
RenderBlock {DIV} at (0,0) size 784x48
- RenderTable at (0,0) size 64x16 [color=#000000]
+ RenderTable at (0,0) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
RenderTableRow (anonymous) at (0,0) size 64x16
- RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "ABCD"
RenderTable {DIV} at (0,16) size 64x16
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 64x16
text run at (0,0) width 64: "1234"
- RenderTable at (0,32) size 64x16 [color=#000000]
+ RenderTable at (0,32) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
RenderTableRow (anonymous) at (0,0) size 64x16
- RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "EFGH"
RenderBlock {HTML} at (0,0) size 800x64
RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
RenderBlock {DIV} at (0,0) size 784x48
- RenderTable at (0,0) size 64x16 [color=#000000]
+ RenderTable at (0,0) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
- RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
+ RenderTableRow (anonymous) at (0,0) size 64x16
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "ABCD"
RenderBlock {DIV} at (0,16) size 784x16
RenderText {#text} at (0,0) size 64x16
text run at (0,0) width 64: "1234"
- RenderTable at (0,32) size 64x16 [color=#000000]
+ RenderTable at (0,32) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
- RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
+ RenderTableRow (anonymous) at (0,0) size 64x16
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "EFGH"
RenderBlock {HTML} at (0,0) size 800x64
RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
RenderBlock {DIV} at (0,0) size 784x48
- RenderTable at (0,0) size 64x16 [color=#000000]
+ RenderTable at (0,0) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
- RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
+ RenderTableRow (anonymous) at (0,0) size 64x16
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "ABCD"
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 64x16
text run at (0,0) width 64: "1234"
- RenderTable at (0,32) size 64x16 [color=#000000]
+ RenderTable at (0,32) size 64x16
RenderTableSection (anonymous) at (0,0) size 64x16
- RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
+ RenderTableRow (anonymous) at (0,0) size 64x16
RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 64x16
text run at (0,0) width 64: "EFGH"
RenderTableSection (anonymous) at (0,0) size 512x256
RenderTableRow {DIV} at (0,0) size 512x256 [color=#0000FF]
RenderTableCell (anonymous) at (0,0) size 512x256 [r=0 c=0 rs=1 cs=1]
- RenderBlock (anonymous) at (0,0) size 512x128
- RenderText {#text} at (0,0) size 512x128
- text run at (0,0) width 512: "ABCD"
- RenderTable at (0,128) size 512x128
- RenderTableSection (anonymous) at (0,0) size 512x128
- RenderTableRow (anonymous) at (0,0) size 512x128 [color=#FFFF00]
+ RenderTable at (0,0) size 512x256
+ RenderTableSection (anonymous) at (0,0) size 512x256
+ RenderTableRow (anonymous) at (0,0) size 512x128
RenderTableCell (anonymous) at (0,0) size 512x128 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (0,0) size 512x128
+ text run at (0,0) width 512: "ABCD"
+ RenderTableRow (anonymous) at (0,128) size 512x128 [color=#FFFF00]
+ RenderTableCell (anonymous) at (0,128) size 512x128 [r=1 c=0 rs=1 cs=1]
RenderText at (0,0) size 512x128
text run at (0,0) width 512: "4578"
RenderBlock {DIV} at (0,256) size 784x128 [color=#008000]
RenderBlock {HTML} at (0,0) size 800x34
RenderBody {BODY} at (8,8) size 784x18 [color=#0000FF]
RenderBlock {DIV} at (0,0) size 784x18
- RenderTable at (0,0) size 282x18 [color=#000000]
+ RenderTable at (0,0) size 282x18
RenderTableSection (anonymous) at (0,0) size 282x18
RenderTableRow (anonymous) at (0,0) size 282x18
- RenderTableCell (anonymous) at (0,0) size 203x18 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 203x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 203x18
text run at (0,0) width 203: "You should just see a single line"
- RenderTableCell {DIV} at (203,0) size 4x18 [color=#0000FF] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {DIV} at (203,0) size 4x18 [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (0,0) size 4x18
text run at (0,0) width 4: " "
- RenderTableCell (anonymous) at (207,0) size 75x18 [color=#0000FF] [r=0 c=2 rs=1 cs=1]
+ RenderTableCell (anonymous) at (207,0) size 75x18 [r=0 c=2 rs=1 cs=1]
RenderText at (0,0) size 75x18
text run at (0,0) width 75: "of blue text."
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x198
+ RenderBlock {HTML} at (0,0) size 800x198
+ RenderBody {BODY} at (16,16) size 768x166
+ RenderTable at (0,0) size 394x166
+ RenderTableSection (anonymous) at (0,0) size 394x166
+ RenderTableRow {Q} at (0,0) size 394x166
+ RenderTableCell (anonymous) at (0,0) size 394x166 [r=0 c=0 rs=1 cs=1]
+ RenderInline (generated) at (0,0) size 13x37
+ RenderQuote at (0,129) size 13x37
+ text run at (0,129) width 13: "\""
+ RenderText {#text} at (13,129) size 31x37
+ text run at (13,129) width 31: " A"
+ RenderPartObject {IFRAME} at (44,0) size 308x158 [border: (4px inset #000000)]
+ layer at (0,0) size 300x150
+ RenderView at (0,0) size 300x150
+ layer at (0,0) size 300x150
+ RenderBlock {HTML} at (0,0) size 300x150
+ RenderBody {BODY} at (8,8) size 284x134
+ RenderText {#text} at (352,129) size 29x37
+ text run at (352,129) width 29: "B "
+ RenderInline (generated) at (0,0) size 13x37
+ RenderQuote at (381,129) size 13x37
+ text run at (381,129) width 13: "\""
RenderBlock {DIV} at (19,19) size 746x18
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
- RenderTable at (19,37) size 90x56 [color=#000000]
+ RenderTable at (19,37) size 90x56
RenderTableSection (anonymous) at (0,0) size 90x56
RenderTableRow (anonymous) at (0,0) size 90x56
- RenderTableCell (anonymous) at (0,0) size 90x56 [color=#FF0000] [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 90x56 [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
RenderText at (19,19) size 52x18
text run at (19,19) width 52: "AFTER"
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x112 [color=#FF0000] [border: (3px solid #008000)]
- RenderTable at (19,19) size 101x56 [color=#000000]
+ RenderTable at (19,19) size 101x56
RenderTableSection (anonymous) at (0,0) size 101x56
RenderTableRow (anonymous) at (0,0) size 101x56
- RenderTableCell (anonymous) at (0,0) size 101x56 [color=#FF0000] [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 101x56 [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
RenderText at (19,19) size 63x18
text run at (19,19) width 63: "BEFORE"
RenderBlock {DIV} at (19,75) size 746x18
RenderBlock {DIV} at (19,19) size 746x18
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
- RenderTable at (19,37) size 52x18 [color=#000000]
+ RenderTable at (19,37) size 52x18
RenderTableSection (anonymous) at (0,0) size 52x18
- RenderTableRow (anonymous) at (0,0) size 52x18 [color=#FF0000] [border: (3px solid #0000FF)]
+ RenderTableRow (anonymous) at (0,0) size 52x18 [border: (3px solid #0000FF)]
RenderTableCell (anonymous) at (0,0) size 52x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
text run at (0,0) width 52: "AFTER"
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x74 [color=#FF0000] [border: (3px solid #008000)]
- RenderTable at (19,19) size 63x18 [color=#000000]
+ RenderTable at (19,19) size 63x18
RenderTableSection (anonymous) at (0,0) size 63x18
- RenderTableRow (anonymous) at (0,0) size 63x18 [color=#FF0000] [border: (3px solid #0000FF)]
+ RenderTableRow (anonymous) at (0,0) size 63x18 [border: (3px solid #0000FF)]
RenderTableCell (anonymous) at (0,0) size 63x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
text run at (0,0) width 63: "BEFORE"
+2011-09-21 Abhishek Arya <inferno@chromium.org>
+
+ Not use anonymousContainer on beforeChild calculation
+ and let later code handle it. Fix style update on block-level
+ anonymous objects.
+ https://bugs.webkit.org/show_bug.cgi?id=67656
+
+ Reviewed by David Hyatt.
+
+ Test: fast/table/quote-text-around-iframe.html
+
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::addChild):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::styleDidChange):
+ * rendering/RenderTableRow.cpp:
+ (WebCore::RenderTableRow::addChild):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::propagateStyleToAnonymousChildren):
+
2011-09-21 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=68562
{
// FIXME: We could save this call when the change only affected non-inherited properties.
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
- if (blockChildrenOnly ? child->isAnonymousBlock() : child->isAnonymous() && !child->isBeforeOrAfterContent()) {
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
- if (style()->specifiesColumns()) {
- if (child->style()->specifiesColumns())
- newStyle->inheritColumnPropertiesFrom(style());
- if (child->style()->columnSpan())
- newStyle->setColumnSpan(true);
- }
- newStyle->setDisplay(blockChildrenOnly ? BLOCK : child->style()->display());
- child->setStyle(newStyle.release());
+ if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO)
+ continue;
+
+ if (blockChildrenOnly && !child->isRenderBlock())
+ continue;
+
+#if ENABLE(FULLSCREEN_API)
+ if (child->isRenderFullScreen() || child->isRenderFullScreenPlaceholder())
+ continue;
+#endif
+
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
+ if (style()->specifiesColumns()) {
+ if (child->style()->specifiesColumns())
+ newStyle->inheritColumnPropertiesFrom(style());
+ if (child->style()->columnSpan())
+ newStyle->setColumnSpan(true);
}
+ newStyle->setDisplay(child->style()->display());
+ child->setStyle(newStyle.release());
}
}
void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
{
// Make sure we don't append things after :after-generated content if we have it.
- if (!beforeChild) {
- if (RenderObject* afterContentRenderer = findAfterContentRenderer())
- beforeChild = anonymousContainer(afterContentRenderer);
- }
+ if (!beforeChild)
+ beforeChild = findAfterContentRenderer();
bool wrapInAnonymousSection = !child->isPositioned();
void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
{
// Make sure we don't append things after :after-generated content if we have it.
- if (!beforeChild) {
- if (RenderObject* afterContentRenderer = findAfterContentRenderer())
- beforeChild = anonymousContainer(afterContentRenderer);
- }
+ if (!beforeChild)
+ beforeChild = findAfterContentRenderer();
if (!child->isTableCell()) {
RenderObject* last = beforeChild;
void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild)
{
// Make sure we don't append things after :after-generated content if we have it.
- if (!beforeChild) {
- if (RenderObject* afterContentRenderer = findAfterContentRenderer())
- beforeChild = anonymousContainer(afterContentRenderer);
- }
+ if (!beforeChild)
+ beforeChild = findAfterContentRenderer();
if (!child->isTableRow()) {
RenderObject* last = beforeChild;