Skip to content
Permalink
Browse files
WebKit ignores the nowrap on 'td nowrap="nowrap"', if an absolute wid…
…th is specified

WebKit ignores the nowrap on 'td nowrap="nowrap"', if an absolute width is specified

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

Reviewed by Tim Nguyen.

Merge - https://chromium.googlesource.com/chromium/src/+/5e6c851254f90f6f495713f7248ffe9a155de413

Previously we only applied it when a 'td' element had no fixed-width. This was incorrect behavior and it will align Webkit with Blink and Gecko for Web interop.

* Source/WebCore/html/HTMLTableCellElement.cpp
(HTMLTableCellElement::hasPresentationalHintsForAttribute): Update nowrap Attribute to respect CSSValueNowrap rather than CSSValueWebkitNowrap
* Source/WebCore/style/StyleAdjuster.cpp
(Adjuster:adjust): Removed logic about td tag only accepting wrap for Fixed Width
* LayoutTests/imported/w3c/web-platform-tests/quirks/table-cell-nowrap-minimum-width-calculation-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/fast/table/003-expected.png: Updated Test Expectations
* LayoutTests/platform/gtk/fast/table/003-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/fast/tables/021-expected.png: Updated Test Expectations
* LayoutTests/platform/glib/fast/tables/021-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/fast/table/rowspan-paint-order-vertical-expected.png: Updated Test Expectations
* LayoutTests/platform/gtk/fast/table/rowspan-paint-order-vertical-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug57828-expected.png: Updated Test Expectations
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug78162-expected.png: Updated Test Expectations
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug78162-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug92143-expected.txt: Updated Test Expectations
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug92143-expected.png: Updated Test Expectations
* LayoutTests/platform/ios/fast/table/021-expected.txt: Updated Test Expectations
* LayoutTests/platform/ios/fast/table/rowspan-paint-order-vertical-expected.txt: Updated Test Expectations
* LayoutTests/platform/ios/tables/mozilla/bugs/bug57828-expected.txt: Updated Test Expectations
* LayoutTests/platform/ios/tables/mozilla/bugs/bug78162-expected.txt: Updated Tests Expectations
* LayoutTests/platform/ios/tables/mozilla/bugs/bug92143-expected.txt: Updated Tests Expectations
* LayoutTests/platform/mac/fast/table/003-expected.png: Updated Tests Expectations
* LayoutTests/platform/mac/fast/table/003-expected.txt: Updated Test Expectations
* LayoutTests/platform/mac/fast/table/021-expected.png: Updated Test Expectations
* LayoutTests/platform/mac/fast/table/021-expected.txt: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug57828-expected.png: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug57828-expected.txt: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug78162-expected.png: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug78162-expected.txt: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug92143-expected.png: Updated Test Expectations
* LayoutTests/platform/mac/fast/tables/mozilla/bugs/bug92143-expected.txt: Updated Test Expectations
* LayoutTests/platform/mac/fast/table/rowspan-paint-order-vertical-expected.png: Updated Test Expectations
* LayoutTests/platform/mac/fast/table/rowspan-paint-order-vertical-expected.txt: Updated Test Expectations
* LayoutTests/platform/glib/mozilla/bugs/bug57828-expected.txt: Updated Test Expectations

Canonical link: https://commits.webkit.org/254505@main
  • Loading branch information
Ahmad Saleem authored and nt1m committed Sep 15, 2022
1 parent 22a8b55 commit cb185fe86778b050c880e1922fb949ad02efec10
Show file tree
Hide file tree
Showing 32 changed files with 349 additions and 397 deletions.
@@ -1,3 +1,3 @@

FAIL The table cell nowrap minimum width calculation quirk, basic assert_equals: quirks mode expected "10px" but got "8px"
FAIL The table cell nowrap minimum width calculation quirk, basic assert_equals: quirks mode expected "10px" but got "2px"

