Bug 209669

Summary: [AutoSizing] Bring back the old auto-sizing code as a deprecated codepath for compatibility reasons
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Layout and RenderingAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, darin, graouts, simon.fraser, thorton, timothy, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=196743
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Antoine Quint 2020-03-27 11:17:27 PDT
[AutoSizing] Bring back the old auto-sizing code as a deprecated codepath for compatibility reasons
Comment 1 Antoine Quint 2020-03-27 11:25:16 PDT
Created attachment 394735 [details]
Patch
Comment 2 zalan 2020-03-27 11:33:43 PDT
Comment on attachment 394735 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394735&action=review

> Source/WebCore/page/FrameViewLayoutContext.cpp:236
>          view().autoSizeIfEnabled();
> +        view().legacyAutoSizeIfEnabled();

Can we instead move it to autoSizeIfEnabled and branch in there for legacy behavior?
Comment 3 Simon Fraser (smfr) 2020-03-27 12:39:02 PDT
Please include the radar.
Comment 4 Simon Fraser (smfr) 2020-03-27 12:41:46 PDT
Can we also rename to avoid confusion with text autosizing.
Comment 5 Antoine Quint 2020-03-27 13:18:30 PDT
Created attachment 394750 [details]
Patch
Comment 6 zalan 2020-03-27 14:21:41 PDT
FrameView&co looks good!
Comment 7 Antoine Quint 2020-03-28 02:36:26 PDT
Created attachment 394799 [details]
Patch
Comment 8 Antoine Quint 2020-03-28 03:06:33 PDT
Created attachment 394803 [details]
Patch
Comment 9 Antoine Quint 2020-03-28 03:30:14 PDT
Created attachment 394809 [details]
Patch
Comment 10 Simon Fraser (smfr) 2020-03-29 08:35:32 PDT
Comment on attachment 394809 [details]
Patch

Can we call this something other than "deprecated" auto-size mode? How does it differ from the non-deprecated one?
Comment 11 zalan 2020-03-29 08:39:28 PDT
(In reply to Simon Fraser (smfr) from comment #10)
> Comment on attachment 394809 [details]
> Patch
> 
> Can we call this something other than "deprecated" auto-size mode? How does
> it differ from the non-deprecated one?
It's very different. The old auto-size flattens the content, the new one does not. The current auto-size code pretty much just lays out the content with a fixed constraint and reports the intrinsic size.
Comment 12 Darin Adler 2020-03-29 08:46:33 PDT
Comment on attachment 394809 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394809&action=review

This looks OK but I’m very surprised that we are not adding any tests for this

> Source/WebCore/page/FrameView.h:710
> +    enum class AutoSizeMode : uint8_t { Default, Deprecated };

Could use bool instead of uint8_t. Do we know if one is superior?
Comment 13 Antoine Quint 2020-03-29 10:59:26 PDT
Created attachment 394870 [details]
Patch
Comment 14 Antoine Quint 2020-03-29 12:35:20 PDT
Created attachment 394872 [details]
Patch
Comment 15 Antoine Quint 2020-03-29 12:37:29 PDT
Created attachment 394874 [details]
Patch
Comment 16 Antoine Quint 2020-03-29 13:43:17 PDT
Created attachment 394876 [details]
Patch
Comment 17 Antoine Quint 2020-03-30 00:33:42 PDT
https://trac.webkit.org/changeset/259187/webkit
Comment 18 Radar WebKit Bug Importer 2020-03-30 00:34:14 PDT
<rdar://problem/61044059>
Comment 19 Antoine Quint 2020-03-30 00:38:24 PDT
<rdar://problem/60111081>
Comment 20 Timothy Hatcher 2020-06-09 10:21:27 PDT
Comment on attachment 394876 [details]
Patch

Clearing review flag. This landed.