Bug 222877 - [perf dashboard] Use ResizeObserver in ComponentBase
Summary: [perf dashboard] Use ResizeObserver in ComponentBase
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-06 19:07 PST by Ryosuke Niwa
Modified: 2021-03-13 19:08 PST (History)
7 users (show)

See Also:


Attachments
Patch (19.59 KB, patch)
2021-03-06 19:25 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch (23.76 KB, patch)
2021-03-06 20:09 PST, Ryosuke Niwa
sam: review+
Details | Formatted Diff | Diff

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