Bug 152644

Summary: REGRESSION(r194143): Float width incorrectly calculated on Wikipedia
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: Layout and RenderingAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, beidson, commit-queue, darin, dbates, esprehn+autocc, glenn, hyatt, kondapallykalyan, simon.fraser, svillar, zalan
Priority: P2 Keywords: Regression
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Screenshot
none
Reproduction
none
Reproduction
none
Patch none

Description Myles C. Maxfield 2016-01-01 18:02:24 PST
https://en.m.wikipedia.org/wiki/Tteokbokki
Version 9.0.2 (11601.3.9, r194284)
15C50

See screenshot.
Comment 1 Myles C. Maxfield 2016-01-01 18:02:52 PST
Created attachment 268076 [details]
Screenshot
Comment 2 Myles C. Maxfield 2016-01-01 18:03:50 PST
Does not reproduce on system Safari on 15C50. Regression.
Comment 3 Myles C. Maxfield 2016-01-01 18:04:36 PST
Created attachment 268077 [details]
Reproduction
Comment 4 Myles C. Maxfield 2016-01-01 19:49:26 PST
Created attachment 268079 [details]
Reproduction
Comment 5 Myles C. Maxfield 2016-01-01 20:14:07 PST
Caused by http://trac.webkit.org/changeset/194143
Comment 6 Myles C. Maxfield 2016-01-01 21:18:37 PST
The relevant portion of the spec is:

"The max-content inline size of a block container box is the inline-size of the box after layout, if all children are sized under a max-content constraint."

However, it seems that computing the max content inline size can't depend on layout, because layout may require knowing the max content inline size (such in the case of floats)
Comment 7 Myles C. Maxfield 2016-01-01 21:18:59 PST
Hyatt: Do you have any thoughts on the above comment?
Comment 8 Sergio Villar Senin 2016-01-04 01:45:42 PST
(In reply to comment #5)
> Caused by http://trac.webkit.org/changeset/194143

Checking...
Comment 9 Sergio Villar Senin 2016-01-04 02:58:20 PST
Created attachment 268180 [details]
Patch
Comment 10 Myles C. Maxfield 2016-01-04 14:04:50 PST
(In reply to comment #6)
> The relevant portion of the spec is:
> 
> "The max-content inline size of a block container box is the inline-size of
> the box after layout, if all children are sized under a max-content
> constraint."
> 
> However, it seems that computing the max content inline size can't depend on
> layout, because layout may require knowing the max content inline size (such
> in the case of floats)

Turns out the "layout" that this spec mentions isn't a regular layout - it has special rules (such as percentages resolved against an intrinsic computation resolve to auto, and max intrinsic sizes are unconstrained). So there isn't a circular dependency. There's a fair amount of history here; we choose our faster computeBlockPreferredLogicalWidth() rather than a full-on layout (with a special mode) because it gives results which are almost always correct, and is much faster.
Comment 11 WebKit Commit Bot 2016-01-04 14:44:00 PST
Comment on attachment 268180 [details]
Patch

Clearing flags on attachment: 268180

Committed r194558: <http://trac.webkit.org/changeset/194558>
Comment 12 WebKit Commit Bot 2016-01-04 14:44:07 PST
All reviewed patches have been landed.  Closing bug.