Bug 222877

Summary: [perf dashboard] Use ResizeObserver in ComponentBase
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Tools / TestsAssignee: Ryosuke Niwa <rniwa>
Status: NEW ---    
Severity: Normal CC: cathiechen, dewei_zhu, koivisto, sam, simon.fraser, webkit-bug-importer, zhifei_fang
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch sam: review+

Description Ryosuke Niwa 2021-03-06 19:07:44 PST
Modernize ComponentBase and related classes using technologies shipped in Safari 14.
Comment 1 Ryosuke Niwa 2021-03-06 19:25:13 PST
Created attachment 422518 [details]
Patch
Comment 2 Ryosuke Niwa 2021-03-06 19:45:45 PST
Comment on attachment 422518 [details]
Patch

Actually, this broke something.
Comment 3 Ryosuke Niwa 2021-03-06 20:09:20 PST
Created attachment 422519 [details]
Patch
Comment 4 Sam Weinig 2021-03-07 08:55:26 PST
Comment on attachment 422519 [details]
Patch

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

> Websites/perf.webkit.org/ChangeLog:9
> +
> +        Simplify the code used to schedule re-rendering of components that dependent on its size
> +        using ResizeObserver which has been shipping since Safari 14.

Should we remove ResizeObserver from Experimental Features at this point then? (I filed https://bugs.webkit.org/show_bug.cgi?id=222885 to try and formalize the rules for experimental features, but it seems like if we shipped it already, it probably makes sense to transition away).
Comment 5 cathiechen 2021-03-07 23:01:00 PST
Comment on attachment 422519 [details]
Patch

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

> Websites/perf.webkit.org/public/v3/components/base.js:181
> +                        if (lastObservedSize.width == newSize.width && lastObservedSize.height == newSize.height)

It seems lastObservedSize isn't needed here? But there's a slit difference. ResizeObserver observes the contentSize.
Comment 6 Radar WebKit Bug Importer 2021-03-13 19:08:14 PST
<rdar://problem/75400353>