Bug 243856

Summary: REGRESSION (r288159): Tables layout broken on WPT.FYI
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: TablesAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, gsnedders, koivisto, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   
URL: https://wpt.fyi/results/svg/idlharness.window.html?label=experimental&label=master&aligned&view=subtest
Attachments:
Description Flags
Safari 15.6 vs STP 151
none
Test reduction
none
Patch
none
Patch
none
wpt page fixed with the patch
none
Patch none

Description Ahmad Saleem 2022-08-11 16:21:39 PDT
Hi Team,

After STP 151 release, I noted that the WPT test case layout is broken on following link:

Link - https://wpt.fyi/results/svg/idlharness.window.html?label=experimental&label=master&aligned&view=subtest

Please refer to attached screenshot for Safari 15.6 behavior vs STP 151 behavior.

Unfortunately, I don't have reduction or which bug caused it or whether it is website not following specs.

Thanks!
Comment 1 Ahmad Saleem 2022-08-11 16:23:24 PDT
Created attachment 461551 [details]
Safari 15.6 vs STP 151

For reference to see broken view.
Comment 2 Radar WebKit Bug Importer 2022-08-11 16:38:57 PDT
<rdar://problem/98537484>
Comment 3 zalan 2022-08-11 16:52:34 PDT
regressed at r288159. preferred width computation.
Comment 4 Alexey Proskuryakov 2022-08-11 17:10:51 PDT
That revision landed 7 months ago, can it be an STP 151 regression?
Comment 5 zalan 2022-08-11 17:57:46 PDT
(In reply to Alexey Proskuryakov from comment #4)
> That revision landed 7 months ago, can it be an STP 151 regression?
certainly not an STP 151 regression.
Comment 6 Ahmad Saleem 2022-08-12 04:12:37 PDT
Can I download STP 150 from any website to check if it is recent regression or it is broken since 7 months?

I really doubt, it is broken since 7 months since even Safari 15.6 includes fixes from Safari TP 148 as per blog post:

Link - https://webkit.org/blog/13009/new-webkit-features-in-safari-15-6/

Which was only released 29 June 2022, approx. two months ago..

zalan@webkit.org - I am not saying you are wrong but I just want to help and give better bug report for it is easier to fix. Hence, just asking this question and stuff. Thanks!
Comment 7 zalan 2022-08-12 06:56:13 PDT
(In reply to Ahmad Saleem from comment #6)
> Can I download STP 150 from any website to check if it is recent regression
> or it is broken since 7 months?
> 
> I really doubt, it is broken since 7 months since even Safari 15.6 includes
> fixes from Safari TP 148 as per blog post:
> 
> Link - https://webkit.org/blog/13009/new-webkit-features-in-safari-15-6/
> 
> Which was only released 29 June 2022, approx. two months ago..
> 
> zalan@webkit.org - I am not saying you are wrong but I just want to help and
> give better bug report for it is easier to fix. Hence, just asking this
> question and stuff. Thanks!
Thank you, I really appreciate it!
Comment 8 zalan 2022-08-12 07:09:30 PDT
Created attachment 461560 [details]
Test reduction

This bugs is specific about about incorrect minimum width computations on content starting with punctuation and no wrapping opportunities (e.g. !INHERITS(getEnclosureList) ) combined with "let's break the content at any arbitrary position (word-break: break-all)".

"x!pass_if_this_line_wraps", is supposed to return the width of 'x!' as the minimum width (can't break in-between "x" and "!". However we completely fail to break the content and return the total content width as the minimum width (so min width == max width). This confuses flexing type of layouts (e.g. table) and produces wide columns.
Comment 9 zalan 2022-08-12 21:19:23 PDT
Created attachment 461571 [details]
Patch
Comment 10 zalan 2022-08-12 21:20:24 PDT
Created attachment 461572 [details]
Patch
Comment 11 zalan 2022-08-12 21:21:59 PDT
Created attachment 461573 [details]
wpt page fixed with the patch
Comment 12 zalan 2022-08-13 07:55:19 PDT
Created attachment 461576 [details]
Patch
Comment 13 EWS 2022-08-15 12:21:34 PDT
Committed 253434@main (17ac2cd774fd): <https://commits.webkit.org/253434@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 461576 [details].