Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing service worker content filter check #12715

Conversation

pvollan
Copy link
Contributor

@pvollan pvollan commented Apr 13, 2023

09061ad

Add missing service worker content filter check
https://bugs.webkit.org/show_bug.cgi?id=255418
rdar://107453214

Reviewed by Brent Fulgham.

This patch was authored by Ben Nham and Per Arne Vollan.

Add missing service worker content filter check after finished adding data. This fixes an issue where
service workers are incorrectly blocked.

* LayoutTests/TestExpectations:
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter-allow-after-adding-data-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter-allow-after-adding-data.html: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.js:
(doTest):
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::serviceWorkerDidFinish):

Canonical link: https://commits.webkit.org/262972@main

c454908

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 ❌ πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2-stress
  πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@pvollan pvollan requested a review from cdumez as a code owner April 13, 2023 22:25
@pvollan pvollan self-assigned this Apr 13, 2023
@pvollan pvollan added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Apr 13, 2023
Copy link
Contributor

@brentfulgham brentfulgham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is small, and well contained -- and the tests seem good.

Since this uses internals state to adjust content filters, there is probably no way to do WPT-style testing here, so this seems good to add to our custom suite.

var activeWorker;

if (window.internals) {
var settings = window.internals.mockContentFilterSettings;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see -- we are passing custom filter settings here.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 14, 2023
@pvollan pvollan removed the merging-blocked Applied to prevent a change from being merged label Apr 14, 2023
@pvollan pvollan force-pushed the eng/Add-missing-service-worker-content-filter-check branch from 657d1a8 to c454908 Compare April 14, 2023 14:08
@pvollan
Copy link
Contributor Author

pvollan commented Apr 14, 2023

The change is small, and well contained -- and the tests seem good.

Since this uses internals state to adjust content filters, there is probably no way to do WPT-style testing here, so this seems good to add to our custom suite.

Thanks for reviewing!

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 14, 2023
@pvollan pvollan added merge-queue Applied to send a pull request to merge-queue unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged labels Apr 14, 2023
https://bugs.webkit.org/show_bug.cgi?id=255418
rdar://107453214

Reviewed by Brent Fulgham.

This patch was authored by Ben Nham and Per Arne Vollan.

Add missing service worker content filter check after finished adding data. This fixes an issue where
service workers are incorrectly blocked.

* LayoutTests/TestExpectations:
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter-allow-after-adding-data-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter-allow-after-adding-data.html: Added.
* LayoutTests/http/wpt/service-workers/basic-fetch-with-contentfilter.js:
(doTest):
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::serviceWorkerDidFinish):

Canonical link: https://commits.webkit.org/262972@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Add-missing-service-worker-content-filter-check branch from c454908 to 09061ad Compare April 14, 2023 16:27
@webkit-commit-queue
Copy link
Collaborator

Committed 262972@main (09061ad): https://commits.webkit.org/262972@main

Reviewed commits have been landed. Closing PR #12715 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 09061ad into WebKit:main Apr 14, 2023
@webkit-commit-queue webkit-commit-queue removed merge-queue Applied to send a pull request to merge-queue unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).
Projects
None yet
5 participants