Bug 222404 - Optimize the code to check if an element delegates focus to its shadow root or not
Summary: Optimize the code to check if an element delegates focus to its shadow root o...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on: 222510
Blocks: 222159
  Show dependency treegraph
 
Reported: 2021-02-24 22:20 PST by Ryosuke Niwa
Modified: 2021-02-27 01:32 PST (History)
9 users (show)

See Also:


Attachments
Patch (5.24 KB, patch)
2021-02-24 22:36 PST, Ryosuke Niwa
no flags 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-02-24 22:20:12 PST
Split from the bug 222159.
Comment 1 Ryosuke Niwa 2021-02-24 22:20:49 PST
<rdar://problem/74680265>
Comment 2 Ryosuke Niwa 2021-02-24 22:36:09 PST
Created attachment 421502 [details]
Patch
Comment 3 Simon Fraser (smfr) 2021-02-24 22:38:34 PST
Comment on attachment 421502 [details]
Patch

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

> Source/WebCore/dom/Node.h:554
> +        DelegatesFocusToShadowRoot = 1 << 27,

If a node DelegatesFocusToShadowRoot, does it already have rare data? If so, could we put this bit in rare data?
Comment 4 Ryosuke Niwa 2021-02-24 22:39:31 PST
(In reply to Simon Fraser (smfr) from comment #3)
> Comment on attachment 421502 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=421502&action=review
> 
> > Source/WebCore/dom/Node.h:554
> > +        DelegatesFocusToShadowRoot = 1 << 27,
> 
> If a node DelegatesFocusToShadowRoot, does it already have rare data? If so,
> could we put this bit in rare data?

The point of this optimization is to avoid retrieving the rare data.
Comment 5 Ryosuke Niwa 2021-02-24 22:50:59 PST
Comment on attachment 421502 [details]
Patch

Clearing flags on attachment: 421502

Committed r273474 (234554@main): <https://commits.webkit.org/234554@main>
Comment 6 Ryosuke Niwa 2021-02-24 22:51:01 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2021-02-27 01:27:26 PST
Re-opened since this is blocked by bug 222510
Comment 8 Ryosuke Niwa 2021-02-27 01:32:10 PST
This was not an overall speed up after all.