RESOLVED FIXED 222581
[css-flexbox] CDC COVID Vaccine Tracker: Safari garbles data table
https://bugs.webkit.org/show_bug.cgi?id=222581
Summary [css-flexbox] CDC COVID Vaccine Tracker: Safari garbles data table
zalan
Reported 2021-03-01 16:26:04 PST
Visit https://covid.cdc.gov/covid-data-tracker/#vaccinations In Safari, the data table is totally garbled and missing nearly all data (In Chrome, it renders as expected) <rdar://problem/74653849>
Attachments
Broken site (webarchive) (1.89 MB, application/zip)
2021-03-02 09:47 PST, Simon Fraser (smfr)
no flags
Reduced test case (6.02 KB, text/html)
2021-03-02 16:16 PST, Brent Fulgham
no flags
Super-reduced test case (475 bytes, text/html)
2021-03-04 03:05 PST, Sergio Villar Senin
no flags
Patch (12.18 KB, patch)
2021-03-25 10:55 PDT, Sergio Villar Senin
no flags
Patch (12.53 KB, patch)
2021-04-01 04:35 PDT, Sergio Villar Senin
zalan: review+
ews-feeder: commit-queue-
Patch for landing (14.08 KB, patch)
2021-04-12 04:01 PDT, Sergio Villar Senin
no flags
Patch for landing (12.52 KB, patch)
2021-04-12 04:42 PDT, Sergio Villar Senin
no flags
Sergio Villar Senin
Comment 1 2021-03-01 23:25:25 PST
Hmm which version are you using? Is it STP 121? That one had issues with flexbox due to a revert that went into the release. It seems to work fine for me with the current trunk.
Simon Fraser (smfr)
Comment 2 2021-03-02 09:46:15 PST
The live site was fixed. I'm not sure we captured the older, broken version.
Simon Fraser (smfr)
Comment 3 2021-03-02 09:47:00 PST
Created attachment 421953 [details] Broken site (webarchive)
Simon Fraser (smfr)
Comment 4 2021-03-02 09:47:18 PST
Old site attached as a web archive (sorry, you'll need a Mac to open this).
Sergio Villar Senin
Comment 5 2021-03-02 10:48:08 PST
(In reply to Simon Fraser (smfr) from comment #4) > Old site attached as a web archive (sorry, you'll need a Mac to open this). It'd be awesome if someone could provide a reduced test case.
Brent Fulgham
Comment 6 2021-03-02 16:16:48 PST
Created attachment 422018 [details] Reduced test case
Sergio Villar Senin
Comment 7 2021-03-04 03:05:38 PST
Created attachment 422211 [details] Super-reduced test case
Sergio Villar Senin
Comment 8 2021-03-04 09:59:44 PST
OK this is a well known issue in flexbox. It happens with nested flexboxes when the flex-basis is a percentage. The current code that stretches the item forces a relayout of the children because it thinks it has percentage height descendants. That happens because we call computePercentageLogicalHeights() with a mock percentage length to check whether a size is definite and that call performs the addPercentageHeightDescendants() call. We should avoid calling the latter in those cases as we're just trying to figure out whether we can compute the flex-basis used value or not. Fixing this bug will likely improve a bit the performance in those cases as we'll be saving some layouts.
Sergio Villar Senin
Comment 9 2021-03-15 11:45:24 PDT
Sergio Villar Senin
Comment 10 2021-03-25 10:55:18 PDT
Sergio Villar Senin
Comment 11 2021-03-31 02:47:10 PDT
Ping reviewers
Brent Fulgham
Comment 12 2021-03-31 16:50:18 PDT
Comment on attachment 424259 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424259&action=review > Source/WebCore/ChangeLog:14 > + Adding a new parametter to the aforementioned method so that the percentage height descendants map could be left untouched parameter :-) > Source/WebCore/rendering/RenderFlexibleBox.cpp:857 > + bool definite = canComputePercentageFlexBasis(child, flexBasis, false); We no longer do an early return here. Is that an important part of the fix? It seems like this bug fix is mostly about the change made to 'useChildOverridingMainSizeForPercentageResolution'?
Sergio Villar Senin
Comment 13 2021-04-01 00:56:35 PDT
Comment on attachment 424259 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424259&action=review >> Source/WebCore/ChangeLog:14 >> + Adding a new parametter to the aforementioned method so that the percentage height descendants map could be left untouched > > parameter :-) :) >> Source/WebCore/rendering/RenderFlexibleBox.cpp:857 >> + bool definite = canComputePercentageFlexBasis(child, flexBasis, false); > > We no longer do an early return here. Is that an important part of the fix? It seems like this bug fix is mostly about the change made to 'useChildOverridingMainSizeForPercentageResolution'? That's right, the important part are the changes made to RenderBox so that it does not unconditionally add a child to the list of percentage height descendants just because we're calling a method to resolve a percentage. We don't do early returns indeed but that isn't really important because we do them in canComputePercentageFlexBasis(). What matters here is whether the size is definite or not. That said I have just noticed that we're changing the behaviour slightly here. In the case of !isColumnFlow() we were early returning true without updating the m_hasDefiniteHeight value. However with the refactoring we'd be setting true. I have to change that.
Sergio Villar Senin
Comment 14 2021-04-01 04:35:54 PDT
Created attachment 424885 [details] Patch Also replaced bool by enum in the parameter type to make the API saner
Sergio Villar Senin
Comment 15 2021-04-06 01:54:25 PDT
Ping reviewers.
EWS
Comment 16 2021-04-10 16:33:08 PDT
Tools/Scripts/svn-apply failed to apply attachment 424885 [details] to trunk. Please resolve the conflicts and upload a new patch.
Sergio Villar Senin
Comment 17 2021-04-12 04:01:33 PDT
Created attachment 425728 [details] Patch for landing
Sergio Villar Senin
Comment 18 2021-04-12 04:42:11 PDT
Created attachment 425731 [details] Patch for landing
Sergio Villar Senin
Comment 19 2021-04-13 02:14:33 PDT
Note You need to log in before you can comment on or make changes to this bug.