RESOLVED FIXED 235003
Use IsNegation bit for more efficient pseudo-class style invalidation
https://bugs.webkit.org/show_bug.cgi?id=235003
Summary Use IsNegation bit for more efficient pseudo-class style invalidation
Antti Koivisto
Reported 2022-01-08 06:11:25 PST
We already use it for class invalidation.
Attachments
Patch (25.10 KB, patch)
2022-01-08 06:19 PST, Antti Koivisto
no flags
Patch (24.95 KB, patch)
2022-01-08 06:42 PST, Antti Koivisto
no flags
Patch (24.95 KB, patch)
2022-01-08 06:53 PST, Antti Koivisto
no flags
Patch for landing (27.70 KB, patch)
2022-01-09 00:30 PST, Antti Koivisto
no flags
Antti Koivisto
Comment 1 2022-01-08 06:19:44 PST
Antti Koivisto
Comment 2 2022-01-08 06:42:29 PST
Antti Koivisto
Comment 3 2022-01-08 06:53:32 PST
Simon Fraser (smfr)
Comment 4 2022-01-08 10:17:21 PST
Comment on attachment 448670 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448670&action=review > Source/WebCore/ChangeLog:8 > + We now know is an invaliation ruleset is for negated context. We can use this to avoid Does not parse > Source/WebCore/dom/Element.cpp:799 > + Style::PseudoClassChangeInvalidation styleInvalidation(*this, CSSSelector::PseudoClassActive, flag, invalidationScope); flag needs a better name > Source/WebCore/dom/Element.cpp:851 > + Style::PseudoClassChangeInvalidation focusStyleInvalidation(*this, { { CSSSelector::PseudoClassFocus, flag }, { CSSSelector::PseudoClassFocusVisible, flag } }); Ditto > Source/WebCore/dom/Element.cpp:887 > + Style::PseudoClassChangeInvalidation styleInvalidation(*this, CSSSelector::PseudoClassFocusWithin, flag); Ditto > Source/WebCore/dom/Element.cpp:897 > + Style::PseudoClassChangeInvalidation styleInvalidation(*this, CSSSelector::PseudoClassHover, flag, invalidationScope); Ditto > Source/WebCore/dom/Element.cpp:910 > + Style::PseudoClassChangeInvalidation styleInvalidation(*this, CSSSelector::PseudoClassDrag, flag); Ditto > Source/WebCore/html/HTMLInputElement.cpp:978 > -void HTMLInputElement::setChecked(bool nowChecked) > +void HTMLInputElement::setChecked(bool newChecked) The rename doesn't really help. why not just isChecked or checked?
Antti Koivisto
Comment 5 2022-01-09 00:30:06 PST
Created attachment 448696 [details] Patch for landing
EWS
Comment 6 2022-01-09 01:02:54 PST
Committed r287818 (245870@main): <https://commits.webkit.org/245870@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448696 [details].
Radar WebKit Bug Importer
Comment 7 2022-01-09 01:03:18 PST
Emilio Cobos Álvarez (:emilio)
Comment 8 2022-01-09 02:45:05 PST
Comment on attachment 448696 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=448696&action=review > Source/WebCore/dom/Element.cpp:852 > + document().userActionElements().setFocused(*this, value); Probably a bug: this is not the value that ends up getting passed to setHasFocusVisible
Antti Koivisto
Comment 9 2022-01-09 04:54:31 PST
Comment on attachment 448696 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=448696&action=review >> Source/WebCore/dom/Element.cpp:852 >> + document().userActionElements().setFocused(*this, value); > > Probably a bug: this is not the value that ends up getting passed to setHasFocusVisible True though I think it just causes unnecessary invalidation in some cases (when focus changes but focus-visible stays the same).
Note You need to log in before you can comment on or make changes to this bug.