Changeset 138838 in webkit


Ignore:
Timestamp:
Jan 4, 2013 12:45:36 PM (11 years ago)
Author:
ojan@chromium.org
Message:

Vertical writing mode can overflow fixed size grandparent container
https://bugs.webkit.org/show_bug.cgi?id=93655

Reviewed by David Hyatt.

Source/WebCore:

Add a hook to RenderBox::availableHeight to exclude the containing block's
margin, border and padding. This is for auto-sizing perpendicular writing modes
to restrict to the minimum of the fill-available height and the viewport height.

This will be used in a future patch to implement "height: fill-available".

This behavior was recently specced in http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing.

Test: fast/writing-mode/auto-sizing-orthogonal-flows.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):

  • rendering/RenderBox.h:

(RenderBox):
(WebCore::RenderBox::availableWidth):
(WebCore::RenderBox::availableHeight):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::computeIntrinsicRatioInformation):

  • rendering/RenderView.cpp:

(WebCore::RenderView::availableLogicalHeight):

  • rendering/RenderView.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):

LayoutTests:

  • fast/writing-mode/auto-sizing-orthogonal-flows-expected.txt: Added.
  • fast/writing-mode/auto-sizing-orthogonal-flows.html: Added.
  • fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt:
  • fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
  • fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
  • fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
  • fast/writing-mode/table-percent-width-quirk-expected.png:
  • fast/writing-mode/table-percent-width-quirk-expected.txt:

This test now correctly uses the containing blocks's availableHeight instead of the
initial containing block's height to size the perpendicular child.

  • platform/chromium-linux/fast/ruby/base-shorter-than-text-expected.txt:
  • platform/chromium-linux/fast/table/038-vertical-expected.png:
  • platform/chromium-linux/fast/table/border-collapsing/004-vertical-expected.png:

The extra wrapping in this test is just because we subtract the body's margin when
computing the available height. If you force the table's container 16px smaller,
you get the same rendering at tip of tree WebKit.

  • platform/chromium-win/fast/table/038-vertical-expected.txt:
  • platform/chromium-win/fast/table/border-collapsing/004-vertical-expected.txt:
  • platform/chromium/TestExpectations:
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/qt/TestExpectations:

Add tests that will need rebaseline once this patch lands.

