-
Notifications
You must be signed in to change notification settings - Fork 1.6k
max-width do not work on tables #41759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
max-width do not work on tables #41759
Conversation
EWS run on previous version of this PR (hash 82328a8) |
82328a8
to
4359309
Compare
EWS run on previous version of this PR (hash 4359309) |
TODO: Fix failing test case. |
https://wpt.fyi/results/css/css-flexbox/table-as-item-specified-width.html
|
The test was failing on chrome too in the past. |
There is a special check to change the behavior of flexbox when the child node is a table and only for row it seems. But the current code is doing something different it seems. |
Yes - I will look into over weekend. Right now, trying to sync some tests and do CSS2 fixes + one SVG Paint Server fix. |
4359309
to
02a28ee
Compare
EWS run on previous version of this PR (hash 02a28ee) |
https://bugs.webkit.org/show_bug.cgi?id=12396 rdar://96554687 Reviewed by NOBODY (OOPS!). This aligns WebKit with Gecko / Firefox and Blink / Chromium. Merge: https://chromium.googlesource.com/chromium/src.git/+/364480a952dc2eb710b26f82543e08bd4bac825b The issue was that we would set the minimum logical width to the 'width' but wouldn't apply the 'max-width' in this case. Note that we shouldn't apply 'max-width' in all cases or else we could end up having the content overflow its containing table (which is not allowed per the specification). This fix also address FIXME added by Blink by o ensure the computed minimum preferred logical width never falls below the intrinsic content width. Previously, the fixed table width could override the content size, potentially violating layout expectations and differing from other browsers. Also we add condition that the quirk does not apply to flexbox. * Source/WebCore/rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks const): * LayoutTests/fast/table/table-with-content-width-exceeding-max-width.html: * LayoutTests/fast/table/table-width-exceeding-max-width.html: * LayoutTests/fast/table/table-with-content-width-exceeding-max-width-expected.txt: * LayoutTests/fast/table/table-width-exceeding-max-width-expected.txt:
02a28ee
to
67060bc
Compare
EWS run on current version of this PR (hash 67060bc) |
It is whack a mole - I fixed one and now another test failure showed up. Now onto next. |
all my support. |
@sammygill - Any idea - where should I look into Flexbox code to make it work? Any help / pointers? |
if (m_table->parent() && m_table->parent()->isFlexibleBoxIncludingDeprecated()) | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not seem to be the right direction. This logic should be part of the flex layout; flex layout comes across a table as flex item and it tells the flex item, please do not apply your BFC quirks. (also this changes -webkit-box
behavior, is that intentional?)
67060bc
67060bc
🛠 wpe🛠 win🧪 wpe-wk2🧪 win-tests🧪 api-wpe🛠 gtk🧪 gtk-wk2🧪 api-gtk