Summary: | Replace Node::isInert() with RenderStyle::effectiveInert() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Nguyen (:ntim) <ntim> | ||||||||||
Component: | DOM | Assignee: | Tim Nguyen (:ntim) <ntim> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cdumez, cfleizach, changseok, cmarcelo, dmazzoni, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jcraig, jdiggs, kangil.han, koivisto, kondapallykalyan, pdr, samuel_white, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | 229330 | ||||||||||||
Bug Blocks: | 84635 | ||||||||||||
Attachments: |
|
Description
Tim Nguyen (:ntim)
2021-09-23 05:11:10 PDT
Created attachment 439043 [details]
Patch
Created attachment 439053 [details]
Patch
Created attachment 439263 [details]
Patch
Comment on attachment 439263 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439263&action=review > Source/WebCore/dom/Element.cpp:3537 > + // FIXME: Replace inert/modal dialog logic with style->effectiveInert() after fixing invalidation > + auto elementHasInertAttribute = [](Element& element) -> bool { > + return element.document().settings().inertAttributeEnabled() && is<HTMLElement>(element) && element.hasAttribute(HTMLNames::inertAttr); > + }; > + > + if (elementHasInertAttribute(const_cast<Element&>(*this))) > + return false; > + > + Node* activeModalDialog = document().activeModalDialog(); > + if (activeModalDialog && !activeModalDialog->containsIncludingShadowDOM(this)) > + return false; This doesn't look correct. I can look at some point into resolving this correctly via style. Meanwhile I think you should leave Node::isInert() equivalent in place (that is compute inertness separately from DOM) and use that in isFocusable() as before. Or you could just let whatever focusability-with-inert-test you are trying to fix regress. It is probably not critical at this point. Created attachment 439336 [details]
Patch
Committed r283105 (242163@main): <https://commits.webkit.org/242163@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439336 [details]. |