Summary: | Use IsNegation bit for more efficient pseudo-class style invalidation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||||||
Component: | CSS | Assignee: | Antti Koivisto <koivisto> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cdumez, changseok, cmarcelo, emilio, esprehn+autocc, ews-watchlist, gyuyoung.kim, kangil.han, mifenton, simon.fraser, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Antti Koivisto
2022-01-08 06:11:25 PST
Created attachment 448668 [details]
Patch
Created attachment 448669 [details]
Patch
Created attachment 448670 [details]
Patch
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? Created attachment 448696 [details]
Patch for landing
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]. 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 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). |