Changeset 95671 in webkit


Ignore:
Timestamp:
Sep 21, 2011 3:05:07 PM (13 years ago)
Author:
inferno@chromium.org
Message:

Source/WebCore: 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):

LayoutTests: 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.

Location:
trunk
Files:
3 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r95670 r95671  
     12011-09-21  Abhishek Arya  <inferno@chromium.org>
     2
     3        Not use anonymousContainer on beforeChild calculation
     4        and let later code handle it.
     5        https://bugs.webkit.org/show_bug.cgi?id=67656
     6
     7        Reviewed by David Hyatt.
     8
     9        * fast/table/quote-text-around-iframe.html: Added.
     10        * fast/table/table-row-style-not-updated-with-after-content-expected.txt:
     11        * platform/mac/fast/table/quote-text-around-iframe-expected.png: Added.
     12        * platform/mac/fast/table/quote-text-around-iframe-expected.txt: Added.
     13        and lot of style propagation rebaselines.
     14
    1152011-09-21  David Hyatt  <hyatt@apple.com>
    216
  • trunk/LayoutTests/fast/table/table-cell-before-after-content-around-table-block-expected.txt

    r95461 r95671  
    55    RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
    66      RenderBlock {DIV} at (0,0) size 784x48
    7         RenderTable at (0,0) size 64x16 [color=#000000]
     7        RenderTable at (0,0) size 64x16
    88          RenderTableSection (anonymous) at (0,0) size 64x16
    99            RenderTableRow (anonymous) at (0,0) size 64x16
    10               RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
     10              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 64x16
    1212                  text run at (0,0) width 64: "ABCD"
     
    1414          RenderText {#text} at (0,0) size 64x16
    1515            text run at (0,0) width 64: "1234"
    16         RenderTable at (0,32) size 64x16 [color=#000000]
     16        RenderTable at (0,32) size 64x16
    1717          RenderTableSection (anonymous) at (0,0) size 64x16
    1818            RenderTableRow (anonymous) at (0,0) size 64x16
    19               RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
     19              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    2020                RenderText at (0,0) size 64x16
    2121                  text run at (0,0) width 64: "EFGH"
  • trunk/LayoutTests/fast/table/table-cell-before-after-content-around-table-expected.txt

    r95461 r95671  
    55    RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
    66      RenderBlock {DIV} at (0,0) size 784x48
    7         RenderTable at (0,0) size 64x16 [color=#000000]
     7        RenderTable at (0,0) size 64x16
    88          RenderTableSection (anonymous) at (0,0) size 64x16
    99            RenderTableRow (anonymous) at (0,0) size 64x16
    10               RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
     10              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 64x16
    1212                  text run at (0,0) width 64: "ABCD"
     
    1717                RenderText {#text} at (0,0) size 64x16
    1818                  text run at (0,0) width 64: "1234"
    19         RenderTable at (0,32) size 64x16 [color=#000000]
     19        RenderTable at (0,32) size 64x16
    2020          RenderTableSection (anonymous) at (0,0) size 64x16
    2121            RenderTableRow (anonymous) at (0,0) size 64x16
    22               RenderTableCell (anonymous) at (0,0) size 64x16 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
     22              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    2323                RenderText at (0,0) size 64x16
    2424                  text run at (0,0) width 64: "EFGH"
  • trunk/LayoutTests/fast/table/table-row-before-after-content-around-block-expected.txt

    r95461 r95671  
    55    RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
    66      RenderBlock {DIV} at (0,0) size 784x48
    7         RenderTable at (0,0) size 64x16 [color=#000000]
     7        RenderTable at (0,0) size 64x16
    88          RenderTableSection (anonymous) at (0,0) size 64x16
    9             RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
     9            RenderTableRow (anonymous) at (0,0) size 64x16
    1010              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 64x16
     
    1414          RenderText {#text} at (0,0) size 64x16
    1515            text run at (0,0) width 64: "1234"
    16         RenderTable at (0,32) size 64x16 [color=#000000]
     16        RenderTable at (0,32) size 64x16
    1717          RenderTableSection (anonymous) at (0,0) size 64x16
    18             RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
     18            RenderTableRow (anonymous) at (0,0) size 64x16
    1919              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    2020                RenderText at (0,0) size 64x16
  • trunk/LayoutTests/fast/table/table-row-before-after-content-around-table-expected.txt

    r95461 r95671  
    55    RenderBody {BODY} at (8,8) size 784x48 [color=#0000FF]
    66      RenderBlock {DIV} at (0,0) size 784x48
    7         RenderTable at (0,0) size 64x16 [color=#000000]
     7        RenderTable at (0,0) size 64x16
    88          RenderTableSection (anonymous) at (0,0) size 64x16
    9             RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
     9            RenderTableRow (anonymous) at (0,0) size 64x16
    1010              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 64x16
     
    1717                RenderText {#text} at (0,0) size 64x16
    1818                  text run at (0,0) width 64: "1234"
    19         RenderTable at (0,32) size 64x16 [color=#000000]
     19        RenderTable at (0,32) size 64x16
    2020          RenderTableSection (anonymous) at (0,0) size 64x16
    21             RenderTableRow (anonymous) at (0,0) size 64x16 [color=#0000FF]
     21            RenderTableRow (anonymous) at (0,0) size 64x16
    2222              RenderTableCell (anonymous) at (0,0) size 64x16 [r=0 c=0 rs=1 cs=1]
    2323                RenderText at (0,0) size 64x16
  • trunk/LayoutTests/fast/table/table-row-style-not-updated-with-after-content-expected.txt

    r94543 r95671  
    88          RenderTableRow {DIV} at (0,0) size 512x256 [color=#0000FF]
    99            RenderTableCell (anonymous) at (0,0) size 512x256 [r=0 c=0 rs=1 cs=1]
    10               RenderBlock (anonymous) at (0,0) size 512x128
    11                 RenderText {#text} at (0,0) size 512x128
    12                   text run at (0,0) width 512: "ABCD"
    13               RenderTable at (0,128) size 512x128
    14                 RenderTableSection (anonymous) at (0,0) size 512x128
    15                   RenderTableRow (anonymous) at (0,0) size 512x128 [color=#FFFF00]
     10              RenderTable at (0,0) size 512x256
     11                RenderTableSection (anonymous) at (0,0) size 512x256
     12                  RenderTableRow (anonymous) at (0,0) size 512x128
    1613                    RenderTableCell (anonymous) at (0,0) size 512x128 [r=0 c=0 rs=1 cs=1]
     14                      RenderText {#text} at (0,0) size 512x128
     15                        text run at (0,0) width 512: "ABCD"
     16                  RenderTableRow (anonymous) at (0,128) size 512x128 [color=#FFFF00]
     17                    RenderTableCell (anonymous) at (0,128) size 512x128 [r=1 c=0 rs=1 cs=1]
    1718                      RenderText at (0,0) size 512x128
    1819                        text run at (0,0) width 512: "4578"
  • trunk/LayoutTests/platform/mac/fast/css-generated-content/table-cell-before-content-expected.txt

    r30635 r95671  
    55    RenderBody {BODY} at (8,8) size 784x18 [color=#0000FF]
    66      RenderBlock {DIV} at (0,0) size 784x18
    7         RenderTable at (0,0) size 282x18 [color=#000000]
     7        RenderTable at (0,0) size 282x18
    88          RenderTableSection (anonymous) at (0,0) size 282x18
    99            RenderTableRow (anonymous) at (0,0) size 282x18
    10               RenderTableCell (anonymous) at (0,0) size 203x18 [color=#0000FF] [r=0 c=0 rs=1 cs=1]
     10              RenderTableCell (anonymous) at (0,0) size 203x18 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 203x18
    1212                  text run at (0,0) width 203: "You should just see a single line"
    13               RenderTableCell {DIV} at (203,0) size 4x18 [color=#0000FF] [r=0 c=1 rs=1 cs=1]
     13              RenderTableCell {DIV} at (203,0) size 4x18 [r=0 c=1 rs=1 cs=1]
    1414                RenderText {#text} at (0,0) size 4x18
    1515                  text run at (0,0) width 4: " "
    16               RenderTableCell (anonymous) at (207,0) size 75x18 [color=#0000FF] [r=0 c=2 rs=1 cs=1]
     16              RenderTableCell (anonymous) at (207,0) size 75x18 [r=0 c=2 rs=1 cs=1]
    1717                RenderText at (0,0) size 75x18
    1818                  text run at (0,0) width 75: "of blue text."
  • trunk/LayoutTests/platform/mac/fast/table/table-cell-after-child-in-block-expected.txt

    r93794 r95671  
    88          RenderText {#text} at (0,0) size 77x18
    99            text run at (0,0) width 77: "CONTENT"
    10         RenderTable at (19,37) size 90x56 [color=#000000]
     10        RenderTable at (19,37) size 90x56
    1111          RenderTableSection (anonymous) at (0,0) size 90x56
    1212            RenderTableRow (anonymous) at (0,0) size 90x56
    13               RenderTableCell (anonymous) at (0,0) size 90x56 [color=#FF0000] [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
     13              RenderTableCell (anonymous) at (0,0) size 90x56 [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
    1414                RenderText at (19,19) size 52x18
    1515                  text run at (19,19) width 52: "AFTER"
  • trunk/LayoutTests/platform/mac/fast/table/table-cell-before-child-in-block-expected.txt

    r93794 r95671  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 784x112 [color=#FF0000] [border: (3px solid #008000)]
    7         RenderTable at (19,19) size 101x56 [color=#000000]
     7        RenderTable at (19,19) size 101x56
    88          RenderTableSection (anonymous) at (0,0) size 101x56
    99            RenderTableRow (anonymous) at (0,0) size 101x56
    10               RenderTableCell (anonymous) at (0,0) size 101x56 [color=#FF0000] [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
     10              RenderTableCell (anonymous) at (0,0) size 101x56 [border: (3px solid #0000FF)] [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (19,19) size 63x18
    1212                  text run at (19,19) width 63: "BEFORE"
  • trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.txt

    r94109 r95671  
    88          RenderText {#text} at (0,0) size 77x18
    99            text run at (0,0) width 77: "CONTENT"
    10         RenderTable at (19,37) size 52x18 [color=#000000]
     10        RenderTable at (19,37) size 52x18
    1111          RenderTableSection (anonymous) at (0,0) size 52x18
    12             RenderTableRow (anonymous) at (0,0) size 52x18 [color=#FF0000] [border: (3px solid #0000FF)]
     12            RenderTableRow (anonymous) at (0,0) size 52x18 [border: (3px solid #0000FF)]
    1313              RenderTableCell (anonymous) at (0,0) size 52x18 [r=0 c=0 rs=1 cs=1]
    1414                RenderText at (0,0) size 52x18
  • trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.txt

    r94109 r95671  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 784x74 [color=#FF0000] [border: (3px solid #008000)]
    7         RenderTable at (19,19) size 63x18 [color=#000000]
     7        RenderTable at (19,19) size 63x18
    88          RenderTableSection (anonymous) at (0,0) size 63x18
    9             RenderTableRow (anonymous) at (0,0) size 63x18 [color=#FF0000] [border: (3px solid #0000FF)]
     9            RenderTableRow (anonymous) at (0,0) size 63x18 [border: (3px solid #0000FF)]
    1010              RenderTableCell (anonymous) at (0,0) size 63x18 [r=0 c=0 rs=1 cs=1]
    1111                RenderText at (0,0) size 63x18
  • trunk/Source/WebCore/ChangeLog

    r95670 r95671  
     12011-09-21  Abhishek Arya  <inferno@chromium.org>
     2
     3        Not use anonymousContainer on beforeChild calculation
     4        and let later code handle it. Fix style update on block-level
     5        anonymous objects.
     6        https://bugs.webkit.org/show_bug.cgi?id=67656
     7
     8        Reviewed by David Hyatt.
     9
     10        Test: fast/table/quote-text-around-iframe.html
     11
     12        * rendering/RenderTable.cpp:
     13        (WebCore::RenderTable::addChild):
     14        * rendering/RenderTableCell.cpp:
     15        (WebCore::RenderTableCell::styleDidChange):
     16        * rendering/RenderTableRow.cpp:
     17        (WebCore::RenderTableRow::addChild):
     18        * rendering/RenderObject.cpp:
     19        (WebCore::RenderObject::propagateStyleToAnonymousChildren):
     20
    1212011-09-21  David Hyatt  <hyatt@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r95598 r95671  
    18891889    // FIXME: We could save this call when the change only affected non-inherited properties.
    18901890    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
    1891         if (blockChildrenOnly ? child->isAnonymousBlock() : child->isAnonymous() && !child->isBeforeOrAfterContent()) {
    1892             RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
    1893             if (style()->specifiesColumns()) {
    1894                 if (child->style()->specifiesColumns())
    1895                     newStyle->inheritColumnPropertiesFrom(style());
    1896                 if (child->style()->columnSpan())
    1897                     newStyle->setColumnSpan(true);
    1898             }
    1899             newStyle->setDisplay(blockChildrenOnly ? BLOCK : child->style()->display());
    1900             child->setStyle(newStyle.release());
    1901         }
     1891        if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO)
     1892            continue;
     1893
     1894        if (blockChildrenOnly && !child->isRenderBlock())
     1895            continue;
     1896
     1897#if ENABLE(FULLSCREEN_API)
     1898        if (child->isRenderFullScreen() || child->isRenderFullScreenPlaceholder())
     1899            continue;
     1900#endif
     1901
     1902        RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
     1903        if (style()->specifiesColumns()) {
     1904            if (child->style()->specifiesColumns())
     1905                newStyle->inheritColumnPropertiesFrom(style());
     1906            if (child->style()->columnSpan())
     1907                newStyle->setColumnSpan(true);
     1908        }
     1909        newStyle->setDisplay(child->style()->display());
     1910        child->setStyle(newStyle.release());
    19021911    }
    19031912}
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r95461 r95671  
    108108{
    109109    // Make sure we don't append things after :after-generated content if we have it.
    110     if (!beforeChild) {
    111         if (RenderObject* afterContentRenderer = findAfterContentRenderer())
    112             beforeChild = anonymousContainer(afterContentRenderer);
    113     }
     110    if (!beforeChild)
     111        beforeChild = findAfterContentRenderer();
    114112
    115113    bool wrapInAnonymousSection = !child->isPositioned();
  • trunk/Source/WebCore/rendering/RenderTableRow.cpp

    r95461 r95671  
    8484{
    8585    // Make sure we don't append things after :after-generated content if we have it.
    86     if (!beforeChild) {
    87         if (RenderObject* afterContentRenderer = findAfterContentRenderer())
    88             beforeChild = anonymousContainer(afterContentRenderer);
    89     }
     86    if (!beforeChild)
     87        beforeChild = findAfterContentRenderer();
    9088
    9189    if (!child->isTableCell()) {
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r95461 r95671  
    9999{
    100100    // Make sure we don't append things after :after-generated content if we have it.
    101     if (!beforeChild) {
    102         if (RenderObject* afterContentRenderer = findAfterContentRenderer())
    103             beforeChild = anonymousContainer(afterContentRenderer);
    104     }
     101    if (!beforeChild)
     102        beforeChild = findAfterContentRenderer();
    105103
    106104    if (!child->isTableRow()) {
Note: See TracChangeset for help on using the changeset viewer.