RESOLVED FIXED 238372
Add support for focused and visible ServiceWorkerWindowClient states
https://bugs.webkit.org/show_bug.cgi?id=238372
Summary Add support for focused and visible ServiceWorkerWindowClient states
youenn fablet
Reported 2022-03-25 05:42:32 PDT
Add support for focused and visible ServiceWorkerWindowClient states
Attachments
Patch (22.56 KB, patch)
2022-03-25 06:32 PDT, youenn fablet
no flags
Patch (23.54 KB, patch)
2022-03-25 07:21 PDT, youenn fablet
no flags
Radar WebKit Bug Importer
Comment 1 2022-03-25 06:07:53 PDT
youenn fablet
Comment 2 2022-03-25 06:32:07 PDT
youenn fablet
Comment 3 2022-03-25 07:21:24 PDT
EWS
Comment 4 2022-03-25 14:20:48 PDT
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].
Darin Adler
Comment 5 2022-03-29 09:49:49 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.