Location:
trunk
Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r138836 r138838  
     12013-01-04  Ojan Vafai  <ojan@chromium.org>
     2
     3        Vertical writing mode can overflow fixed size grandparent container
     4        https://bugs.webkit.org/show_bug.cgi?id=93655
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/writing-mode/auto-sizing-orthogonal-flows-expected.txt: Added.
     9        * fast/writing-mode/auto-sizing-orthogonal-flows.html: Added.
     10        * fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt:
     11        * fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
     12        * fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
     13        * fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
     14        * fast/writing-mode/table-percent-width-quirk-expected.png:
     15        * fast/writing-mode/table-percent-width-quirk-expected.txt:
     16        This test now correctly uses the containing blocks's availableHeight instead of the
     17        initial containing block's height to size the perpendicular child.
     18        * platform/chromium-linux/fast/ruby/base-shorter-than-text-expected.txt:
     19        * platform/chromium-linux/fast/table/038-vertical-expected.png:
     20        * platform/chromium-linux/fast/table/border-collapsing/004-vertical-expected.png:
     21        The extra wrapping in this test is just because we subtract the body's margin when
     22        computing the available height. If you force the table's container 16px smaller,
     23        you get the same rendering at tip of tree WebKit.
     24        * platform/chromium-win/fast/table/038-vertical-expected.txt:
     25        * platform/chromium-win/fast/table/border-collapsing/004-vertical-expected.txt:
     26        * platform/chromium/TestExpectations:
     27        * platform/efl/TestExpectations:
     28        * platform/gtk/TestExpectations:
     29        * platform/mac/TestExpectations:
     30        * platform/qt/TestExpectations:
     31        Add tests that will need rebaseline once this patch lands.
     32
    1332013-01-04  Joshua Bell  <jsbell@chromium.org>
    234
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt

    r128375 r138838  
    44PASS
    55PASS
    6 FAIL:
    7 Expected 100 for height, but got 600.
    8 
    9 <div class="container">
    10     <div style="width: 100%; height: 100%;" data-expected-height="100" data-expected-width="200">
    11         <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height="100" data-expected-width="200"></div>
    12     </div>
    13 </div>
    146PASS
    15 FAIL:
    16 Expected 584 for height, but got 600.
    17 
    18 <div class="container" style="width: auto; height: auto; float: left;">
    19     <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height="584" data-expected-width="0"></div>
    20 </div>
     7PASS
     8PASS
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt

    r128517 r138838  
    55PASS
    66PASS
    7 FAIL:
    8 Expected 100 for height, but got 600.
    9 
    10 <div class="container">
    11     <div style="width: 100%; height: 100%;" data-expected-height="100" data-expected-width="200">
    12         <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height="100" data-expected-width="200"></div>
    13     </div>
    14 </div>
    157PASS
    16 FAIL:
    17 Expected 100 for height, but got 600.
    18 Expected 100 for height, but got 600.
    19 Expected 100 for height, but got 600.
    20 
    21 <div class="container">
    22     <div style="width: 150px;" data-expected-height="100" data-expected-width="150">
    23         <div data-expected-height="100" data-expected-width="150">
    24             <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height="100" data-expected-width="150"></div>
    25         </div>
    26     </div>
    27 </div>
    288PASS
    29 FAIL:
    30 Expected 584 for height, but got 600.
    31 
    32 <div class="container" style="width: auto; height: auto; float: left;">
    33     <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height="584" data-expected-width="0"></div>
    34 </div>
     9PASS
     10PASS
     11PASS
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html

    r130979 r138838  
    4646</div>
    4747
    48 <!-- FIXME: We get the height wrong on the innermost element. https://bugs.webkit.org/show_bug.cgi?id=93655 -->
    4948<div class="container">
    5049    <div style="width: 100%; height: 100%;" data-expected-height=100 data-expected-width=200>
     
    6160</div>
    6261
    63 <!-- FIXME: We get the height wrong on the innermost element. https://bugs.webkit.org/show_bug.cgi?id=93655 -->
    6462<div class="container">
    6563    <div style="width: 150px;" data-expected-height=100 data-expected-width=150>
     
    7472</div>
    7573
    76 <!-- FIXME: We get the height wrong on the innermost element. https://bugs.webkit.org/show_bug.cgi?id=93655 -->
    7774<div class="container" style="width: auto; height: auto; float: left;">
    7875    <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height=584 data-expected-width=0></div>
  • trunk/LayoutTests/fast/writing-mode/percentage-height-orthogonal-writing-modes.html

    r130979 r138838  
    4242</div>
    4343
    44 <!-- FIXME: We get the height wrong on the innermost element. https://bugs.webkit.org/show_bug.cgi?id=93655 -->
    4544<div class="container">
    4645    <div style="width: 100%; height: 100%;" data-expected-height=100 data-expected-width=200>
     
    5352</div>
    5453
    55 <!-- FIXME: We get the height wrong on the innermost element. https://bugs.webkit.org/show_bug.cgi?id=93655 -->
    5654<div class="container" style="width: auto; height: auto; float: left;">
    5755    <div class="item vertical-rl" style="width: 100%; height: 100%;" data-expected-height=584 data-expected-width=0></div>
  • trunk/LayoutTests/fast/writing-mode/table-percent-width-quirk-expected.txt

    r104208 r138838  
    4040layer at (692,350) size 100x50
    4141  RenderBlock (positioned) {DIV} at (692,350) size 100x50 [bgcolor=#808080]
    42 layer at (-13,350) size 805x20 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
    43   RenderBlock (positioned) {DIV} at (0,0) size 805x20 [bgcolor=#0000FF]
     42layer at (672,350) size 120x20
     43  RenderBlock (positioned) {DIV} at (0,0) size 120x20 [bgcolor=#0000FF]
    4444    RenderBlock {DIV} at (0,0) size 20x20
    45     RenderTable {TABLE} at (20,0) size 785x20 [bgcolor=#008000]
    46       RenderTableSection {TBODY} at (0,0) size 785x20
    47         RenderTableRow {TR} at (0,0) size 785x20
    48           RenderTableCell {TD} at (0,0) size 785x20 [r=0 c=0 rs=1 cs=1]
     45    RenderTable {TABLE} at (20,0) size 100x20 [bgcolor=#008000]
     46      RenderTableSection {TBODY} at (0,0) size 100x20
     47        RenderTableRow {TR} at (0,0) size 100x20
     48          RenderTableCell {TD} at (0,0) size 100x20 [r=0 c=0 rs=1 cs=1]
    4949            RenderBlock {DIV} at (0,0) size 20x20
    5050layer at (692,425) size 100x50
    5151  RenderBlock (positioned) {DIV} at (692,425) size 100x50 [bgcolor=#808080]
    52 layer at (-13,425) size 805x20 backgroundClip at (0,0) size 800x600 clip at (0,0) size 800x600 outlineClip at (0,0) size 800x600
    53   RenderBlock (positioned) {DIV} at (0,0) size 805x20 [bgcolor=#0000FF]
     52layer at (672,425) size 120x20
     53  RenderBlock (positioned) {DIV} at (0,0) size 120x20 [bgcolor=#0000FF]
    5454    RenderBlock {DIV} at (0,0) size 20x20
    55     RenderBlock {DIV} at (20,0) size 785x20 [bgcolor=#008000]
     55    RenderBlock {DIV} at (20,0) size 100x20 [bgcolor=#008000]
    5656      RenderBlock {DIV} at (0,0) size 20x20
  • trunk/LayoutTests/platform/chromium-linux/fast/ruby/base-shorter-than-text-expected.txt

    r79673 r138838  
    2424                text run at (24,1) width 144: "\x{6A5F}\x{52D5}\x{968A}"
    2525        RenderText {#text} at (0,0) size 0x0
    26       RenderBlock {DIV} at (0,198) size 214x300
    27         RenderBlock {P} at (16,0) size 83x300
     26      RenderBlock {DIV} at (0,198) size 214x292
     27        RenderBlock {P} at (16,0) size 83x292
    2828          RenderRuby (inline) {RUBY} at (0,0) size 55x144
    2929            RenderRubyRun (anonymous) at (26,0) size 57x144
     
    3535                  text run at (1,24) width 96: "\x{653B}\x{6BBB}"
    3636          RenderText {#text} at (0,0) size 0x0
    37         RenderBlock {P} at (115,0) size 83x300
     37        RenderBlock {P} at (115,0) size 83x292
    3838          RenderRuby (inline) {RUBY} at (0,0) size 55x192
    3939            RenderRubyRun (anonymous) at (26,0) size 57x192
  • trunk/LayoutTests/platform/chromium-win/fast/table/038-vertical-expected.txt

    r71704 r138838  
    1 layer at (0,0) size 785x656
     1layer at (0,0) size 785x640
    22  RenderView at (0,0) size 785x600
    3 layer at (0,0) size 785x656
    4   RenderBlock {HTML} at (0,0) size 785x656
    5     RenderBody {BODY} at (8,8) size 769x640
     3layer at (0,0) size 785x640
     4  RenderBlock {HTML} at (0,0) size 785x640
     5    RenderBody {BODY} at (8,8) size 769x624
    66      RenderBlock (anonymous) at (0,0) size 769x40
    77        RenderText {#text} at (0,0) size 715x39
     
    99          text run at (260,0) width 455: "In both, the spanning cells in columns 2-3 should consume as much width as"
    1010          text run at (0,20) width 238: "possible, while column 1 should be tiny."
    11       RenderTable {TABLE} at (0,40) size 58x600 [border: (2px outset #808080)]
    12         RenderTableSection {TBODY} at (2,2) size 54x596
    13           RenderTableRow {TR} at (0,2) size 24x596
     11      RenderTable {TABLE} at (0,40) size 58x584 [border: (2px outset #808080)]
     12        RenderTableSection {TBODY} at (2,2) size 54x580
     13          RenderTableRow {TR} at (0,2) size 24x580
    1414            RenderTableCell {TD} at (2,2) size 24x12 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1515              RenderText {#text} at (2,2) size 19x8
    1616                text run at (2,2) width 8: "1"
    17             RenderTableCell {TD} at (2,16) size 24x578 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=2]
     17            RenderTableCell {TD} at (2,16) size 24x562 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=2]
    1818              RenderText {#text} at (2,2) size 19x22
    1919                text run at (2,2) width 22: "2-3"
    20           RenderTableRow {TR} at (0,28) size 24x596
     20          RenderTableRow {TR} at (0,28) size 24x580
    2121            RenderTableCell {TD} at (28,2) size 24x12 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
    2222              RenderText {#text} at (2,2) size 19x8
    2323                text run at (2,2) width 8: "1"
    24             RenderTableCell {TD} at (28,16) size 24x578 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=2]
     24            RenderTableCell {TD} at (28,16) size 24x562 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=2]
    2525              RenderText {#text} at (2,2) size 19x22
    2626                text run at (2,2) width 22: "2-3"
  • trunk/LayoutTests/platform/chromium-win/fast/table/border-collapsing/004-vertical-expected.txt

    r117821 r138838  
    1 layer at (0,0) size 1498x929
     1layer at (0,0) size 1558x913
    22  RenderView at (0,0) size 785x585
    3 layer at (0,0) size 785x929
    4   RenderBlock {HTML} at (0,0) size 785x929
    5     RenderBody {BODY} at (8,21) size 769x900
     3layer at (0,0) size 785x913
     4  RenderBlock {HTML} at (0,0) size 785x913
     5    RenderBody {BODY} at (8,21) size 769x884
    66      RenderBlock {H1} at (0,0) size 769x37
    77        RenderText {#text} at (0,0) size 292x36
     
    4242          text run at (0,176) width 264: "    { border: medium solid red; }"
    4343          text run at (264,176) width 0: " "
    44       RenderBlock {DIV} at (0,299) size 1490x601
    45         RenderTable {TABLE} at (16,16) size 220x568 [border: (1px solid #0000FF)]
    46           RenderTableSection {TBODY} at (1,1) size 217x565
    47             RenderTableRow {TR} at (0,0) size 33x565
    48               RenderTableCell {TH} at (0,0) size 33x190 [border: (2px solid #800080)] [r=0 c=0 rs=1 cs=1]
    49                 RenderText {#text} at (6,54) size 19x83
    50                   text run at (6,54) width 82: "Header One"
    51               RenderTableCell {TH} at (0,190) size 33x178 [border: (2px solid #800080)] [r=0 c=1 rs=1 cs=1]
    52                 RenderText {#text} at (6,48) size 19x83
    53                   text run at (6,48) width 82: "Header Two"
    54               RenderTableCell {TH} at (0,368) size 33x197 [border: (2px solid #800080)] [r=0 c=2 rs=1 cs=1]
    55                 RenderText {#text} at (6,52) size 19x94
    56                   text run at (6,52) width 94: "Header Three"
    57             RenderTableRow {TR} at (0,33) size 92x565
    58               RenderTableCell {TD} at (33,20) size 92x150 [border: (2px solid #008000)] [r=1 c=0 rs=1 cs=1]
    59                 RenderText {#text} at (26,-13) size 39x171
    60                   text run at (26,-13) width 171: "This table uses the collapsed"
    61                   text run at (46,-13) width 92: "borders model."
    62               RenderTableCell {TD} at (33,200) size 92x158 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
    63                 RenderText {#text} at (16,-4) size 59x149
    64                   text run at (16,-4) width 149: "This means that elements"
    65                   text run at (36,-4) width 132: "within the cell have no"
    66                   text run at (56,-4) width 96: "border-spacing."
    67               RenderTableCell {TD} at (33,368) size 92x197 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
    68                 RenderText {#text} at (6,6) size 79x184
    69                   text run at (6,6) width 184: "Since it has collapsed borders,"
    70                   text run at (26,6) width 155: "the borders on the header"
    71                   text run at (46,6) width 34: "cells, "
    72                   text run at (46,40) width 132: "on all sides, should be"
    73                   text run at (66,6) width 125: "medium solid purple."
    74             RenderTableRow {TR} at (0,125) size 92x565
    75               RenderTableCell {TD} at (125,0) size 92x190 [border: (2px solid #008000)] [r=2 c=0 rs=1 cs=1]
    76                 RenderText {#text} at (5,7) size 79x174
     44      RenderBlock {DIV} at (0,299) size 1550x585
     45        RenderTable {TABLE} at (16,16) size 240x552 [border: (1px solid #0000FF)]
     46          RenderTableSection {TBODY} at (1,1) size 237x549
     47            RenderTableRow {TR} at (0,0) size 33x549
     48              RenderTableCell {TH} at (0,0) size 33x184 [border: (2px solid #800080)] [r=0 c=0 rs=1 cs=1]
     49                RenderText {#text} at (6,51) size 19x83
     50                  text run at (6,51) width 82: "Header One"
     51              RenderTableCell {TH} at (0,184) size 33x173 [border: (2px solid #800080)] [r=0 c=1 rs=1 cs=1]
     52                RenderText {#text} at (6,46) size 19x82
     53                  text run at (6,46) width 82: "Header Two"
     54              RenderTableCell {TH} at (0,357) size 33x192 [border: (2px solid #800080)] [r=0 c=2 rs=1 cs=1]
     55                RenderText {#text} at (6,49) size 19x95
     56                  text run at (6,49) width 94: "Header Three"
     57            RenderTableRow {TR} at (0,33) size 112x549
     58              RenderTableCell {TD} at (33,30) size 112x124 [border: (2px solid #008000)] [r=1 c=0 rs=1 cs=1]
     59                RenderText {#text} at (36,-23) size 39x171
     60                  text run at (36,-23) width 171: "This table uses the collapsed"
     61                  text run at (56,-23) width 92: "borders model."
     62              RenderTableCell {TD} at (33,204) size 112x133 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
     63                RenderText {#text} at (26,-14) size 59x149
     64                  text run at (26,-14) width 149: "This means that elements"
     65                  text run at (46,-14) width 132: "within the cell have no"
     66                  text run at (66,-14) width 96: "border-spacing."
     67              RenderTableCell {TD} at (33,357) size 112x192 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
     68                RenderText {#text} at (6,6) size 99x165
     69                  text run at (6,6) width 129: "Since it has collapsed"
     70                  text run at (26,6) width 165: "borders, the borders on the"
     71                  text run at (46,6) width 79: "header cells, "
     72                  text run at (46,85) width 70: "on all sides,"
     73                  text run at (66,6) width 141: "should be medium solid"
     74                  text run at (86,6) width 42: "purple."
     75            RenderTableRow {TR} at (0,145) size 92x549
     76              RenderTableCell {TD} at (145,0) size 92x184 [border: (2px solid #008000)] [r=2 c=0 rs=1 cs=1]
     77                RenderText {#text} at (5,7) size 79x170
    7778                  text run at (5,7) width 170: "The border of the table itself"
    78                   text run at (25,7) width 174: "should be medium solid blue,"
    79                   text run at (45,7) width 44: "except "
    80                   text run at (45,51) width 112: "where header cells"
    81                   text run at (65,7) width 121: "override the border."
    82               RenderTableCell {TD} at (125,190) size 92x178 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
     79                  text run at (25,7) width 141: "should be medium solid"
     80                  text run at (45,7) width 77: "blue, except "
     81                  text run at (45,84) width 82: "where header"
     82                  text run at (65,7) width 151: "cells override the border."
     83              RenderTableCell {TD} at (145,184) size 92x173 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
    8384                RenderText {#text} at (5,6) size 79x158
    8485                  text run at (5,6) width 155: "The borders that I haven't"
     
    8788                  text run at (45,88) width 76: "ones) should"
    8889                  text run at (65,6) width 113: "be thin solid green."
    89               RenderTableCell {TD} at (125,368) size 92x197 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
     90              RenderTableCell {TD} at (145,357) size 92x192 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
    9091                RenderText {#text} at (5,6) size 59x175
    9192                  text run at (5,6) width 174: "This table should have a 1em"
     
    99100                RenderText {#text} at (65,49) size 19x82
    100101                  text run at (65,49) width 82: " of its border."
    101         RenderTable {TABLE} at (252,16) size 290x568 [border: (3px solid #0000FF)]
    102           RenderTableSection {TBODY} at (3,3) size 284x562
    103             RenderTableRow {TR} at (0,16) size 36x562
    104               RenderTableCell {TH} at (16,16) size 36x121 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
    105                 RenderText {#text} at (8,19) size 19x83
    106                   text run at (8,19) width 82: "Header One"
    107               RenderTableCell {TH} at (16,153) size 36x143 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
    108                 RenderText {#text} at (8,30) size 19x83
    109                   text run at (8,30) width 82: "Header Two"
    110               RenderTableCell {TH} at (16,312) size 36x234 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
    111                 RenderText {#text} at (8,70) size 19x94
    112                   text run at (8,70) width 94: "Header Three"
    113             RenderTableRow {TR} at (0,68) size 92x562
    114               RenderTableCell {TD} at (68,26) size 92x101 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
     102        RenderTable {TABLE} at (272,16) size 310x552 [border: (3px solid #0000FF)]
     103          RenderTableSection {TBODY} at (3,3) size 304x546
     104            RenderTableRow {TR} at (0,16) size 36x546
     105              RenderTableCell {TH} at (16,16) size 36x117 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
     106                RenderText {#text} at (8,17) size 19x83
     107                  text run at (8,17) width 82: "Header One"
     108              RenderTableCell {TH} at (16,149) size 36x138 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
     109                RenderText {#text} at (8,28) size 19x82
     110                  text run at (8,28) width 82: "Header Two"
     111              RenderTableCell {TH} at (16,303) size 36x227 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
     112                RenderText {#text} at (8,66) size 19x95
     113                  text run at (8,66) width 94: "Header Three"
     114            RenderTableRow {TR} at (0,68) size 92x546
     115              RenderTableCell {TD} at (68,26) size 92x97 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
    115116                RenderText {#text} at (16,-4) size 59x92
    116117                  text run at (16,-4) width 88: "This table uses"
    117118                  text run at (36,-4) width 81: "the separated"
    118119                  text run at (56,-4) width 92: "borders model."
    119               RenderTableCell {TD} at (68,153) size 92x143 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
     120              RenderTableCell {TD} at (68,149) size 92x138 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
    120121                RenderText {#text} at (6,6) size 79x113
    121122                  text run at (6,6) width 93: "This means that"
     
    123124                  text run at (46,6) width 103: "cell have border-"
    124125                  text run at (66,6) width 95: "spacing of 1em."
    125               RenderTableCell {TD} at (68,322) size 92x214 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
     126              RenderTableCell {TD} at (68,313) size 92x207 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
    126127                RenderText {#text} at (16,-4) size 59x213
    127128                  text run at (16,-4) width 198: "The borders on the header cells, "
     
    129130                  text run at (36,-4) width 196: "all sides, should be medium solid"
    130131                  text run at (56,-4) width 42: "purple."
    131             RenderTableRow {TR} at (0,176) size 92x562
    132               RenderTableCell {TD} at (176,16) size 92x121 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
    133                 RenderText {#text} at (6,6) size 79x106
    134                   text run at (6,6) width 106: "The border of the"
    135                   text run at (26,6) width 103: "table itself should"
    136                   text run at (46,6) width 98: "be medium solid"
    137                   text run at (66,6) width 29: "blue."
    138               RenderTableCell {TD} at (176,163) size 92x123 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
    139                 RenderText {#text} at (16,-4) size 59x125
    140                   text run at (16,-4) width 125: "The borders of other"
    141                   text run at (36,-4) width 113: "cells should be thin"
    142                   text run at (56,-4) width 69: "solid green."
    143               RenderTableCell {TD} at (176,312) size 92x234 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
    144                 RenderText {#text} at (6,6) size 59x218
    145                   text run at (6,6) width 218: "This table should have a 1em margin"
    146                   text run at (26,6) width 106: "around all edges. "
    147                   text run at (26,112) width 73: "This margin "
    148                   text run at (26,185) width 9: "is"
    149                   text run at (46,6) width 116: "measured from the "
    150                 RenderInline {EM} at (0,0) size 19x68
    151                   RenderText {#text} at (46,122) size 19x68
    152                     text run at (46,122) width 68: "outer edge"
    153                 RenderText {#text} at (46,190) size 39x217
    154                   text run at (46,190) width 33: " of its"
    155                   text run at (66,6) width 45: "border."
    156         RenderTable {TABLE} at (558,16) size 338x568 [border: (3px solid #0000FF)]
    157           RenderTableSection {TBODY} at (3,3) size 332x562
    158             RenderTableRow {TR} at (0,8) size 36x562
    159               RenderTableCell {TH} at (8,0) size 36x145 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
    160                 RenderText {#text} at (8,31) size 19x83
    161                   text run at (8,31) width 82: "Header One"
    162               RenderTableCell {TH} at (8,145) size 36x204 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
    163                 RenderText {#text} at (8,61) size 19x82
    164                   text run at (8,61) width 82: "Header Two"
    165               RenderTableCell {TH} at (8,349) size 36x213 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
    166                 RenderText {#text} at (8,59) size 19x95
    167                   text run at (8,59) width 94: "Header Three"
    168             RenderTableRow {TR} at (0,52) size 132x562
    169               RenderTableCell {TD} at (52,30) size 132x85 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
     132            RenderTableRow {TR} at (0,176) size 112x546
     133              RenderTableCell {TD} at (176,16) size 112x117 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
     134                RenderText {#text} at (6,6) size 99x84
     135                  text run at (6,6) width 84: "The border of"
     136                  text run at (26,6) width 82: "the table itself"
     137                  text run at (46,6) width 58: "should be"
     138                  text run at (66,6) width 79: "medium solid"
     139                  text run at (86,6) width 29: "blue."
     140              RenderTableCell {TD} at (176,169) size 112x98 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
     141                RenderText {#text} at (26,-14) size 59x125
     142                  text run at (26,-14) width 125: "The borders of other"
     143                  text run at (46,-14) width 113: "cells should be thin"
     144                  text run at (66,-14) width 69: "solid green."
     145              RenderTableCell {TD} at (176,313) size 112x207 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
     146                RenderText {#text} at (16,-4) size 59x175
     147                  text run at (16,-4) width 174: "This table should have a 1em"
     148                  text run at (36,-4) width 150: "margin around all edges. "
     149                  text run at (36,146) width 25: "This"
     150                  text run at (56,-4) width 44: "margin "
     151                  text run at (56,40) width 129: "is measured from the "
     152                RenderInline {EM} at (0,0) size 39x207
     153                  RenderText {#text} at (56,169) size 39x207
     154                    text run at (56,169) width 34: "outer"
     155                    text run at (76,-4) width 30: "edge"
     156                RenderText {#text} at (76,26) size 19x82
     157                  text run at (76,26) width 82: " of its border."
     158        RenderTable {TABLE} at (598,16) size 338x552 [border: (3px solid #0000FF)]
     159          RenderTableSection {TBODY} at (3,3) size 332x546
     160            RenderTableRow {TR} at (0,8) size 36x546
     161              RenderTableCell {TH} at (8,0) size 36x141 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
     162                RenderText {#text} at (8,29) size 19x83
     163                  text run at (8,29) width 82: "Header One"
     164              RenderTableCell {TH} at (8,141) size 36x198 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
     165                RenderText {#text} at (8,58) size 19x82
     166                  text run at (8,58) width 82: "Header Two"
     167              RenderTableCell {TH} at (8,339) size 36x207 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
     168                RenderText {#text} at (8,56) size 19x95
     169                  text run at (8,56) width 94: "Header Three"
     170            RenderTableRow {TR} at (0,52) size 132x546
     171              RenderTableCell {TD} at (52,30) size 132x81 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
    170172                RenderText {#text} at (36,-24) size 59x110
    171173                  text run at (36,-24) width 110: "This table uses the"
    172174                  text run at (56,-24) width 110: "separated borders"
    173175                  text run at (76,-24) width 41: "model."
    174               RenderTableCell {TD} at (52,145) size 132x204 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
     176              RenderTableCell {TD} at (52,141) size 132x198 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
    175177                RenderText {#text} at (6,6) size 119x185
    176178                  text run at (6,6) width 171: "Elements within the cell have"
     
    182184                  text run at (86,6) width 164: "height of horizontal lines) of"
    183185                  text run at (106,6) width 42: "0.5em."
    184               RenderTableCell {TD} at (52,379) size 132x153 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
     186              RenderTableCell {TD} at (52,369) size 132x147 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
    185187                RenderText {#text} at (36,-24) size 59x194
    186188                  text run at (36,-24) width 194: "The borders on the header cells,"
    187189                  text run at (56,-24) width 183: "on all sides, should be medium"
    188190                  text run at (76,-24) width 74: "solid purple."
    189             RenderTableRow {TR} at (0,192) size 132x562
    190               RenderTableCell {TD} at (192,0) size 132x145 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
     191            RenderTableRow {TR} at (0,192) size 132x546
     192              RenderTableCell {TD} at (192,0) size 132x141 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
    191193                RenderText {#text} at (6,6) size 119x125
    192194                  text run at (6,6) width 106: "The border of the"
     
    196198                  text run at (86,6) width 113: "cells should be thin"
    197199                  text run at (106,6) width 69: "solid green."
    198               RenderTableCell {TD} at (192,165) size 132x164 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
     200              RenderTableCell {TD} at (192,161) size 132x158 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
    199201                RenderText {#text} at (26,-14) size 59x175
    200202                  text run at (26,-14) width 174: "This table should have a 1em"
     
    208210                RenderText {#text} at (86,54) size 19x82
    209211                  text run at (86,54) width 82: " of its border."
    210               RenderTableCell {TD} at (192,349) size 132x213 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
     212              RenderTableCell {TD} at (192,339) size 132x207 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
     213                RenderText {#text} at (6,6) size 119x192
     214                  text run at (6,6) width 179: "The table should not be wider"
     215                  text run at (26,6) width 171: "than the room available for it"
     216                  text run at (46,6) width 40: "unless "
     217                  text run at (46,46) width 142: "that space is very small."
     218                  text run at (66,6) width 160: "Because of its margins, the"
     219                  text run at (86,6) width 75: "width of the "
     220                  text run at (86,81) width 117: "table should be less"
     221                  text run at (106,6) width 70: "than 100%."
     222        RenderTable {TABLE} at (952,16) size 286x552 [border: (3px solid #0000FF)]
     223          RenderTableSection {TBODY} at (3,3) size 280x546
     224            RenderTableRow {TR} at (0,0) size 36x546
     225              RenderTableCell {TH} at (0,8) size 36x148 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
     226                RenderText {#text} at (8,33) size 19x82
     227                  text run at (8,33) width 82: "Header One"
     228              RenderTableCell {TH} at (0,164) size 36x150 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
     229                RenderText {#text} at (8,34) size 19x82
     230                  text run at (8,34) width 82: "Header Two"
     231              RenderTableCell {TH} at (0,322) size 36x216 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
     232                RenderText {#text} at (8,61) size 19x94
     233                  text run at (8,61) width 94: "Header Three"
     234            RenderTableRow {TR} at (0,36) size 112x546
     235              RenderTableCell {TD} at (36,28) size 112x108 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
     236                RenderText {#text} at (26,-14) size 59x110
     237                  text run at (26,-14) width 110: "This table uses the"
     238                  text run at (46,-14) width 110: "separated borders"
     239                  text run at (66,-14) width 41: "model."
     240              RenderTableCell {TD} at (36,164) size 112x150 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
     241                RenderText {#text} at (6,6) size 99x124
     242                  text run at (6,6) width 115: "Elements within the"
     243                  text run at (26,6) width 114: "cell have horizontal"
     244                  text run at (46,6) width 108: "border-spacing of"
     245                  text run at (66,6) width 111: "0.5em and vertical"
     246                  text run at (86,6) width 124: "border-spacing of 0."
     247              RenderTableCell {TD} at (36,342) size 112x176 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
     248                RenderText {#text} at (26,-14) size 59x194
     249                  text run at (26,-14) width 194: "The borders on the header cells,"
     250                  text run at (46,-14) width 183: "on all sides, should be medium"
     251                  text run at (66,-14) width 74: "solid purple."
     252            RenderTableRow {TR} at (0,148) size 132x546
     253              RenderTableCell {TD} at (148,8) size 132x148 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
     254                RenderText {#text} at (6,6) size 119x125
     255                  text run at (6,6) width 106: "The border of the"
     256                  text run at (26,6) width 122: "table itself should be"
     257                  text run at (46,6) width 112: "medium solid blue."
     258                  text run at (66,6) width 125: "The borders of other"
     259                  text run at (86,6) width 113: "cells should be thin"
     260                  text run at (106,6) width 69: "solid green."
     261              RenderTableCell {TD} at (148,164) size 132x150 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
     262                RenderText {#text} at (6,6) size 79x133
     263                  text run at (6,6) width 133: "This table should have"
     264                  text run at (26,6) width 127: "a 1em margin around"
     265                  text run at (46,6) width 60: "all edges. "
     266                  text run at (46,66) width 69: "This margin"
     267                  text run at (66,6) width 125: "is measured from the"
     268                RenderInline {EM} at (0,0) size 19x68
     269                  RenderText {#text} at (86,6) size 19x68
     270                    text run at (86,6) width 68: "outer edge"
     271                RenderText {#text} at (86,74) size 39x101
     272                  text run at (86,74) width 33: " of its"
     273                  text run at (106,6) width 45: "border."
     274              RenderTableCell {TD} at (148,322) size 132x216 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
    211275                RenderText {#text} at (6,6) size 119x197
    212276                  text run at (6,6) width 179: "The table should not be wider"
     
    218282                  text run at (86,44) width 146: "table should be less than"
    219283                  text run at (106,6) width 41: "100%."
    220         RenderTable {TABLE} at (912,16) size 286x568 [border: (3px solid #0000FF)]
    221           RenderTableSection {TBODY} at (3,3) size 280x562
    222             RenderTableRow {TR} at (0,0) size 36x562
    223               RenderTableCell {TH} at (0,8) size 36x152 [border: (3px solid #800080)] [r=0 c=0 rs=1 cs=1]
    224                 RenderText {#text} at (8,35) size 19x82
    225                   text run at (8,35) width 82: "Header One"
    226               RenderTableCell {TH} at (0,168) size 36x155 [border: (3px solid #800080)] [r=0 c=1 rs=1 cs=1]
    227                 RenderText {#text} at (8,36) size 19x83
    228                   text run at (8,36) width 82: "Header Two"
    229               RenderTableCell {TH} at (0,331) size 36x223 [border: (3px solid #800080)] [r=0 c=2 rs=1 cs=1]
    230                 RenderText {#text} at (8,64) size 19x95
    231                   text run at (8,64) width 94: "Header Three"
    232             RenderTableRow {TR} at (0,36) size 112x562
    233               RenderTableCell {TD} at (36,28) size 112x112 [border: (1px solid #008000)] [r=1 c=0 rs=1 cs=1]
    234                 RenderText {#text} at (26,-14) size 59x110
    235                   text run at (26,-14) width 110: "This table uses the"
    236                   text run at (46,-14) width 110: "separated borders"
    237                   text run at (66,-14) width 41: "model."
    238               RenderTableCell {TD} at (36,168) size 112x155 [border: (1px solid #008000)] [r=1 c=1 rs=1 cs=1]
    239                 RenderText {#text} at (6,6) size 99x141
    240                   text run at (6,6) width 139: "Elements within the cell"
    241                   text run at (26,6) width 141: "have horizontal border-"
    242                   text run at (46,6) width 129: "spacing of 0.5em and"
    243                   text run at (66,6) width 47: "vertical "
    244                   text run at (66,53) width 92: "border-spacing"
    245                   text run at (86,6) width 28: "of 0."
    246               RenderTableCell {TD} at (36,351) size 112x183 [border: (1px solid #008000)] [r=1 c=2 rs=1 cs=1]
    247                 RenderText {#text} at (26,-14) size 59x194
    248                   text run at (26,-14) width 194: "The borders on the header cells,"
    249                   text run at (46,-14) width 183: "on all sides, should be medium"
    250                   text run at (66,-14) width 74: "solid purple."
    251             RenderTableRow {TR} at (0,148) size 132x562
    252               RenderTableCell {TD} at (148,18) size 132x132 [border: (1px solid #008000)] [r=2 c=0 rs=1 cs=1]
    253                 RenderText {#text} at (16,-4) size 99x140
    254                   text run at (16,-4) width 139: "The border of the table"
    255                   text run at (36,-4) width 140: "itself should be medium"
    256                   text run at (56,-4) width 65: "solid blue. "
    257                   text run at (56,61) width 74: "The borders"
    258                   text run at (76,-4) width 139: "of other cells should be"
    259                   text run at (96,-4) width 94: "thin solid green."
    260               RenderTableCell {TD} at (148,168) size 132x155 [border: (1px solid #008000)] [r=2 c=1 rs=1 cs=1]
    261                 RenderText {#text} at (6,6) size 79x142
    262                   text run at (6,6) width 133: "This table should have"
    263                   text run at (26,6) width 127: "a 1em margin around"
    264                   text run at (46,6) width 60: "all edges. "
    265                   text run at (46,66) width 73: "This margin "
    266                   text run at (46,139) width 9: "is"
    267                   text run at (66,6) width 112: "measured from the"
    268                 RenderInline {EM} at (0,0) size 19x68
    269                   RenderText {#text} at (86,6) size 19x68
    270                     text run at (86,6) width 68: "outer edge"
    271                 RenderText {#text} at (86,74) size 39x101
    272                   text run at (86,74) width 33: " of its"
    273                   text run at (106,6) width 45: "border."
    274               RenderTableCell {TD} at (148,341) size 132x203 [border: (1px solid #008000)] [r=2 c=2 rs=1 cs=1]
    275                 RenderText {#text} at (16,-4) size 99x208
    276                   text run at (16,-4) width 208: "The table should not be wider than"
    277                   text run at (36,-4) width 186: "the room available for it unless "
    278                   text run at (36,182) width 22: "that"
    279                   text run at (56,-4) width 120: "space is very small. "
    280                   text run at (56,116) width 84: "Because of its"
    281                   text run at (76,-4) width 151: "margins, the width of the "
    282                   text run at (76,147) width 29: "table"
    283                   text run at (96,-4) width 158: "should be less than 100%."
    284         RenderTable {TABLE} at (1214,16) size 260x568
    285           RenderBlock {CAPTION} at (0,0) size 20x568
    286             RenderText {#text} at (0,228) size 19x112
    287               text run at (0,228) width 112: "This is the caption."
     284        RenderTable {TABLE} at (1254,16) size 280x552
     285          RenderBlock {CAPTION} at (0,0) size 20x552
     286            RenderText {#text} at (0,220) size 19x112
     287              text run at (0,220) width 112: "This is the caption."
    288288          RenderTableCol {COLGROUP} at (0,0) size 0x0 [border: (3px solid #FF0000)]
    289289            RenderTableCol {COL} at (0,0) size 0x0 [border: (3px solid #FF0000)]
     
    291291            RenderTableCol {COL} at (0,0) size 0x0 [border: (3px solid #FF0000)]
    292292            RenderTableCol {COL} at (0,0) size 0x0 [border: (3px solid #FF0000)]
    293           RenderTableSection {THEAD} at (20,0) size 34x568 [border: (3px solid #FF0000)]
    294             RenderTableRow {TR} at (0,2) size 30x568 [border: (3px solid #FF0000)]
    295               RenderTableCell {TH} at (2,2) size 30x93 [r=0 c=0 rs=1 cs=1]
    296                 RenderText {#text} at (5,5) size 19x83
    297                   text run at (5,5) width 82: "Header One"
    298               RenderTableCell {TH} at (2,97) size 30x245 [r=0 c=1 rs=1 cs=1]
    299                 RenderText {#text} at (5,81) size 19x83
    300                   text run at (5,81) width 82: "Header Two"
    301               RenderTableCell {TH} at (2,344) size 30x222 [r=0 c=2 rs=1 cs=1]
    302                 RenderText {#text} at (5,64) size 19x94
    303                   text run at (5,64) width 94: "Header Three"
    304           RenderTableSection {TBODY} at (54,0) size 206x568 [border: (3px solid #FF0000)]
    305             RenderTableRow {TR} at (0,2) size 110x568 [border: (3px solid #FF0000)]
    306               RenderTableCell {TD} at (2,2) size 110x93 [r=0 c=0 rs=1 cs=1]
     293          RenderTableSection {THEAD} at (20,0) size 54x552 [border: (3px solid #FF0000)]
     294            RenderTableRow {TR} at (0,2) size 50x552 [border: (3px solid #FF0000)]
     295              RenderTableCell {TH} at (2,2) size 50x90 [r=0 c=0 rs=1 cs=1]
     296                RenderText {#text} at (5,20) size 39x50
     297                  text run at (5,20) width 50: "Header"
     298                  text run at (25,31) width 28: "One"
     299              RenderTableCell {TH} at (2,104) size 50x218 [r=0 c=1 rs=1 cs=1]
     300                RenderText {#text} at (15,68) size 19x82
     301                  text run at (15,68) width 82: "Header Two"
     302              RenderTableCell {TH} at (2,344) size 50x196 [r=0 c=2 rs=1 cs=1]
     303                RenderText {#text} at (15,51) size 19x94
     304                  text run at (15,51) width 94: "Header Three"
     305          RenderTableSection {TBODY} at (74,0) size 206x552 [border: (3px solid #FF0000)]
     306            RenderTableRow {TR} at (0,2) size 110x552 [border: (3px solid #FF0000)]
     307              RenderTableCell {TD} at (2,2) size 110x90 [r=0 c=0 rs=1 cs=1]
    307308                RenderText {#text} at (5,5) size 99x59
    308309                  text run at (5,5) width 58: "This table"
     
    311312                  text run at (65,5) width 47: "borders"
    312313                  text run at (85,5) width 41: "model."
    313               RenderTableCell {TD} at (2,117) size 110x205 [r=0 c=1 rs=1 cs=1]
     314              RenderTableCell {TD} at (2,114) size 110x198 [r=0 c=1 rs=1 cs=1]
    314315                RenderText {#text} at (25,-15) size 59x218
    315316                  text run at (25,-15) width 218: "This means that borders are allowed"
     
    317318                  text run at (45,172) width 20: "cell"
    318319                  text run at (65,-15) width 56: "elements."
    319               RenderTableCell {TD} at (2,364) size 110x182 [r=0 c=2 rs=1 cs=1]
     320              RenderTableCell {TD} at (2,354) size 110x176 [r=0 c=2 rs=1 cs=1]
    320321                RenderText {#text} at (25,-15) size 59x202
    321322                  text run at (25,-15) width 202: "They are not allowed on elements"
     
    323324                  text run at (45,109) width 75: "row-groups,"
    324325                  text run at (65,-15) width 168: "columns, or column-groups."
    325             RenderTableRow {TR} at (0,114) size 90x568 [border: (3px solid #FF0000)]
    326               RenderTableCell {TD} at (114,2) size 90x93 [r=1 c=0 rs=1 cs=1]
     326            RenderTableRow {TR} at (0,114) size 90x552 [border: (3px solid #FF0000)]
     327              RenderTableCell {TD} at (114,2) size 90x90 [r=1 c=0 rs=1 cs=1]
    327328                RenderText {#text} at (5,5) size 79x79
    328329                  text run at (5,5) width 78: "There should"
     
    330331                  text run at (45,5) width 79: "borders at all"
    331332                  text run at (65,5) width 77: "on this table!"
    332               RenderTableCell {TD} at (114,97) size 90x245 [r=1 c=1 rs=1 cs=1]
    333                 RenderText {#text} at (5,5) size 79x235
    334                   text run at (5,5) width 234: "If there are any borders shown that are"
    335                   text run at (25,5) width 163: "not medium solid red, then "
    336                   text run at (25,168) width 72: "the problem"
    337                   text run at (45,5) width 232: "is something other than what this test is"
    338                   text run at (65,5) width 42: "testing."
    339               RenderTableCell {TD} at (114,344) size 90x222 [r=1 c=2 rs=1 cs=1]
     333              RenderTableCell {TD} at (114,94) size 90x238 [r=1 c=1 rs=1 cs=1]
     334                RenderText {#text} at (5,5) size 79x224
     335                  text run at (5,5) width 211: "If there are any borders shown that"
     336                  text run at (25,5) width 186: "are not medium solid red, then "
     337                  text run at (25,191) width 18: "the"
     338                  text run at (45,5) width 224: "problem is something other than what"
     339                  text run at (65,5) width 104: "this test is testing."
     340              RenderTableCell {TD} at (114,334) size 90x216 [r=1 c=2 rs=1 cs=1]
    340341                RenderText {#text} at (5,5) size 59x175
    341342                  text run at (5,5) width 174: "This table should have a 1em"
     
    343344                  text run at (25,155) width 25: "This"
    344345                  text run at (45,5) width 44: "margin "
    345                   text run at (45,49) width 129: "is measured from the "
    346                 RenderInline {EM} at (0,0) size 39x207
    347                   RenderText {#text} at (45,178) size 39x207
    348                     text run at (45,178) width 34: "outer"
    349                     text run at (65,5) width 30: "edge"
    350                 RenderText {#text} at (65,35) size 19x82
    351                   text run at (65,35) width 82: " of its border."
     346                  text run at (45,49) width 125: "is measured from the"
     347                RenderInline {EM} at (0,0) size 19x68
     348                  RenderText {#text} at (65,5) size 19x68
     349                    text run at (65,5) width 68: "outer edge"
     350                RenderText {#text} at (65,73) size 19x82
     351                  text run at (65,73) width 82: " of its border."
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r138827 r138838  
    39763976webkit.org/b/104595 fast/css/empty-generated-content.html [ Failure ]
    39773977
     3978Bug(ojan) [ Win Lion ] fast/ruby/base-shorter-than-text.html [ Failure ]
     3979Bug(ojan) [ Win Mac ] fast/table/038-vertical.html [ Failure ImageOnlyFailure ]
     3980Bug(ojan) [ Win Mac ] fast/table/border-collapsing/004-vertical.html [ Failure ImageOnlyFailure ]
     3981
    39783982# These are real failues due to 95121.
    39793983# This is spilling caused by LANCZOS3 scaling algorithm that samples outside the source rect.
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r138797 r138838  
    13291329webkit.org/b/91489 fast/dom/shadow/shadowdom-for-fieldset-only-shadow.html [ ImageOnlyFailure ]
    13301330
     1331Bug(ojan) fast/ruby/base-shorter-than-text.html [ Failure ]
     1332Bug(ojan) fast/table/038-vertical.html [ Failure ImageOnlyFailure ]
     1333Bug(ojan) fast/table/border-collapsing/004-vertical.html [ Failure ImageOnlyFailure ]
     1334
    13311335webkit.org/b/49142 fast/regions/style-scoped-in-flow-override-region-styling-multiple-regions.html [ ImageOnlyFailure ]
    13321336
  • trunk/LayoutTests/platform/mac/TestExpectations

    r138828 r138838  
    12381238webkit.org/b/103663 [ MountainLion Lion SnowLeopard ] media/track/track-in-band-cues-added-once.html
    12391239
     1240Bug(ojan) fast/table/038-vertical.html [ Failure ImageOnlyFailure ]
     1241Bug(ojan) fast/table/border-collapsing/004-vertical.html [ Failure ImageOnlyFailure ]
     1242
    12401243webkit.org/b/104104 fast/overflow/scrollbar-click-retains-focus.html [ Failure ]
    12411244
  • trunk/LayoutTests/platform/qt/TestExpectations

    r138817 r138838  
    23972397webkit.org/b/90951 fast/text/shaping
    23982398
     2399Bug(ojan) fast/table/038-vertical.html [ Failure ImageOnlyFailure ]
     2400Bug(ojan) fast/table/border-collapsing/004-vertical.html [ Failure ImageOnlyFailure ]
     2401
    23992402# Flaky tests
    24002403webkit.org/b/91376 http/tests/security/sandboxed-iframe-modify-self.html [ Failure Pass ]
     
    24622465webkit.org/b/100846 inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html [ Skip ]
    24632466
     2467Bug(ojan) fast/table/038-vertical.html [ Failure ImageOnlyFailure ]
     2468Bug(ojan) fast/table/border-collapsing/004-vertical.html [ Failure ImageOnlyFailure ]
     2469
    24642470# QT still has the CC toggle button, not the menu of tracks.
    24652471webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r138836 r138838  
     12013-01-04  Ojan Vafai  <ojan@chromium.org>
     2
     3        Vertical writing mode can overflow fixed size grandparent container
     4        https://bugs.webkit.org/show_bug.cgi?id=93655
     5
     6        Reviewed by David Hyatt.
     7
     8        Add a hook to RenderBox::availableHeight to exclude the containing block's
     9        margin, border and padding. This is for auto-sizing perpendicular writing modes
     10        to restrict to the minimum of the fill-available height and the viewport height.
     11
     12        This will be used in a future patch to implement "height: fill-available".
     13
     14        This behavior was recently specced in http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing.
     15
     16        Test: fast/writing-mode/auto-sizing-orthogonal-flows.html
     17
     18        * rendering/RenderBox.cpp:
     19        (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
     20        (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
     21        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
     22        (WebCore::RenderBox::availableLogicalHeight):
     23        (WebCore::RenderBox::availableLogicalHeightUsing):
     24        * rendering/RenderBox.h:
     25        (RenderBox):
     26        (WebCore::RenderBox::availableWidth):
     27        (WebCore::RenderBox::availableHeight):
     28        * rendering/RenderImage.cpp:
     29        (WebCore::RenderImage::computeIntrinsicRatioInformation):
     30        * rendering/RenderView.cpp:
     31        (WebCore::RenderView::availableLogicalHeight):
     32        * rendering/RenderView.h:
     33        * rendering/svg/RenderSVGRoot.cpp:
     34        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
     35
    1362013-01-04  Joshua Bell  <jsbell@chromium.org>
    237
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r138668 r138838  
    13971397}
    13981398
    1399 LayoutUnit RenderBox::containingBlockLogicalHeightForContent() const
     1399LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHeightType heightType) const
    14001400{
    14011401    if (hasOverrideContainingBlockLogicalHeight())
     
    14031403
    14041404    RenderBlock* cb = containingBlock();
    1405     return cb->availableLogicalHeight();
     1405    return cb->availableLogicalHeight(heightType);
    14061406}
    14071407
     
    14331433        containingBlockRegion = cb->clampToStartAndEndRegions(region);
    14341434    }
    1435     return cb->availableLogicalWidthForLine(logicalTopPosition, false, containingBlockRegion, adjustedPageOffsetForContainingBlock, availableLogicalHeight());
     1435    return cb->availableLogicalWidthForLine(logicalTopPosition, false, containingBlockRegion, adjustedPageOffsetForContainingBlock, availableLogicalHeight(IncludeMarginBorderPadding));
    14361436}
    14371437
     
    14471447    RenderStyle* containingBlockStyle = cb->style();
    14481448    Length logicalHeightLength = containingBlockStyle->logicalHeight();
    1449    
     1449
    14501450    // FIXME: For now just support fixed heights.  Eventually should support percentage heights as well.
    14511451    if (!logicalHeightLength.isFixed()) {
    1452         // Rather than making the child be completely unconstrained, WinIE uses the viewport width and height
    1453         // as a constraint.  We do that for now as well even though it's likely being unconstrained is what the spec
    1454         // will decide.
    1455         return containingBlockStyle->isHorizontalWritingMode() ? view()->frameView()->visibleHeight() : view()->frameView()->visibleWidth();
    1456     }
    1457    
     1452        LayoutUnit fillFallbackExtent = containingBlockStyle->isHorizontalWritingMode() ? view()->frameView()->visibleHeight() : view()->frameView()->visibleWidth();
     1453        LayoutUnit fillAvailableExtent = containingBlock()->availableLogicalHeight(ExcludeMarginBorderPadding);
     1454        return min(fillAvailableExtent, fillFallbackExtent);
     1455    }
     1456
    14581457    // Use the content box logical height as specified by the style.
    14591458    return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.value());
     
    18651864    LayoutUnit containerLogicalWidth = max<LayoutUnit>(0, containingBlockLogicalWidthForContentInRegion(region, offsetFromLogicalTopOfFirstPage));
    18661865    bool hasPerpendicularContainingBlock = cb->isHorizontalWritingMode() != isHorizontalWritingMode();
    1867     LayoutUnit containerWidthInInlineDirection = containerLogicalWidth;
    1868     if (hasPerpendicularContainingBlock)
    1869         containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight();
    18701866   
    18711867    if (isInline() && !isInlineBlockOrInlineTable()) {
     
    18831879        computedValues.m_extent = logicalWidthLength.value() + borderAndPaddingLogicalWidth();
    18841880    else {
     1881        LayoutUnit containerWidthInInlineDirection = containerLogicalWidth;
     1882        if (hasPerpendicularContainingBlock)
     1883            containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight();
    18851884        LayoutUnit preferredWidth = computeLogicalWidthInRegionUsing(MainOrPreferredSize, containerWidthInInlineDirection, cb, region, offsetFromLogicalTopOfFirstPage);
    18861885        computedValues.m_extent = constrainLogicalWidthInRegionByMinMax(preferredWidth, containerWidthInInlineDirection, cb, region, offsetFromLogicalTopOfFirstPage);
     
    25222521                availableHeight = containingBlockLogicalHeightForPositioned(toRenderBoxModelObject(cb));
    25232522            else {
    2524                 availableHeight = containingBlockLogicalHeightForContent();
     2523                availableHeight = containingBlockLogicalHeightForContent(IncludeMarginBorderPadding);
    25252524                // It is necessary to use the border-box to match WinIE's broken
    25262525                // box model.  This is essential for sizing inside
     
    25502549}
    25512550
    2552 LayoutUnit RenderBox::availableLogicalHeight() const
    2553 {
    2554     return availableLogicalHeightUsing(style()->logicalHeight());
    2555 }
    2556 
    2557 LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h) const
     2551LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightType) const
     2552{
     2553    return availableLogicalHeightUsing(style()->logicalHeight(), heightType);
     2554}
     2555
     2556LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogicalHeightType heightType) const
    25582557{
    25592558    if (isRenderView())
     
    25902589
    25912590    // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
    2592     return containingBlockLogicalHeightForContent();
     2591    LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightType);
     2592    if (heightType == ExcludeMarginBorderPadding) {
     2593        // FIXME: Margin collapsing hasn't happened yet, so this incorrectly removes collapsed margins.
     2594        availableHeight -= marginBefore() + marginAfter() + borderAndPaddingLogicalHeight();
     2595    }
     2596    return availableHeight;
    25932597}
    25942598
  • trunk/Source/WebCore/rendering/RenderBox.h

    r138668 r138838  
    3838
    3939enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
    40 
     40enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorderPadding };
    4141enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayScrollbarSize };
    4242
     
    384384
    385385    virtual LayoutUnit containingBlockLogicalWidthForContent() const;
    386     LayoutUnit containingBlockLogicalHeightForContent() const;
     386    LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType) const;
    387387
    388388    LayoutUnit containingBlockLogicalWidthForContentInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
     
    430430    // Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.)
    431431    virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); }
    432     virtual LayoutUnit availableLogicalHeight() const;
    433     LayoutUnit availableLogicalHeightUsing(const Length&) const;
     432    virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const;
     433    LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeightType) const;
    434434   
    435435    // There are a few cases where we need to refer specifically to the available physical width and available physical height.
    436436    // Relative positioning is one of those cases, since left/top offsets are physical.
    437     LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(); }
    438     LayoutUnit availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight() : availableLogicalWidth(); }
     437    LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding); }
     438    LayoutUnit availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight(IncludeMarginBorderPadding) : availableLogicalWidth(); }
    439439
    440440    virtual int verticalScrollbarWidth() const;
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r138770 r138838  
    568568            RenderBox* box = toRenderBox(containingBlock);
    569569            intrinsicSize.setWidth(box->availableLogicalWidth());
    570             intrinsicSize.setHeight(box->availableLogicalHeight());
     570            intrinsicSize.setHeight(box->availableLogicalHeight(IncludeMarginBorderPadding));
    571571        }
    572572    }
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r138113 r138838  
    122122}
    123123
    124 LayoutUnit RenderView::availableLogicalHeight() const
     124LayoutUnit RenderView::availableLogicalHeight(AvailableLogicalHeightType heightType) const
    125125{
    126126    // If we have columns, then the available logical height is reduced to the column height.
    127127    if (hasColumns())
    128128        return columnInfo()->columnHeight();
    129     return RenderBlock::availableLogicalHeight();
     129    return RenderBlock::availableLogicalHeight(heightType);
    130130}
    131131
  • trunk/Source/WebCore/rendering/RenderView.h

    r138040 r138838  
    6666    virtual void computePreferredLogicalWidths() OVERRIDE;
    6767
    68     virtual LayoutUnit availableLogicalHeight() const OVERRIDE;
     68    virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const OVERRIDE;
    6969
    7070    // The same as the FrameView's layoutHeight/layoutWidth but with null check guards.
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r138332 r138838  
    207207            RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*>(this));
    208208
    209         return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight(), view());
     209        return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), containingBlock()->availableLogicalHeight(IncludeMarginBorderPadding), view());
    210210    }
    211211
    212212    // SVG embedded through object/embed/iframe.
    213213    if (isEmbeddedThroughFrameContainingSVGDocument())
    214         return document()->frame()->ownerRenderer()->availableLogicalHeight();
     214        return document()->frame()->ownerRenderer()->availableLogicalHeight(IncludeMarginBorderPadding);
    215215
    216216    // SVG embedded via SVGImage (background-image/border-image/etc) / Inline SVG.
Note: See TracChangeset for help on using the changeset viewer.