Bug 231721

Summary: Don't run focusing steps on disconnected or inert <dialog>
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 84635, 227537    
Attachments:
Description Flags
Patch
none
updateStyleIfNeeded patch
koivisto: review+
updateLayout patch none

Tim Nguyen (:ntim)
Reported 2021-10-13 22:22:30 PDT
For show, we need to update both style & layout. For showModal, we need to update only layout (addToTopLayer called beforehand updates style).
Attachments
Patch (4.43 KB, patch)
2021-10-14 06:50 PDT, Tim Nguyen (:ntim)
no flags
updateStyleIfNeeded patch (4.43 KB, patch)
2021-10-14 09:33 PDT, Tim Nguyen (:ntim)
koivisto: review+
updateLayout patch (4.45 KB, patch)
2021-10-14 09:46 PDT, Tim Nguyen (:ntim)
no flags
Tim Nguyen (:ntim)
Comment 1 2021-10-14 06:50:02 PDT
Simon Fraser (smfr)
Comment 2 2021-10-14 08:44:08 PDT
Comment on attachment 441210 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441210&action=review > Source/WebCore/html/HTMLDialogElement.cpp:125 > + if (auto* cs = computedStyle(); cs && cs->effectiveInert()) We don't use abbreviations like "cs". Why go through computedStyle() and not the Renderer? Have we updated style here yet after opening the dialog?
Tim Nguyen (:ntim)
Comment 3 2021-10-14 09:33:18 PDT
Created attachment 441227 [details] updateStyleIfNeeded patch
Tim Nguyen (:ntim)
Comment 4 2021-10-14 09:46:11 PDT
Created attachment 441228 [details] updateLayout patch
Tim Nguyen (:ntim)
Comment 5 2021-10-14 10:38:31 PDT
Comment on attachment 441228 [details] updateLayout patch As Antti points out, Element::isFocusable is able to resolve without layout being up-to-date. So the updateLayout patch is not needed.
Tim Nguyen (:ntim)
Comment 6 2021-10-14 10:53:15 PDT
Radar WebKit Bug Importer
Comment 7 2021-10-14 10:54:16 PDT
Note You need to log in before you can comment on or make changes to this bug.