Commit 061b1e59 authored by Aleks Totic's avatar Aleks Totic Committed by Chromium LUCI CQ

[TablesNG] width:min/max-content are not table-layout:fixed

Fixed layout table should have definite length.
Previously, we treated all !Auto width tables as fixed.

Fixes external/wpt/css/css-tables/fixed-layout-2.html

Bug: 958381
Change-Id: I98996d3f4760166f06bafb94995709658f8234f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578705
Commit-Queue: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Auto-Submit: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834823}
parent f6dc8972
...@@ -2262,7 +2262,8 @@ class ComputedStyle : public ComputedStyleBase, ...@@ -2262,7 +2262,8 @@ class ComputedStyle : public ComputedStyleBase,
// Table layout utility functions. // Table layout utility functions.
bool IsFixedTableLayout() const { bool IsFixedTableLayout() const {
return TableLayout() == ETableLayout::kFixed && !LogicalWidth().IsAuto(); return TableLayout() == ETableLayout::kFixed &&
!LogicalWidth().IsAutoOrContentOrIntrinsic();
} }
LogicalSize TableBorderSpacing() const { LogicalSize TableBorderSpacing() const {
......
This is a testharness.js-based test. This is a testharness.js-based test.
PASS Table-layout:fixed is not applied when width is auto PASS Table-layout:fixed is not applied when width is auto
FAIL Table-layout:fixed reports it is not applied when width is auto assert_equals: expected "auto" but got "fixed" FAIL Table-layout:fixed reports it is not applied when width is auto assert_equals: expected "auto" but got "fixed"
FAIL Table-layout:fixed is not applied when width is max-content assert_equals: expected 100 but got 0 PASS Table-layout:fixed is not applied when width is max-content
FAIL Table-layout:fixed reports it is not applied when width is max-content assert_equals: expected "auto" but got "fixed" FAIL Table-layout:fixed reports it is not applied when width is max-content assert_equals: expected "auto" but got "fixed"
FAIL Table-layout:fixed is not applied when width is min-content assert_equals: expected 0 but got 100 PASS Table-layout:fixed is not applied when width is min-content
Harness: the test ran to completion. Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment