Bug 209669 - [AutoSizing] Bring back the old auto-sizing code as a deprecated codepath for compatibility reasons
Summary: [AutoSizing] Bring back the old auto-sizing code as a deprecated codepath for...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-27 11:17 PDT by Antoine Quint
Modified: 2020-06-09 10:21 PDT (History)
8 users (show)

See Also:


Attachments
Patch (35.46 KB, patch)
2020-03-27 11:25 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (35.66 KB, patch)
2020-03-27 13:18 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (35.77 KB, patch)
2020-03-28 02:36 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (35.62 KB, patch)
2020-03-28 03:06 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (35.63 KB, patch)
2020-03-28 03:30 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (39.44 KB, patch)
2020-03-29 10:59 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (42.00 KB, patch)
2020-03-29 12:35 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (42.02 KB, patch)
2020-03-29 12:37 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (43.36 KB, patch)
2020-03-29 13:43 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.