Bug 208504 - Avoid full style resolution on Element::focus()
Summary: Avoid full style resolution on Element::focus()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-03 01:24 PST by Antti Koivisto
Modified: 2021-01-12 23:04 PST (History)
19 users (show)

See Also:


Attachments
wip (6.27 KB, patch)
2020-03-03 01:25 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
wip (7.94 KB, patch)
2020-03-03 03:20 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
wip (10.95 KB, patch)
2020-03-03 06:33 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
wip (12.16 KB, patch)
2020-03-03 10:37 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (15.62 KB, patch)
2020-03-03 12:47 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (15.68 KB, patch)
2020-03-03 12:49 PST, Antti Koivisto
zalan: review+
Details | Formatted Diff | Diff
patch (16.61 KB, patch)
2020-03-04 00:29 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (21.52 KB, patch)
2020-03-04 01:22 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (22.77 KB, patch)
2020-03-04 02:25 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
followup (1.82 KB, patch)
2020-03-04 06:26 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (1.82 KB, patch)
2020-03-04 06:55 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
followup (1.85 KB, patch)
2020-03-04 07:05 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2020-03-03 01:24:17 PST
It can be costly.
Comment 1 Antti Koivisto 2020-03-03 01:25:48 PST
Created attachment 392254 [details]
wip
Comment 2 Antti Koivisto 2020-03-03 03:20:12 PST
Created attachment 392258 [details]
wip
Comment 3 Antti Koivisto 2020-03-03 06:33:20 PST
Created attachment 392270 [details]
wip
Comment 4 Antti Koivisto 2020-03-03 10:37:00 PST
Created attachment 392295 [details]
wip
Comment 5 Antti Koivisto 2020-03-03 12:47:50 PST
Created attachment 392312 [details]
patch
Comment 6 Antti Koivisto 2020-03-03 12:49:27 PST
Created attachment 392313 [details]
patch
Comment 7 zalan 2020-03-03 12:55:36 PST
Comment on attachment 392313 [details]
patch

I've got a bit of a compat/regression concern here, but let's see what happens...also YAY.
Comment 8 Ryosuke Niwa 2020-03-03 13:56:05 PST
Comment on attachment 392313 [details]
patch

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

> Source/WebCore/ChangeLog:14
> +        This appears to be 3-4% Speedometer progression.

Nice!
Comment 9 Antti Koivisto 2020-03-04 00:29:15 PST
Created attachment 392385 [details]
patch
Comment 10 Antti Koivisto 2020-03-04 01:22:10 PST
Created attachment 392393 [details]
patch
Comment 11 Antti Koivisto 2020-03-04 02:25:36 PST
Created attachment 392399 [details]
patch
Comment 12 WebKit Commit Bot 2020-03-04 04:11:19 PST
Comment on attachment 392399 [details]
patch

Clearing flags on attachment: 392399

Committed r257839: <https://trac.webkit.org/changeset/257839>
Comment 13 WebKit Commit Bot 2020-03-04 04:11:21 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2020-03-04 04:12:18 PST
<rdar://problem/60035288>
Comment 15 Emilio Cobos Álvarez (:emilio) 2020-03-04 05:36:54 PST
Comment on attachment 392399 [details]
patch

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

> Source/WebCore/dom/Element.cpp:3352
> +    for (auto& element : ancestorsOfType<Element>(*this)) {

This should probably be the flat / composed tree ancestors, right? I suspect this would crash otherwise in some shadow DOM situations involving slotting.
Comment 16 Antti Koivisto 2020-03-04 06:15:02 PST
Good point!
Comment 17 Antti Koivisto 2020-03-04 06:26:38 PST
Created attachment 392406 [details]
followup
Comment 18 Antti Koivisto 2020-03-04 06:54:48 PST
Reopening for a followup
Comment 19 Antti Koivisto 2020-03-04 06:55:12 PST
Created attachment 392410 [details]
patch
Comment 20 Antti Koivisto 2020-03-04 07:05:30 PST
Created attachment 392411 [details]
followup
Comment 21 WebKit Commit Bot 2020-03-04 08:34:47 PST
Comment on attachment 392411 [details]
followup

Clearing flags on attachment: 392411

Committed r257846: <https://trac.webkit.org/changeset/257846>
Comment 22 WebKit Commit Bot 2020-03-04 08:34:49 PST
All reviewed patches have been landed.  Closing bug.