Add support for focused and visible ServiceWorkerWindowClient states
<rdar://problem/90833197>
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.