| Summary: | Add support for focused and visible ServiceWorkerWindowClient states | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||
| Component: | Service Workers | Assignee: | youenn fablet <youennf> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | achristensen, beidson, cdumez, darin, esprehn+autocc, ews-watchlist, kangil.han, nham, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
youenn fablet
2022-03-25 05:42:32 PDT
Created attachment 455755 [details]
Patch
Created attachment 455756 [details]
Patch
Committed r291888 (248887@main): <https://commits.webkit.org/248887@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455756 [details]. Comment on attachment 455756 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455756&action=review > Source/WebCore/page/FocusController.cpp:371 > + auto* frame = oldFrame.get(); > + do { > + frame->document()->updateServiceWorkerClientData(); > + frame = frame->tree().parent(); > + } while (frame); I like this better as a for loop, although that gives us one additional null check, but also, would be nice to use RefPtr, so: for (auto frame = oldFrame; frame; frame = frame->tree().parent()) frame->document()->updateServiceWorkerClientData(); > Source/WebCore/page/FocusController.cpp:383 > + auto* frame = newFrame.get(); > + do { > + frame->document()->updateServiceWorkerClientData(); > + frame = frame->tree().parent(); > + } while (frame); Ditto. Also maybe we can use a shared function so we don’t have to repeat #if ENABLE and don’t have to repeat the code either. |