Commit 27c111b6 authored by hyatt@apple.com's avatar hyatt@apple.com

https://bugs.webkit.org/show_bug.cgi?id=47206

        
Reviewed by Dan Bernstein.

Table rows don't support ::before/::after.  Add support to RenderTableRow::styleDidChange so that ::before/::after content gets
properly constructed.

Added fast/css-generated-content/table-row-before-after.html

Source/WebCore: 

* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
* rendering/RenderTableRow.h:

LayoutTests: 

* fast/css-generated-content/table-row-before-after.html: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.checksum: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.png: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.txt: Added.



git-svn-id: svn://svn.chromium.org/blink/trunk@80871 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 79a88371
2011-03-11 David Hyatt <hyatt@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=47206
Table rows don't support ::before/::after. Add support to RenderTableRow::styleDidChange so that ::before/::after content gets
properly constructed.
Added fast/css-generated-content/table-row-before-after.html
* fast/css-generated-content/table-row-before-after.html: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.checksum: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.png: Added.
* platform/mac/fast/css-generated-content/table-row-before-after-expected.txt: Added.
2011-03-11 David Hyatt <hyatt@apple.com>
Reviewed by Simon Fraser.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>CSS Test: CSS table model and generated content: Basics</title>
<link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
<link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/table/generated-content/001.xml" type="application/xhtml+xml">
<link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content">
<style type="text/css">
.table { display: table; border-spacing: 0; background: red; color: green; }
.row { display: table-row; }
.cell, .row.test:before, .row.test:after { display: table-cell; background: white; border: solid white; }
.row.test:before { content: "P"; }
.row.test:after { content: "S"; }
</style>
</head>
<body>
<p>There word PASS should appear twice below, and there should be no red.</p>
<div class="table">
<div class="row">
<div class="cell">P</div>
<div class="cell">A</div>
<div class="cell">S</div>
<div class="cell">S</div>
</div>
<div class="row test">
<!--<div class="cell">P</div>-->
<div class="cell">A</div>
<div class="cell">S</div>
<!--<div class="cell">S</div>-->
</div>
</div>
</body>
</html>
\ No newline at end of file
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x106
RenderBlock {HTML} at (0,0) size 800x106
RenderBody {BODY} at (8,16) size 784x82
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 469x18
text run at (0,0) width 469: "There word PASS should appear twice below, and there should be no red."
RenderTable {DIV} at (0,34) size 63x48 [color=#008000] [bgcolor=#FF0000]
RenderTableSection (anonymous) at (0,0) size 63x48
RenderTableRow {DIV} at (0,0) size 63x24
RenderTableCell {DIV} at (0,0) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (3,3) size 9x18
text run at (3,3) width 9: "P"
RenderTableCell {DIV} at (15,0) size 18x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (3,3) size 12x18
text run at (3,3) width 12: "A"
RenderTableCell {DIV} at (33,0) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=0 c=2 rs=1 cs=1]
RenderText {#text} at (3,3) size 9x18
text run at (3,3) width 9: "S"
RenderTableCell {DIV} at (48,0) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=0 c=3 rs=1 cs=1]
RenderText {#text} at (3,3) size 9x18
text run at (3,3) width 9: "S"
RenderTableRow {DIV} at (0,24) size 63x24
RenderTableCell (anonymous) at (0,24) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=1 c=0 rs=1 cs=1]
RenderText at (3,3) size 9x18
text run at (3,3) width 9: "P"
RenderTableCell {DIV} at (15,24) size 18x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=1 c=1 rs=1 cs=1]
RenderText {#text} at (3,3) size 12x18
text run at (3,3) width 12: "A"
RenderTableCell {DIV} at (33,24) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (3,3) size 9x18
text run at (3,3) width 9: "S"
RenderTableCell (anonymous) at (48,24) size 15x24 [bgcolor=#FFFFFF] [border: (3px solid #FFFFFF)] [r=1 c=3 rs=1 cs=1]
RenderText at (3,3) size 9x18
text run at (3,3) width 9: "S"
2011-03-11 David Hyatt <hyatt@apple.com>
Reviewed by Dan Bernstein.
https://bugs.webkit.org/show_bug.cgi?id=47206
Table rows don't support ::before/::after. Add support to RenderTableRow::styleDidChange so that ::before/::after content gets
properly constructed.
Added fast/css-generated-content/table-row-before-after.html
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
* rendering/RenderTableRow.h:
2011-03-11 James Robinson <jamesr@chromium.org>
Reviewed by Kenneth Russell.
......
......@@ -63,6 +63,17 @@ void RenderTableRow::styleWillChange(StyleDifference diff, const RenderStyle* ne
RenderBox::styleWillChange(diff, newStyle);
}
void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBox::styleDidChange(diff, oldStyle);
// Update pseudos for :before and :after now.
if (!isAnonymous() && document()->usesBeforeAfterRules()) {
children()->updateBeforeAfterContent(this, BEFORE);
children()->updateBeforeAfterContent(this, AFTER);
}
}
void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
{
// Make sure we don't append things after :after-generated content if we have it.
......
......@@ -62,6 +62,7 @@ private:
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
RenderObjectChildList m_children;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment