Changeset 191011 in webkit


Ignore:
Timestamp:
Oct 13, 2015 3:53:46 PM (8 years ago)
Author:
Alan Bujtas
Message:

Anonymous table objects: inline parent box requires inline-table child.
https://bugs.webkit.org/show_bug.cgi?id=150090

Reviewed by David Hyatt.

According to the CSS2.1 specification, if a child needs anonymous table wrapper
and the child's parent is an inline box, the generated table needs to be inline-table.
(inline-block and block parents generate non-inline table)

Import W3C CSS2.1 anonymous table tests.

Source/WebCore:

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::childRequiresTable):
(WebCore::RenderElement::addChild):

  • rendering/RenderElement.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::newChildIsInline):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::addChildToContinuation):

  • rendering/RenderInline.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::createAnonymousWithParentRenderer):

LayoutTests:

  • css2.1/tables/table-anonymous-objects-177.xht: Added.
  • css2.1/tables/table-anonymous-objects-178.xht: Added.
  • css2.1/tables/table-anonymous-objects-179.xht: Added.
  • css2.1/tables/table-anonymous-objects-180.xht: Added.
  • css2.1/tables/table-anonymous-objects-181.xht: Added.
  • css2.1/tables/table-anonymous-objects-189.xht: Added.
  • css2.1/tables/table-anonymous-objects-190.xht: Added.
  • css2.1/tables/table-anonymous-objects-191.xht: Added.
  • css2.1/tables/table-anonymous-objects-192.xht: Added.
  • css2.1/tables/table-anonymous-objects-193.xht: Added.
  • css2.1/tables/table-anonymous-objects-194.xht: Added.
  • css2.1/tables/table-anonymous-objects-195.xht: Added.
  • css2.1/tables/table-anonymous-objects-196.xht: Added.
  • css2.1/tables/table-anonymous-objects-205.xht: Added.
  • css2.1/tables/table-anonymous-objects-206.xht: Added.
  • css2.1/tables/table-anonymous-objects-207.xht: Added.
  • css2.1/tables/table-anonymous-objects-208.xht: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-177-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-178-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-179-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-180-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-181-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-189-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-190-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-191-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-192-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-193-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-194-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-195-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-196-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-205-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-206-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-207-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-208-expected.txt: Added.
Location:
trunk
Files:
34 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r191006 r191011  
     12015-10-13  Zalan Bujtas  <zalan@apple.com>
     2
     3        Anonymous table objects: inline parent box requires inline-table child.
     4        https://bugs.webkit.org/show_bug.cgi?id=150090
     5
     6        Reviewed by David Hyatt.
     7
     8        According to the CSS2.1 specification, if a child needs anonymous table wrapper
     9        and the child's parent is an inline box, the generated table needs to be inline-table.
     10        (inline-block and block parents generate non-inline table)
     11
     12        Import W3C CSS2.1 anonymous table tests.
     13
     14        * css2.1/tables/table-anonymous-objects-177.xht: Added.
     15        * css2.1/tables/table-anonymous-objects-178.xht: Added.
     16        * css2.1/tables/table-anonymous-objects-179.xht: Added.
     17        * css2.1/tables/table-anonymous-objects-180.xht: Added.
     18        * css2.1/tables/table-anonymous-objects-181.xht: Added.
     19        * css2.1/tables/table-anonymous-objects-189.xht: Added.
     20        * css2.1/tables/table-anonymous-objects-190.xht: Added.
     21        * css2.1/tables/table-anonymous-objects-191.xht: Added.
     22        * css2.1/tables/table-anonymous-objects-192.xht: Added.
     23        * css2.1/tables/table-anonymous-objects-193.xht: Added.
     24        * css2.1/tables/table-anonymous-objects-194.xht: Added.
     25        * css2.1/tables/table-anonymous-objects-195.xht: Added.
     26        * css2.1/tables/table-anonymous-objects-196.xht: Added.
     27        * css2.1/tables/table-anonymous-objects-205.xht: Added.
     28        * css2.1/tables/table-anonymous-objects-206.xht: Added.
     29        * css2.1/tables/table-anonymous-objects-207.xht: Added.
     30        * css2.1/tables/table-anonymous-objects-208.xht: Added.
     31        * platform/mac/css2.1/tables/table-anonymous-objects-177-expected.txt: Added.
     32        * platform/mac/css2.1/tables/table-anonymous-objects-178-expected.txt: Added.
     33        * platform/mac/css2.1/tables/table-anonymous-objects-179-expected.txt: Added.
     34        * platform/mac/css2.1/tables/table-anonymous-objects-180-expected.txt: Added.
     35        * platform/mac/css2.1/tables/table-anonymous-objects-181-expected.txt: Added.
     36        * platform/mac/css2.1/tables/table-anonymous-objects-189-expected.txt: Added.
     37        * platform/mac/css2.1/tables/table-anonymous-objects-190-expected.txt: Added.
     38        * platform/mac/css2.1/tables/table-anonymous-objects-191-expected.txt: Added.
     39        * platform/mac/css2.1/tables/table-anonymous-objects-192-expected.txt: Added.
     40        * platform/mac/css2.1/tables/table-anonymous-objects-193-expected.txt: Added.
     41        * platform/mac/css2.1/tables/table-anonymous-objects-194-expected.txt: Added.
     42        * platform/mac/css2.1/tables/table-anonymous-objects-195-expected.txt: Added.
     43        * platform/mac/css2.1/tables/table-anonymous-objects-196-expected.txt: Added.
     44        * platform/mac/css2.1/tables/table-anonymous-objects-205-expected.txt: Added.
     45        * platform/mac/css2.1/tables/table-anonymous-objects-206-expected.txt: Added.
     46        * platform/mac/css2.1/tables/table-anonymous-objects-207-expected.txt: Added.
     47        * platform/mac/css2.1/tables/table-anonymous-objects-208-expected.txt: Added.
     48
    1492015-10-13  Ryan Haddad  <ryanhaddad@apple.com>
    250
  • trunk/LayoutTests/fast/block/float/float-not-removed-from-pre-block-expected.txt

    r143060 r191011  
    11Bug 101970: Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
    22Test passes if it does not crash.
    3  
     3   
  • trunk/LayoutTests/platform/mac/fast/dynamic/insert-before-table-part-in-continuation-expected.txt

    r177774 r191011  
    1 layer at (0,0) size 785x678
    2   RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x678
    4   RenderBlock {HTML} at (0,0) size 785x678
    5     RenderBody {BODY} at (8,8) size 769x662
    6       RenderBlock {P} at (0,0) size 769x18
     1layer at (0,0) size 800x600
     2  RenderView at (0,0) size 800x600
     3layer at (0,0) size 800x600
     4  RenderBlock {HTML} at (0,0) size 800x600
     5    RenderBody {BODY} at (8,8) size 784x584
     6      RenderBlock {P} at (0,0) size 784x18
    77        RenderText {#text} at (0,0) size 54x18
    88          text run at (0,0) width 54: "Test for "
     
    1616        RenderText {#text} at (690,0) size 5x18
    1717          text run at (690,0) width 5: "."
    18       RenderBlock {P} at (0,34) size 769x72
    19         RenderText {#text} at (0,0) size 766x72
    20           text run at (0,0) width 686: "The test sets up an inline parent with a child that is some kind of table part. The child gets broken off into a"
    21           text run at (0,18) width 742: "continuation and anonymous table parts get created below and/or above the table parts. Then the test tries to insert a"
    22           text run at (0,36) width 766: "new child into the inline, specifying the table part as the \"before child\". The resulting render tree should look just like it"
    23           text run at (0,54) width 238: "would look if the parent was a block."
    24       RenderBlock {DIV} at (0,122) size 769x36
    25         RenderBlock (anonymous) at (0,0) size 769x18
    26           RenderInline {SPAN} at (0,0) size 129x18
    27             RenderText {#text} at (0,0) size 41x18
    28               text run at (0,0) width 41: "Text..."
    29             RenderText {#text} at (40,0) size 89x18
    30               text run at (40,0) width 89: "goes here and"
    31         RenderBlock (anonymous) at (0,18) size 769x18
    32           RenderTable at (0,0) size 105x18
     18      RenderBlock {P} at (0,34) size 784x72
     19        RenderText {#text} at (0,0) size 778x72
     20          text run at (0,0) width 770: "The test sets up an inline parent with a child that is some kind of table part. The child gets broken off into a continuation"
     21          text run at (0,18) width 778: "and anonymous table parts get created below and/or above the table parts. Then the test tries to insert a new child into the"
     22          text run at (0,36) width 760: "inline, specifying the table part as the \"before child\". The resulting render tree should look just like it would look if the"
     23          text run at (0,54) width 124: "parent was a block."
     24      RenderBlock {DIV} at (0,122) size 784x18
     25        RenderInline {SPAN} at (0,0) size 234x18
     26          RenderText {#text} at (0,0) size 41x18
     27            text run at (0,0) width 41: "Text..."
     28          RenderText {#text} at (40,0) size 89x18
     29            text run at (40,0) width 89: "goes here and"
     30          RenderTable at (128,0) size 106x18
    3331            RenderTableSection (anonymous) at (0,0) size 105x18
    3432              RenderTableRow (anonymous) at (0,0) size 105x18
     
    3634                  RenderText {#text} at (0,0) size 105x18
    3735                    text run at (0,0) width 105: "...continues here"
    38         RenderBlock (anonymous) at (0,36) size 769x0
    39           RenderInline {SPAN} at (0,0) size 0x0
    40       RenderBlock {DIV} at (0,158) size 769x36
    41         RenderBlock (anonymous) at (0,0) size 769x18
    42           RenderInline {SPAN} at (0,0) size 41x18
    43             RenderText {#text} at (0,0) size 41x18
    44               text run at (0,0) width 41: "Text..."
    45         RenderBlock (anonymous) at (0,18) size 769x18
    46           RenderTable at (0,0) size 106x18
     36      RenderBlock {DIV} at (0,140) size 784x18
     37        RenderInline {SPAN} at (0,0) size 147x18
     38          RenderText {#text} at (0,0) size 41x18
     39            text run at (0,0) width 41: "Text..."
     40          RenderTable at (40,0) size 107x18
    4741            RenderTableSection (anonymous) at (0,0) size 106x18
    4842              RenderTableRow (anonymous) at (0,0) size 106x18
     
    5145                  RenderText {#text} at (0,0) size 105x18
    5246                    text run at (0,0) width 105: "...continues here"
    53         RenderBlock (anonymous) at (0,36) size 769x0
    54           RenderInline {SPAN} at (0,0) size 0x0
    55       RenderBlock {DIV} at (0,194) size 769x36
    56         RenderBlock (anonymous) at (0,0) size 769x18
     47      RenderBlock {DIV} at (0,158) size 784x22
     48        RenderInline {SPAN} at (0,0) size 146x18
     49          RenderText {#text} at (0,4) size 41x18
     50            text run at (0,4) width 41: "Text..."
     51          RenderTable at (40,0) size 106x18
     52            RenderTableSection (anonymous) at (0,0) size 105x18
     53              RenderTableRow {TR} at (0,0) size 105x0
     54              RenderTableRow (anonymous) at (0,0) size 105x18
     55                RenderTableCell {DIV} at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
     56                  RenderText {#text} at (0,0) size 105x18
     57                    text run at (0,0) width 105: "...continues here"
     58      RenderBlock {DIV} at (0,180) size 784x18
     59        RenderInline {SPAN} at (0,0) size 146x18
     60          RenderText {#text} at (0,0) size 41x18
     61            text run at (0,0) width 41: "Text..."
     62          RenderInline {SPAN} at (0,0) size 1x18
     63          RenderTable at (40,0) size 106x18
     64            RenderTableSection (anonymous) at (0,0) size 105x18
     65              RenderTableRow (anonymous) at (0,0) size 105x18
     66                RenderTableCell {DIV} at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     67                  RenderText {#text} at (0,0) size 105x18
     68                    text run at (0,0) width 105: "...continues here"
     69      RenderBlock {DIV} at (0,198) size 784x36
     70        RenderBlock (anonymous) at (0,0) size 784x18
    5771          RenderInline {SPAN} at (0,0) size 41x18
    5872            RenderText {#text} at (0,0) size 41x18
    5973              text run at (0,0) width 41: "Text..."
    60         RenderBlock (anonymous) at (0,18) size 769x18
    61           RenderTable at (0,0) size 105x18
     74        RenderBlock (anonymous) at (0,18) size 784x0
     75          RenderBlock {DIV} at (0,0) size 784x0
     76        RenderBlock (anonymous) at (0,18) size 784x18
     77          RenderInline {SPAN} at (0,0) size 105x18
     78            RenderTable at (0,0) size 105x18
     79              RenderTableSection (anonymous) at (0,0) size 105x18
     80                RenderTableRow (anonymous) at (0,0) size 105x18
     81                  RenderTableCell {DIV} at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     82                    RenderText {#text} at (0,0) size 105x18
     83                      text run at (0,0) width 105: "...continues here"
     84      RenderBlock {DIV} at (0,234) size 784x18
     85        RenderInline {SPAN} at (0,0) size 234x18
     86          RenderText {#text} at (0,0) size 41x18
     87            text run at (0,0) width 41: "Text..."
     88          RenderText {#text} at (40,0) size 89x18
     89            text run at (40,0) width 89: "goes here and"
     90          RenderTable at (128,0) size 106x18
     91            RenderTableSection (anonymous) at (0,0) size 105x18
     92              RenderTableRow {DIV} at (0,0) size 105x18
     93                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     94                  RenderText {#text} at (0,0) size 105x18
     95                    text run at (0,0) width 105: "...continues here"
     96      RenderBlock {DIV} at (0,252) size 784x22
     97        RenderInline {SPAN} at (0,0) size 146x18
     98          RenderText {#text} at (0,4) size 41x18
     99            text run at (0,4) width 41: "Text..."
     100          RenderTable at (40,0) size 106x18
     101            RenderTableSection (anonymous) at (0,0) size 105x18
     102              RenderTableRow (anonymous) at (0,0) size 105x0
     103                RenderTableCell {TD} at (0,0) size 105x0 [r=0 c=0 rs=1 cs=1]
     104              RenderTableRow {DIV} at (0,0) size 105x18
     105                RenderTableCell (anonymous) at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
     106                  RenderText {#text} at (0,0) size 105x18
     107                    text run at (0,0) width 105: "...continues here"
     108      RenderBlock {DIV} at (0,274) size 784x22
     109        RenderInline {SPAN} at (0,0) size 146x18
     110          RenderText {#text} at (0,4) size 41x18
     111            text run at (0,4) width 41: "Text..."
     112          RenderTable at (40,0) size 106x18
    62113            RenderTableSection (anonymous) at (0,0) size 105x18
    63114              RenderTableRow {TR} at (0,0) size 105x0
    64               RenderTableRow (anonymous) at (0,0) size 105x18
    65                 RenderTableCell {DIV} at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
    66                   RenderText {#text} at (0,0) size 105x18
    67                     text run at (0,0) width 105: "...continues here"
    68         RenderBlock (anonymous) at (0,36) size 769x0
    69           RenderInline {SPAN} at (0,0) size 0x0
    70       RenderBlock {DIV} at (0,230) size 769x36
    71         RenderBlock (anonymous) at (0,0) size 769x18
     115              RenderTableRow {DIV} at (0,0) size 105x18
     116                RenderTableCell (anonymous) at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
     117                  RenderText {#text} at (0,0) size 105x18
     118                    text run at (0,0) width 105: "...continues here"
     119      RenderBlock {DIV} at (0,296) size 784x18
     120        RenderInline {SPAN} at (0,0) size 146x18
     121          RenderText {#text} at (0,0) size 41x18
     122            text run at (0,0) width 41: "Text..."
     123          RenderInline {SPAN} at (0,0) size 1x18
     124          RenderTable at (40,0) size 106x18
     125            RenderTableSection (anonymous) at (0,0) size 105x18
     126              RenderTableRow {DIV} at (0,0) size 105x18
     127                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     128                  RenderText {#text} at (0,0) size 105x18
     129                    text run at (0,0) width 105: "...continues here"
     130      RenderBlock {DIV} at (0,314) size 784x36
     131        RenderBlock (anonymous) at (0,0) size 784x18
    72132          RenderInline {SPAN} at (0,0) size 41x18
    73133            RenderText {#text} at (0,0) size 41x18
    74134              text run at (0,0) width 41: "Text..."
    75             RenderInline {SPAN} at (0,0) size 1x18
    76         RenderBlock (anonymous) at (0,18) size 769x18
    77           RenderTable at (0,0) size 105x18
    78             RenderTableSection (anonymous) at (0,0) size 105x18
    79               RenderTableRow (anonymous) at (0,0) size 105x18
    80                 RenderTableCell {DIV} at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    81                   RenderText {#text} at (0,0) size 105x18
    82                     text run at (0,0) width 105: "...continues here"
    83         RenderBlock (anonymous) at (0,36) size 769x0
    84           RenderInline {SPAN} at (0,0) size 0x0
    85       RenderBlock {DIV} at (0,266) size 769x36
    86         RenderBlock (anonymous) at (0,0) size 769x18
     135        RenderBlock (anonymous) at (0,18) size 784x0
     136          RenderBlock {DIV} at (0,0) size 784x0
     137        RenderBlock (anonymous) at (0,18) size 784x18
     138          RenderInline {SPAN} at (0,0) size 105x18
     139            RenderTable at (0,0) size 105x18
     140              RenderTableSection (anonymous) at (0,0) size 105x18
     141                RenderTableRow {DIV} at (0,0) size 105x18
     142                  RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     143                    RenderText {#text} at (0,0) size 105x18
     144                      text run at (0,0) width 105: "...continues here"
     145      RenderBlock {DIV} at (0,350) size 784x18
     146        RenderInline {SPAN} at (0,0) size 234x18
     147          RenderText {#text} at (0,0) size 41x18
     148            text run at (0,0) width 41: "Text..."
     149          RenderText {#text} at (40,0) size 89x18
     150            text run at (40,0) width 89: "goes here and"
     151          RenderTable at (128,0) size 106x18
     152            RenderTableSection {DIV} at (0,0) size 105x18
     153              RenderTableRow (anonymous) at (0,0) size 105x18
     154                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     155                  RenderText {#text} at (0,0) size 105x18
     156                    text run at (0,0) width 105: "...continues here"
     157      RenderBlock {DIV} at (0,368) size 784x22
     158        RenderInline {SPAN} at (0,0) size 146x18
     159          RenderText {#text} at (0,4) size 41x18
     160            text run at (0,4) width 41: "Text..."
     161          RenderTable at (40,0) size 106x18
     162            RenderTableSection (anonymous) at (0,0) size 105x0
     163              RenderTableRow (anonymous) at (0,0) size 105x0
     164                RenderTableCell {TD} at (0,0) size 105x0 [r=0 c=0 rs=1 cs=1]
     165            RenderTableSection {DIV} at (0,0) size 105x18
     166              RenderTableRow (anonymous) at (0,0) size 105x18
     167                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     168                  RenderText {#text} at (0,0) size 105x18
     169                    text run at (0,0) width 105: "...continues here"
     170      RenderBlock {DIV} at (0,390) size 784x22
     171        RenderInline {SPAN} at (0,0) size 146x18
     172          RenderText {#text} at (0,4) size 41x18
     173            text run at (0,4) width 41: "Text..."
     174          RenderTable at (40,0) size 106x18
     175            RenderTableSection (anonymous) at (0,0) size 105x0
     176              RenderTableRow {TR} at (0,0) size 105x0
     177            RenderTableSection {DIV} at (0,0) size 105x18
     178              RenderTableRow (anonymous) at (0,0) size 105x18
     179                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     180                  RenderText {#text} at (0,0) size 105x18
     181                    text run at (0,0) width 105: "...continues here"
     182      RenderBlock {DIV} at (0,412) size 784x18
     183        RenderInline {SPAN} at (0,0) size 146x18
     184          RenderText {#text} at (0,0) size 41x18
     185            text run at (0,0) width 41: "Text..."
     186          RenderInline {SPAN} at (0,0) size 1x18
     187          RenderTable at (40,0) size 106x18
     188            RenderTableSection {DIV} at (0,0) size 105x18
     189              RenderTableRow (anonymous) at (0,0) size 105x18
     190                RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     191                  RenderText {#text} at (0,0) size 105x18
     192                    text run at (0,0) width 105: "...continues here"
     193      RenderBlock {DIV} at (0,430) size 784x36
     194        RenderBlock (anonymous) at (0,0) size 784x18
    87195          RenderInline {SPAN} at (0,0) size 41x18
    88196            RenderText {#text} at (0,0) size 41x18
    89197              text run at (0,0) width 41: "Text..."
    90         RenderBlock (anonymous) at (0,18) size 769x18
    91           RenderBlock {DIV} at (0,0) size 769x0
    92           RenderTable at (0,0) size 105x18
    93             RenderTableSection (anonymous) at (0,0) size 105x18
    94               RenderTableRow (anonymous) at (0,0) size 105x18
    95                 RenderTableCell {DIV} at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    96                   RenderText {#text} at (0,0) size 105x18
    97                     text run at (0,0) width 105: "...continues here"
    98         RenderBlock (anonymous) at (0,36) size 769x0
    99           RenderInline {SPAN} at (0,0) size 0x0
    100       RenderBlock {DIV} at (0,302) size 769x36
    101         RenderBlock (anonymous) at (0,0) size 769x18
    102           RenderInline {SPAN} at (0,0) size 129x18
    103             RenderText {#text} at (0,0) size 41x18
    104               text run at (0,0) width 41: "Text..."
    105             RenderText {#text} at (40,0) size 89x18
    106               text run at (40,0) width 89: "goes here and"
    107         RenderBlock (anonymous) at (0,18) size 769x18
    108           RenderTable at (0,0) size 105x18
    109             RenderTableSection (anonymous) at (0,0) size 105x18
    110               RenderTableRow {DIV} at (0,0) size 105x18
    111                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    112                   RenderText {#text} at (0,0) size 105x18
    113                     text run at (0,0) width 105: "...continues here"
    114         RenderBlock (anonymous) at (0,36) size 769x0
    115           RenderInline {SPAN} at (0,0) size 0x0
    116       RenderBlock {DIV} at (0,338) size 769x36
    117         RenderBlock (anonymous) at (0,0) size 769x18
    118           RenderInline {SPAN} at (0,0) size 41x18
    119             RenderText {#text} at (0,0) size 41x18
    120               text run at (0,0) width 41: "Text..."
    121         RenderBlock (anonymous) at (0,18) size 769x18
    122           RenderTable at (0,0) size 105x18
    123             RenderTableSection (anonymous) at (0,0) size 105x18
    124               RenderTableRow (anonymous) at (0,0) size 105x0
    125                 RenderTableCell {TD} at (0,0) size 105x0 [r=0 c=0 rs=1 cs=1]
    126               RenderTableRow {DIV} at (0,0) size 105x18
    127                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
    128                   RenderText {#text} at (0,0) size 105x18
    129                     text run at (0,0) width 105: "...continues here"
    130         RenderBlock (anonymous) at (0,36) size 769x0
    131           RenderInline {SPAN} at (0,0) size 0x0
    132       RenderBlock {DIV} at (0,374) size 769x36
    133         RenderBlock (anonymous) at (0,0) size 769x18
    134           RenderInline {SPAN} at (0,0) size 41x18
    135             RenderText {#text} at (0,0) size 41x18
    136               text run at (0,0) width 41: "Text..."
    137         RenderBlock (anonymous) at (0,18) size 769x18
    138           RenderTable at (0,0) size 105x18
    139             RenderTableSection (anonymous) at (0,0) size 105x18
    140               RenderTableRow {TR} at (0,0) size 105x0
    141               RenderTableRow {DIV} at (0,0) size 105x18
    142                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=1 c=0 rs=1 cs=1]
    143                   RenderText {#text} at (0,0) size 105x18
    144                     text run at (0,0) width 105: "...continues here"
    145         RenderBlock (anonymous) at (0,36) size 769x0
    146           RenderInline {SPAN} at (0,0) size 0x0
    147       RenderBlock {DIV} at (0,410) size 769x36
    148         RenderBlock (anonymous) at (0,0) size 769x18
    149           RenderInline {SPAN} at (0,0) size 41x18
    150             RenderText {#text} at (0,0) size 41x18
    151               text run at (0,0) width 41: "Text..."
    152             RenderInline {SPAN} at (0,0) size 1x18
    153         RenderBlock (anonymous) at (0,18) size 769x18
    154           RenderTable at (0,0) size 105x18
    155             RenderTableSection (anonymous) at (0,0) size 105x18
    156               RenderTableRow {DIV} at (0,0) size 105x18
    157                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    158                   RenderText {#text} at (0,0) size 105x18
    159                     text run at (0,0) width 105: "...continues here"
    160         RenderBlock (anonymous) at (0,36) size 769x0
    161           RenderInline {SPAN} at (0,0) size 0x0
    162       RenderBlock {DIV} at (0,446) size 769x36
    163         RenderBlock (anonymous) at (0,0) size 769x18
    164           RenderInline {SPAN} at (0,0) size 41x18
    165             RenderText {#text} at (0,0) size 41x18
    166               text run at (0,0) width 41: "Text..."
    167         RenderBlock (anonymous) at (0,18) size 769x18
    168           RenderBlock {DIV} at (0,0) size 769x0
    169           RenderTable at (0,0) size 105x18
    170             RenderTableSection (anonymous) at (0,0) size 105x18
    171               RenderTableRow {DIV} at (0,0) size 105x18
    172                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    173                   RenderText {#text} at (0,0) size 105x18
    174                     text run at (0,0) width 105: "...continues here"
    175         RenderBlock (anonymous) at (0,36) size 769x0
    176           RenderInline {SPAN} at (0,0) size 0x0
    177       RenderBlock {DIV} at (0,482) size 769x36
    178         RenderBlock (anonymous) at (0,0) size 769x18
    179           RenderInline {SPAN} at (0,0) size 129x18
    180             RenderText {#text} at (0,0) size 41x18
    181               text run at (0,0) width 41: "Text..."
    182             RenderText {#text} at (40,0) size 89x18
    183               text run at (40,0) width 89: "goes here and"
    184         RenderBlock (anonymous) at (0,18) size 769x18
    185           RenderTable at (0,0) size 105x18
    186             RenderTableSection {DIV} at (0,0) size 105x18
    187               RenderTableRow (anonymous) at (0,0) size 105x18
    188                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    189                   RenderText {#text} at (0,0) size 105x18
    190                     text run at (0,0) width 105: "...continues here"
    191         RenderBlock (anonymous) at (0,36) size 769x0
    192           RenderInline {SPAN} at (0,0) size 0x0
    193       RenderBlock {DIV} at (0,518) size 769x36
    194         RenderBlock (anonymous) at (0,0) size 769x18
    195           RenderInline {SPAN} at (0,0) size 41x18
    196             RenderText {#text} at (0,0) size 41x18
    197               text run at (0,0) width 41: "Text..."
    198         RenderBlock (anonymous) at (0,18) size 769x18
    199           RenderTable at (0,0) size 105x18
    200             RenderTableSection (anonymous) at (0,0) size 105x0
    201               RenderTableRow (anonymous) at (0,0) size 105x0
    202                 RenderTableCell {TD} at (0,0) size 105x0 [r=0 c=0 rs=1 cs=1]
    203             RenderTableSection {DIV} at (0,0) size 105x18
    204               RenderTableRow (anonymous) at (0,0) size 105x18
    205                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    206                   RenderText {#text} at (0,0) size 105x18
    207                     text run at (0,0) width 105: "...continues here"
    208         RenderBlock (anonymous) at (0,36) size 769x0
    209           RenderInline {SPAN} at (0,0) size 0x0
    210       RenderBlock {DIV} at (0,554) size 769x36
    211         RenderBlock (anonymous) at (0,0) size 769x18
    212           RenderInline {SPAN} at (0,0) size 41x18
    213             RenderText {#text} at (0,0) size 41x18
    214               text run at (0,0) width 41: "Text..."
    215         RenderBlock (anonymous) at (0,18) size 769x18
    216           RenderTable at (0,0) size 105x18
    217             RenderTableSection (anonymous) at (0,0) size 105x0
    218               RenderTableRow {TR} at (0,0) size 105x0
    219             RenderTableSection {DIV} at (0,0) size 105x18
    220               RenderTableRow (anonymous) at (0,0) size 105x18
    221                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    222                   RenderText {#text} at (0,0) size 105x18
    223                     text run at (0,0) width 105: "...continues here"
    224         RenderBlock (anonymous) at (0,36) size 769x0
    225           RenderInline {SPAN} at (0,0) size 0x0
    226       RenderBlock {DIV} at (0,590) size 769x36
    227         RenderBlock (anonymous) at (0,0) size 769x18
    228           RenderInline {SPAN} at (0,0) size 41x18
    229             RenderText {#text} at (0,0) size 41x18
    230               text run at (0,0) width 41: "Text..."
    231             RenderInline {SPAN} at (0,0) size 1x18
    232         RenderBlock (anonymous) at (0,18) size 769x18
    233           RenderTable at (0,0) size 105x18
    234             RenderTableSection {DIV} at (0,0) size 105x18
    235               RenderTableRow (anonymous) at (0,0) size 105x18
    236                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    237                   RenderText {#text} at (0,0) size 105x18
    238                     text run at (0,0) width 105: "...continues here"
    239         RenderBlock (anonymous) at (0,36) size 769x0
    240           RenderInline {SPAN} at (0,0) size 0x0
    241       RenderBlock {DIV} at (0,626) size 769x36
    242         RenderBlock (anonymous) at (0,0) size 769x18
    243           RenderInline {SPAN} at (0,0) size 41x18
    244             RenderText {#text} at (0,0) size 41x18
    245               text run at (0,0) width 41: "Text..."
    246         RenderBlock (anonymous) at (0,18) size 769x18
    247           RenderBlock {DIV} at (0,0) size 769x0
    248           RenderTable at (0,0) size 105x18
    249             RenderTableSection {DIV} at (0,0) size 105x18
    250               RenderTableRow (anonymous) at (0,0) size 105x18
    251                 RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
    252                   RenderText {#text} at (0,0) size 105x18
    253                     text run at (0,0) width 105: "...continues here"
    254         RenderBlock (anonymous) at (0,36) size 769x0
    255           RenderInline {SPAN} at (0,0) size 0x0
     198        RenderBlock (anonymous) at (0,18) size 784x0
     199          RenderBlock {DIV} at (0,0) size 784x0
     200        RenderBlock (anonymous) at (0,18) size 784x18
     201          RenderInline {SPAN} at (0,0) size 105x18
     202            RenderTable at (0,0) size 105x18
     203              RenderTableSection {DIV} at (0,0) size 105x18
     204                RenderTableRow (anonymous) at (0,0) size 105x18
     205                  RenderTableCell (anonymous) at (0,0) size 105x18 [r=0 c=0 rs=1 cs=1]
     206                    RenderText {#text} at (0,0) size 105x18
     207                      text run at (0,0) width 105: "...continues here"
  • trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug3037-1-expected.txt

    r123779 r191011  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderBlock (anonymous) at (0,0) size 784x0
    7         RenderInline {WINDOW} at (0,0) size 0x0
     6      RenderInline {WINDOW} at (0,0) size 34x18
     7        RenderText {#text} at (0,0) size 0x0
     8        RenderInline {WINDOW} at (0,0) size 34x18
    89          RenderText {#text} at (0,0) size 0x0
    9           RenderInline {WINDOW} at (0,0) size 0x0
     10          RenderInline {WINDOW} at (0,0) size 34x18
    1011            RenderText {#text} at (0,0) size 0x0
    11             RenderInline {WINDOW} at (0,0) size 0x0
     12            RenderInline {XUL:TOOLBOX} at (0,0) size 34x18
    1213              RenderText {#text} at (0,0) size 0x0
    13               RenderInline {XUL:TOOLBOX} at (0,0) size 0x0
     14              RenderInline {XUL:TOOLBAR} at (0,0) size 34x18
    1415                RenderText {#text} at (0,0) size 0x0
    15                 RenderInline {XUL:TOOLBAR} at (0,0) size 0x0
    16                   RenderText {#text} at (0,0) size 0x0
    17       RenderBlock (anonymous) at (0,0) size 784x18
    18         RenderTable at (0,0) size 34x18
    19           RenderTableSection (anonymous) at (0,0) size 34x18
    20             RenderTableRow (anonymous) at (0,0) size 34x18
    21               RenderTableCell {HTML:SPAN} at (0,0) size 33x18 [r=0 c=0 rs=1 cs=1]
    22                 RenderInline {HTML:BUTTON} at (0,0) size 33x18 [bgcolor=#C0C0C0]
    23                   RenderText {#text} at (0,0) size 0x0
    24                   RenderInline {HTML:IMG} at (0,0) size 33x18
    25                     RenderInline {HTML:BR} at (0,0) size 33x18
    26                       RenderText {#text} at (0,0) size 33x18
    27                         text run at (0,0) width 33: "Back"
    28                 RenderText {#text} at (0,0) size 0x0
    29               RenderTableCell {HTML:SPAN} at (33,0) size 1x0 [r=0 c=1 rs=1 cs=1]
    30                 RenderInline {HTML:INPUT} at (0,0) size 0x0
    31                 RenderText {#text} at (0,0) size 0x0
    32       RenderBlock (anonymous) at (0,18) size 784x0
    33         RenderInline {WINDOW} at (0,0) size 0x0
    34           RenderInline {WINDOW} at (0,0) size 0x0
    35             RenderInline {WINDOW} at (0,0) size 0x0
    36               RenderInline {XUL:TOOLBOX} at (0,0) size 0x0
    37                 RenderInline {XUL:TOOLBAR} at (0,0) size 0x0
    38                 RenderText {#text} at (0,0) size 0x0
     16                RenderTable at (0,0) size 34x18
     17                  RenderTableSection (anonymous) at (0,0) size 34x18
     18                    RenderTableRow (anonymous) at (0,0) size 34x18
     19                      RenderTableCell {HTML:SPAN} at (0,0) size 33x18 [r=0 c=0 rs=1 cs=1]
     20                        RenderInline {HTML:BUTTON} at (0,0) size 33x18 [bgcolor=#C0C0C0]
     21                          RenderText {#text} at (0,0) size 0x0
     22                          RenderInline {HTML:IMG} at (0,0) size 33x18
     23                            RenderInline {HTML:BR} at (0,0) size 33x18
     24                              RenderText {#text} at (0,0) size 33x18
     25                                text run at (0,0) width 33: "Back"
     26                        RenderText {#text} at (0,0) size 0x0
     27                      RenderTableCell {HTML:SPAN} at (33,0) size 1x0 [r=0 c=1 rs=1 cs=1]
     28                        RenderInline {HTML:INPUT} at (0,0) size 0x0
     29                        RenderText {#text} at (0,0) size 0x0
    3930              RenderText {#text} at (0,0) size 0x0
    4031            RenderText {#text} at (0,0) size 0x0
     32          RenderText {#text} at (0,0) size 0x0
  • trunk/Source/WebCore/ChangeLog

    r191008 r191011  
     12015-10-13  Zalan Bujtas  <zalan@apple.com>
     2
     3        Anonymous table objects: inline parent box requires inline-table child.
     4        https://bugs.webkit.org/show_bug.cgi?id=150090
     5
     6        Reviewed by David Hyatt.
     7
     8        According to the CSS2.1 specification, if a child needs anonymous table wrapper
     9        and the child's parent is an inline box, the generated table needs to be inline-table.
     10        (inline-block and block parents generate non-inline table)
     11
     12        Import W3C CSS2.1 anonymous table tests.
     13
     14        * rendering/RenderElement.cpp:
     15        (WebCore::RenderElement::childRequiresTable):
     16        (WebCore::RenderElement::addChild):
     17        * rendering/RenderElement.h:
     18        * rendering/RenderInline.cpp:
     19        (WebCore::RenderInline::newChildIsInline):
     20        (WebCore::RenderInline::addChildIgnoringContinuation):
     21        (WebCore::RenderInline::addChildToContinuation):
     22        * rendering/RenderInline.h:
     23        * rendering/RenderTable.cpp:
     24        (WebCore::RenderTable::createAnonymousWithParentRenderer):
     25
    1262015-10-13  Dean Jackson  <dino@apple.com>
    227
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r190834 r191011  
    489489}
    490490
     491bool RenderElement::childRequiresTable(const RenderObject& child) const
     492{
     493    if (is<RenderTableCol>(child)) {
     494        const RenderTableCol& newTableColumn = downcast<RenderTableCol>(child);
     495        bool isColumnInColumnGroup = newTableColumn.isTableColumn() && is<RenderTableCol>(*this);
     496        return !is<RenderTable>(*this) && !isColumnInColumnGroup;
     497    }
     498    if (is<RenderTableCaption>(child))
     499        return !is<RenderTable>(*this);
     500
     501    if (is<RenderTableSection>(child))
     502        return !is<RenderTable>(*this);
     503
     504    if (is<RenderTableRow>(child))
     505        return !is<RenderTableSection>(*this);
     506
     507    if (is<RenderTableCell>(child))
     508        return !is<RenderTableRow>(*this);
     509
     510    return false;
     511}
     512
    491513void RenderElement::addChild(RenderObject* newChild, RenderObject* beforeChild)
    492514{
    493     bool needsTable = false;
    494 
    495     if (is<RenderTableCol>(*newChild)) {
    496         RenderTableCol& newTableColumn = downcast<RenderTableCol>(*newChild);
    497         bool isColumnInColumnGroup = newTableColumn.isTableColumn() && is<RenderTableCol>(*this);
    498         needsTable = !is<RenderTable>(*this) && !isColumnInColumnGroup;
    499     } else if (is<RenderTableCaption>(*newChild))
    500         needsTable = !is<RenderTable>(*this);
    501     else if (is<RenderTableSection>(*newChild))
    502         needsTable = !is<RenderTable>(*this);
    503     else if (is<RenderTableRow>(*newChild))
    504         needsTable = !is<RenderTableSection>(*this);
    505     else if (is<RenderTableCell>(*newChild))
    506         needsTable = !is<RenderTableRow>(*this);
    507 
    508     if (needsTable) {
     515    if (childRequiresTable(*newChild)) {
    509516        RenderTable* table;
    510517        RenderObject* afterChild = beforeChild ? beforeChild->previousSibling() : m_lastChild;
  • trunk/Source/WebCore/rendering/RenderElement.h

    r190834 r191011  
    212212    void drawLineForBoxSide(GraphicsContext&, const FloatRect&, BoxSide, Color, EBorderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias = false) const;
    213213
     214    bool childRequiresTable(const RenderObject& child) const;
     215
    214216protected:
    215217    enum BaseTypeFlags {
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r191002 r191011  
    299299}
    300300
     301static bool newChildIsInline(const RenderObject& newChild, const RenderInline& parent)
     302{
     303    // inline parent generates inline-table.
     304    return newChild.isInline() | (parent.childRequiresTable(newChild) && parent.style().display() == INLINE);
     305}
     306
    301307void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild)
    302308{
     
    306312   
    307313    bool useNewBlockInsideInlineModel = document().settings()->newBlockInsideInlineModelEnabled();
    308    
     314    bool childInline = newChildIsInline(*newChild, *this);
    309315    // This code is for the old block-inside-inline model that uses continuations.
    310     if (!useNewBlockInsideInlineModel && !newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned()) {
     316    if (!useNewBlockInsideInlineModel && !childInline && !newChild->isFloatingOrOutOfFlowPositioned()) {
    311317        // We are placing a block inside an inline. We have to perform a split of this
    312318        // inline into continuations.  This involves creating an anonymous block box to hold
     
    346352        ASSERT(beforeChild->parent()->isAnonymousInlineBlock() || beforeChild->parent()->isAnonymousBlock());
    347353        if (beforeChild->parent()->isAnonymousInlineBlock()) {
    348             if (!newChild->isInline() || (newChild->isInline() && beforeChild->parent()->firstChild() != beforeChild))
     354            if (!childInline || (childInline && beforeChild->parent()->firstChild() != beforeChild))
    349355                beforeChild->parent()->addChild(newChild, beforeChild);
    350356            else
     
    352358        } else if (beforeChild->parent()->isAnonymousBlock()) {
    353359            ASSERT(!beforeChild->parent()->parent() || beforeChild->parent()->parent()->isAnonymousInlineBlock());
    354             ASSERT(beforeChild->isInline());
    355             if (newChild->isInline() || (!newChild->isInline() && beforeChild->parent()->firstChild() != beforeChild))
     360            ASSERT(childInline);
     361            if (childInline || (!childInline && beforeChild->parent()->firstChild() != beforeChild))
    356362                beforeChild->parent()->addChild(newChild, beforeChild);
    357363            else
     
    361367    }
    362368
    363     if (!newChild->isInline()) {
     369    if (!childInline) {
    364370        // We are placing a block inside an inline. We have to place the block inside an anonymous inline-block.
    365371        // This inline-block can house a sequence of contiguous block-level children, and they will all sit on the
     
    580586    // A continuation always consists of two potential candidates: an inline or an anonymous
    581587    // block box holding block children.
    582     bool childInline = newChild->isInline();
     588    bool childInline = newChildIsInline(*newChild, *this);
    583589    bool bcpInline = beforeChildParent->isInline();
    584590    bool flowInline = flow->isInline();
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r190834 r191011  
    15311531RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
    15321532{
    1533     auto table = new RenderTable(parent->document(), RenderStyle::createAnonymousStyleWithDisplay(&parent->style(), TABLE));
     1533    auto table = new RenderTable(parent->document(), RenderStyle::createAnonymousStyleWithDisplay(&parent->style(), parent->style().display() == INLINE ? INLINE_TABLE : TABLE));
    15341534    table->initializeStyle();
    15351535    return table;
Note: See TracChangeset for help on using the changeset viewer.