@@ -3,13 +3,12 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderTable {TABLE} at (0,0) size 153x42
RenderTableSection {TBODY} at (0,0) size 153x42
RenderTableRow {TR} at (0,2) size 153x38
RenderTableCell {TD} at (2,2) size 49x38 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 47x35
text run at (1,1) width 29: "first-"
text run at (1,19) width 47: "column"
RenderTableCell {TD} at (53,11) size 98x20 [bgcolor=#BBBBBB] [r=0 c=1 rs=1 cs=1]
RenderTable {TABLE} at (0,0) size 182x24
RenderTableSection {TBODY} at (0,0) size 182x24
RenderTableRow {TR} at (0,2) size 182x20
RenderTableCell {TD} at (2,2) size 78x20 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 76x17
text run at (1,1) width 76: "first-column"
RenderTableCell {TD} at (82,2) size 98x20 [bgcolor=#BBBBBB] [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (1,1) size 96x17
text run at (1,1) width 96: "second-column"
@@ -21,21 +21,19 @@ layer at (0,0) size 800x600
text run at (45,2) width 207: "NOWRAP cell, no width on cell"
RenderBlock (anonymous) at (0,126) size 784x18
RenderBR {BR} at (0,0) size 0x17
RenderTable {TABLE} at (0,144) size 110x108 [border: (3px outset #808080)]
RenderTableSection {TBODY} at (3,3) size 104x102
RenderTableRow {TR} at (0,2) size 104x98
RenderTableCell {TD} at (2,2) size 100x98 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (0,144) size 188x54 [border: (3px outset #808080)]
RenderTableSection {TBODY} at (3,3) size 182x48
RenderTableRow {TR} at (0,2) size 182x44
RenderTableCell {TD} at (2,2) size 178x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderImage {IMG} at (2,2) size 40x40
RenderText {#text} at (2,42) size 71x53
text run at (2,42) width 71: "NOWRAP"
text run at (2,60) width 26: "cell,"
text run at (2,78) width 69: "width=100"
RenderBlock (anonymous) at (0,252) size 784x18
RenderText {#text} at (45,2) size 174x17
text run at (45,2) width 174: "NOWRAP cell, width=100"
RenderBlock (anonymous) at (0,198) size 784x18
RenderBR {BR} at (0,0) size 0x17
RenderTable {TABLE} at (0,270) size 310x54 [border: (3px outset #808080)]
RenderTableSection {TBODY} at (3,3) size 304x48
RenderTableRow {TR} at (0,2) size 304x44
RenderTableCell {TD} at (2,2) size 300x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (0,216) size 188x54 [border: (3px outset #808080)]
RenderTableSection {TBODY} at (3,3) size 182x48
RenderTableRow {TR} at (0,2) size 182x44
RenderTableCell {TD} at (2,2) size 178x44 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderImage {IMG} at (2,2) size 40x40
RenderText {#text} at (45,2) size 174x17
text run at (45,2) width 174: "NOWRAP cell, width=300"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -36,36 +36,30 @@ layer at (0,0) size 800x600
RenderTableRow {TR} at (0,74) size 209x46
RenderTableCell {TD} at (2,74) size 205x46 [border: (1px inset #808080)] [r=3 c=0 rs=1 cs=1]
RenderText {#text} at (0,0) size 0x0
RenderTable {TABLE} at (0,278) size 106x78
RenderTableSection {TBODY} at (0,0) size 106x78
RenderTableRow {TR} at (0,2) size 106x74
RenderTableCell {TD} at (2,2) size 102x74 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 100x71
text run at (1,1) width 87: "I should wrap"
text run at (1,19) width 81: "and not have"
text run at (1,37) width 56: "nowrap. "
text run at (57,37) width 44: "I really"
text run at (1,55) width 46: "should."
RenderTable {TABLE} at (0,356) size 106x78
RenderTableSection {TBODY} at (0,0) size 106x78
RenderTableRow {TR} at (0,2) size 106x74
RenderTableCell {TD} at (2,2) size 102x74 [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (1,1) size 100x72
RenderText {#text} at (0,0) size 100x71
text run at (0,0) width 87: "I should wrap"
text run at (0,18) width 81: "and not have"
text run at (0,36) width 56: "nowrap. "
text run at (56,36) width 44: "I really"
text run at (0,54) width 46: "should."
RenderTable {TABLE} at (0,434) size 368x24
RenderTable {TABLE} at (0,278) size 332x24
RenderTableSection {TBODY} at (0,0) size 332x24
RenderTableRow {TR} at (0,2) size 332x20
RenderTableCell {TD} at (2,2) size 328x20 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 326x17
text run at (1,1) width 232: "I should wrap and not have nowrap. "
text run at (233,1) width 94: "I really should."
RenderTable {TABLE} at (0,302) size 332x24
RenderTableSection {TBODY} at (0,0) size 332x24
RenderTableRow {TR} at (0,2) size 332x20
RenderTableCell {TD} at (2,2) size 328x20 [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (1,1) size 326x18
RenderText {#text} at (0,0) size 326x17
text run at (0,0) width 232: "I should wrap and not have nowrap. "
text run at (232,0) width 94: "I really should."
RenderTable {TABLE} at (0,326) size 368x24
RenderTableSection {TBODY} at (0,0) size 368x24
RenderTableRow {TR} at (0,2) size 368x20
RenderTableCell {TD} at (2,2) size 364x20 [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (1,1) size 362x17
text run at (1,1) width 145: "I should have nowrap. "
text run at (146,1) width 98: "I really should. "
text run at (244,1) width 119: "Definitely. Should."
RenderTable {TABLE} at (0,458) size 368x24
RenderTable {TABLE} at (0,350) size 368x24
RenderTableSection {TBODY} at (0,0) size 368x24
RenderTableRow {TR} at (0,2) size 368x20
RenderTableCell {TD} at (2,2) size 364x20 [r=0 c=0 rs=1 cs=1]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -5,56 +5,55 @@ layer at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderTable {TABLE} at (0,0) size 100x580 [border: (2px outset #808080)]
RenderTableSection {TBODY} at (2,2) size 96x576
RenderTableRow {TR} at (0,0) size 38x576
RenderTableRow {TR} at (0,0) size 22x576
RenderTableCell {TD} at (0,20) size 96x-2 [bgcolor=#AAAAAA] [border: (1px inset #808080)] [r=0 c=0 rs=3 cs=1]
RenderText {#text} at (21,-19) size 53x36
text run at (21,-19) width 26: "Left"
text run at (39,-19) width 13: "(3"
text run at (57,-19) width 36: "rows)"
RenderTableCell {TD} at (0,61) size 67x177 [bgcolor=#000000] [border: (1px inset #808080)] [r=0 c=1 rs=2 cs=1]
RenderText {#text} at (24,-23) size 18x5
text run at (24,-22) width 5: " "
RenderTableCell {TD} at (0,261) size 38x54 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=10]
RenderText {#text} at (1,4) size 35x48
text run at (1,4) width 45: "Middle"
text run at (19,3) width 47: "(1 row)"
RenderTableCell {TD} at (0,338) size 67x177 [bgcolor=#000000] [border: (1px inset #808080)] [r=0 c=12 rs=2 cs=1]
RenderText {#text} at (24,-23) size 18x5
text run at (24,-22) width 5: " "
RenderTableCell {TD} at (0,558) size 96x-2 [bgcolor=#AAAAAA] [border: (1px inset #808080)] [r=0 c=13 rs=3 cs=1]
RenderTableCell {TD} at (0,57) size 59x163 [bgcolor=#000000] [border: (1px inset #808080)] [r=0 c=1 rs=2 cs=1]
RenderText {#text} at (20,-19) size 18x5
text run at (20,-18) width 5: " "
RenderTableCell {TD} at (0,239) size 22x97 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=10]
RenderText {#text} at (1,1) size 17x97
text run at (1,1) width 96: "Middle (1 row)"
RenderTableCell {TD} at (0,356) size 59x163 [bgcolor=#000000] [border: (1px inset #808080)] [r=0 c=12 rs=2 cs=1]
RenderText {#text} at (20,-19) size 18x5
text run at (20,-18) width 5: " "
RenderTableCell {TD} at (0,558) size 96x-1 [bgcolor=#AAAAAA] [border: (1px inset #808080)] [r=0 c=13 rs=3 cs=1]
RenderText {#text} at (21,-18) size 53x36
text run at (21,-18) width 35: "Right"
text run at (39,4) width 13: "(3"
text run at (57,-19) width 36: "rows)"
RenderTableRow {TR} at (0,38) size 29x576
RenderTableCell {TD} at (38,265) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,271) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=3 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,277) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=4 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,283) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=5 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,289) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=6 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,295) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=7 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,301) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=8 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,307) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=9 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableCell {TD} at (38,313) size 29x-2 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=10 rs=1 cs=1]
RenderText {#text} at (5,-4) size 18x5
text run at (5,-3) width 5: " "
RenderTableRow {TR} at (0,67) size 29x576
RenderTableCell {TD} at (67,42) size 29x530 [bgcolor=#008000] [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=13]
RenderText {#text} at (5,260) size 18x273
text run at (5,261) width 273: "Bottom Row Overlaps with the Right Cell!"
RenderTableRow {TR} at (0,22) size 37x576
RenderTableCell {TD} at (22,247) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,258) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=3 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,269) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=4 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,280) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=5 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,291) size 37x-6 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=6 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,301) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=7 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,312) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=8 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,323) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=9 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableCell {TD} at (22,334) size 37x-5 [bgcolor=#EEEEEE] [border: (1px inset #808080)] [r=1 c=10 rs=1 cs=1]
RenderText {#text} at (9,-8) size 18x5
text run at (9,-7) width 5: " "
RenderTableRow {TR} at (0,59) size 37x576
RenderTableCell {TD} at (59,46) size 37x522 [bgcolor=#008000] [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=13]
RenderText {#text} at (9,256) size 18x274
text run at (9,257) width 273: "Bottom Row Overlaps with the Right Cell!"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -3,26 +3,26 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584 [bgcolor=#FFFFFF]
RenderTable {TABLE} at (0,0) size 642x172 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 640x170
RenderTableRow {TR} at (0,2) size 640x166
RenderTable {TABLE} at (0,0) size 634x172 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 632x170
RenderTableRow {TR} at (0,2) size 632x166
RenderTableCell {TD} at (2,80) size 124x10 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (2,2) size 120x6
RenderTableSection {TBODY} at (0,0) size 120x6
RenderTableRow {TR} at (0,2) size 120x2
RenderTableCell {TD} at (2,2) size 116x2 [r=0 c=0 rs=1 cs=1]
RenderTableCell {TD} at (128,2) size 510x166 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderTable {TABLE} at (2,2) size 506x162 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 504x160
RenderTableRow {TR} at (0,2) size 504x156
RenderTableCell {TD} at (2,2) size 500x156 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (2,2) size 496x80
RenderTableSection {TBODY} at (0,0) size 496x80
RenderTableRow {TR} at (0,10) size 496x60
RenderTableCell {TD} at (10,10) size 476x60 [r=0 c=0 rs=1 cs=1]
RenderTableCell {TD} at (128,2) size 502x166 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderTable {TABLE} at (2,2) size 498x162 [border: (1px outset #808080)]
RenderTableSection {TBODY} at (1,1) size 496x160
RenderTableRow {TR} at (0,2) size 496x156
RenderTableCell {TD} at (2,2) size 492x156 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderTable {TABLE} at (2,2) size 488x80
RenderTableSection {TBODY} at (0,0) size 488x80
RenderTableRow {TR} at (0,10) size 488x60
RenderTableCell {TD} at (10,10) size 468x60 [r=0 c=0 rs=1 cs=1]
RenderInline {A} at (0,0) size 468x17 [color=#0000EE]
RenderImage {IMG} at (0,0) size 468x60
RenderBlock (anonymous) at (2,82) size 496x72
RenderBlock (anonymous) at (2,82) size 488x72
RenderText {#text} at (0,0) size 480x71
text run at (0,0) width 295: "Your donation to protect our wildlife was paid "
text run at (294,0) width 167: "for by the sponsors on this"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb185fe

Please sign in to comment.