Changeset 276572 in webkit
- Timestamp:
- Apr 25, 2021 2:00:07 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-with-percent-intrinsic-width-expected.txt (modified) (1 diff)
-
LayoutTests/platform/glib/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/AutoTableLayout.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderTable.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r276562 r276572 1 2021-04-25 Felipe Erias <felipeerias@igalia.com> 2 3 [css-flexbox] Table layout disregards overriding width 4 https://bugs.webkit.org/show_bug.cgi?id=224934 5 6 Reviewed by Darin Adler. 7 8 * TestExpectations: Remove three WPT tests that now pass. 9 * platform/glib/TestExpectations: Remove one WPT test that now passes. 10 * platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/flex-item-contains-strict-expected.txt: Added. 11 1 12 2021-04-24 Tim Horton <timothy_horton@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r276558 r276572 3965 3965 # Tables as flex items. 3966 3966 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-fixed-min-width-3.html [ ImageOnlyFailure ] 3967 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-percent-width-cell-001.html [ ImageOnlyFailure ]3968 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-width.html [ ImageOnlyFailure ]3969 3967 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-1.html [ ImageOnlyFailure ] 3970 3968 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-2.html [ ImageOnlyFailure ] 3971 3969 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-row-2.html [ ImageOnlyFailure ] 3972 3970 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-specified-height.html [ ImageOnlyFailure ] 3973 webkit.org/b/221473 imported/w3c/web-platform-tests/css/css-flexbox/table-item-flex-percentage-width.html [ ImageOnlyFailure ]3974 3971 3975 3972 # SVGs as flex items. -
trunk/LayoutTests/imported/w3c/ChangeLog
r276554 r276572 1 2021-04-25 Felipe Erias <felipeerias@igalia.com> 2 3 [css-flexbox] Table layout disregards overriding width 4 https://bugs.webkit.org/show_bug.cgi?id=224934 5 6 Reviewed by Darin Adler. 7 8 Update expectations. 9 10 * web-platform-tests/css/css-flexbox/table-with-percent-intrinsic-width-expected.txt: This test now passes. 11 1 12 2021-04-24 Antoine Quint <graouts@webkit.org> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/table-with-percent-intrinsic-width-expected.txt
r272644 r276572 1 1 2 FAIL table 1 assert_equals: 3 <div class="container"> 4 <div class="left"> 5 </div> 6 <table style="width:100%" data-expected-width="100"> 7 <tbody><tr><td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 8 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 9 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 10 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 11 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 12 </tr></tbody></table> 13 </div> 14 width expected 100 but got 200 15 FAIL table 2 assert_equals: 16 <div class="container"> 17 <div class="left"> 18 </div> 19 <table style="width:70%; flex-basis: 200px" data-expected-width="100"> 20 <tbody><tr><td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 21 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 22 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 23 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 24 <td data-expected-width="20"><div class="spacer"></div><div class="spacer"></div></td> 25 </tr></tbody></table> 26 </div> 27 width expected 100 but got 140 2 PASS table 1 3 PASS table 2 28 4 -
trunk/LayoutTests/platform/glib/TestExpectations
r276491 r276572 435 435 436 436 webkit.org/b/214682 imported/w3c/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html [ Pass Failure ] 437 438 webkit.org/b/169007 imported/w3c/web-platform-tests/css/css-flexbox/flex-item-contains-strict.html [ Failure ]439 437 440 438 webkit.org/b/216767 css3/font-feature-settings-stylistic-set.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r276565 r276572 1 2021-04-25 Felipe Erias <felipeerias@igalia.com> 2 3 [css-flexbox] Table layout disregards overriding width 4 https://bugs.webkit.org/show_bug.cgi?id=224934 5 6 Reviewed by Darin Adler. 7 8 If a table's parent has set an overriding width on it, that value will get preference over the one from 9 the table's "width" property. This fixes several tests where the width assigned by the flexbox algorithm 10 did not match the width of the table after layout. 11 12 * rendering/AutoTableLayout.cpp: 13 (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks const): Give precedence to the element's 14 overriding width if it has been set. 15 16 * rendering/RenderTable.cpp: 17 (WebCore::RenderTable::updateLogicalWidth): Give precedence to the element's overriding width if it 18 has been set, instead of discarding it if it is smaller than the style width. 19 (WebCore::RenderTable::computePreferredLogicalWidths): Take the overriding width into account when 20 computing the preferred min/max values for the element. 21 1 22 2021-04-25 Tyler Wilcock <twilco.o@protonmail.com> 2 23 -
trunk/Source/WebCore/rendering/AutoTableLayout.cpp
r275462 r276572 281 281 void AutoTableLayout::applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, LayoutUnit& maxWidth) const 282 282 { 283 Length tableLogicalWidth = m_table->style().logicalWidth(); 284 if (tableLogicalWidth.isFixed() && tableLogicalWidth.isPositive()) 283 if (m_table->hasOverridingLogicalWidth()) 284 minWidth = maxWidth = std::max(minWidth, m_table->overridingLogicalWidth()); 285 else if (auto tableLogicalWidth = m_table->style().logicalWidth(); tableLogicalWidth.isFixed() && tableLogicalWidth.isPositive()) 285 286 minWidth = maxWidth = std::max(minWidth, LayoutUnit(tableLogicalWidth.value())); 286 287 } -
trunk/Source/WebCore/rendering/RenderTable.cpp
r276240 r276572 262 262 263 263 Length styleLogicalWidth = style().logicalWidth(); 264 if ((styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive()) || styleLogicalWidth.isIntrinsic()) 264 if (hasOverridingLogicalWidth()) 265 setLogicalWidth(overridingLogicalWidth()); 266 else if ((styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive()) || styleLogicalWidth.isIntrinsic()) 265 267 setLogicalWidth(convertStyleLogicalWidthToComputedWidth(styleLogicalWidth, containerWidthInInlineDirection)); 266 268 else { … … 287 289 setLogicalWidth(std::min(availableContentLogicalWidth, maxWidth)); 288 290 } 289 290 // Our parent might have set an override content logical width on us, so we must respect it. This291 // is how flexbox containers flex or stretch us.292 if (hasOverridingLogicalWidth())293 setLogicalWidth(std::max(logicalWidth(), overridingLogicalWidth()));294 291 295 292 // Ensure we aren't bigger than our max-width style. … … 845 842 for (unsigned i = 0; i < m_captions.size(); i++) 846 843 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth()); 844 845 if (hasOverridingLogicalWidth()) { 846 m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, overridingLogicalWidth()); 847 m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, overridingLogicalWidth()); 848 } 847 849 848 850 auto& styleToUse = style();
Note: See TracChangeset
for help on using the changeset viewer.