WebKit Bugzilla
Attachment 356678 Details for
Bug 192439
: <rdar://problem/45296285> Content blocker rule "raw" blocks media elements form loading
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192439-20181205164544.patch (text/plain), 11.95 KB, created by
Benjamin Poulain
on 2018-12-05 16:45:45 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Benjamin Poulain
Created:
2018-12-05 16:45:45 PST
Size:
11.95 KB
patch
obsolete
>Subversion Revision: 238836 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aafb0e26ac210952ab7416718392906536f13608..4f66635d9db25a3629523e79f5f40152359205b7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-05 Benjamin Poulain <benjamin@webkit.org> >+ >+ <rdar://problem/45296285> Content blocker rule "raw" blocks media elements form loading >+ https://bugs.webkit.org/show_bug.cgi?id=192439 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This broken when WebKit switched to NSURLSession. >+ In CachedResourceLoader::requestResource(), toResourceType() was turning media load into RAW. >+ >+ Test: http/tests/contentextensions/video-element-resource-type.html >+ >+ * loader/ResourceLoadInfo.cpp: >+ (WebCore::toResourceType): >+ > 2018-12-03 Don Olmstead <don.olmstead@sony.com> > > Fix some unused parameter warnings >diff --git a/Source/WebCore/loader/ResourceLoadInfo.cpp b/Source/WebCore/loader/ResourceLoadInfo.cpp >index b6949f95b7a3b18903392e7fe6cfa8e653ec1e60..9d92dba8c0184cd85b6d214888f1234f13cf4586 100644 >--- a/Source/WebCore/loader/ResourceLoadInfo.cpp >+++ b/Source/WebCore/loader/ResourceLoadInfo.cpp >@@ -55,8 +55,10 @@ ResourceType toResourceType(CachedResource::Type type) > #endif > return ResourceType::Font; > >- case CachedResource::Type::Beacon: > case CachedResource::Type::MediaResource: >+ return ResourceType::Media; >+ >+ case CachedResource::Type::Beacon: > case CachedResource::Type::Icon: > case CachedResource::Type::RawResource: > return ResourceType::Raw; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4b867b8e837724d7f98c360e8a6e5a7719eb0ef9..8f7ca0ea2f12ac26609d3954afce2ebbbf1dbfda 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-12-05 Benjamin Poulain <benjamin@webkit.org> >+ >+ <rdar://problem/45296285> Content blocker rule "raw" blocks media elements form loading >+ https://bugs.webkit.org/show_bug.cgi?id=192439 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * http/tests/contentextensions/video-element-resource-type-expected.txt: Added. >+ * http/tests/contentextensions/video-element-resource-type.html: Added. >+ * http/tests/contentextensions/video-element-resource-type.html.json: Added. >+ > 2018-12-03 Ryan Haddad <ryanhaddad@apple.com> > > [css-grid] Crash on debug changing the style of a positioned element >diff --git a/LayoutTests/http/tests/contentextensions/video-element-resource-type-expected.txt b/LayoutTests/http/tests/contentextensions/video-element-resource-type-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..64b398126551cddd225956851c45adec45c9dff6 >--- /dev/null >+++ b/LayoutTests/http/tests/contentextensions/video-element-resource-type-expected.txt >@@ -0,0 +1,43 @@ >+CONSOLE MESSAGE: line 20: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test.mp4 >+CONSOLE MESSAGE: line 21: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test-25fps.mp4 >+CONSOLE MESSAGE: line 24: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test.mp4 >+CONSOLE MESSAGE: line 25: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test-25fps.mp4 >+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test.mp4 >+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test-25fps.mp4 >+main frame - didFinishDocumentLoadForFrame >+http://127.0.0.1:8000/contentextensions/video-element-resource-type.html - didFinishLoading >+http://localhost:8000/media/resources/test.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test.mp4, main document URL (null), http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test.mp4, http status code 0> >+http://localhost:8000/media/resources/test.mp4 - didFinishLoading >+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test.mp4 >+http://localhost:8000/media/resources/test.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test.mp4, main document URL (null), http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test.mp4, http status code 0> >+http://localhost:8000/media/resources/test.mp4 - didFinishLoading >+CONSOLE MESSAGE: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/video-element-resource-type.html from loading a resource from http://localhost:8000/media/resources/test.mp4 >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL (null), http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 0> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL (null), http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 0> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+http://localhost:8000/media/resources/test-25fps.mp4 - willSendRequest <NSURLRequest URL http://localhost:8000/media/resources/test-25fps.mp4, main document URL http://127.0.0.1:8000/contentextensions/video-element-resource-type.html, http method GET> redirectResponse (null) >+http://localhost:8000/media/resources/test-25fps.mp4 - didReceiveResponse <NSURLResponse http://localhost:8000/media/resources/test-25fps.mp4, http status code 206> >+http://localhost:8000/media/resources/test-25fps.mp4 - didFinishLoading >+main frame - didHandleOnloadEventsForFrame >+main frame - didFinishLoadForFrame >+ >diff --git a/LayoutTests/http/tests/contentextensions/video-element-resource-type.html b/LayoutTests/http/tests/contentextensions/video-element-resource-type.html >new file mode 100644 >index 0000000000000000000000000000000000000000..ce77ad974465ef124f856d1f1faecc4d52520ec2 >--- /dev/null >+++ b/LayoutTests/http/tests/contentextensions/video-element-resource-type.html >@@ -0,0 +1,45 @@ >+<script> >+if (window.testRunner) { >+ testRunner.waitUntilDone(); >+ testRunner.dumpResourceLoadCallbacks(); >+ testRunner.dumpFrameLoadCallbacks(); >+ testRunner.dumpAsText(); >+} >+ >+var mediaLoadedCount = 0; >+function mediaLoaded() >+{ >+ ++mediaLoadedCount; >+ if (mediaLoadedCount == 2 && window.testRunner) >+ testRunner.notifyDone(); >+} >+ >+</script> >+ >+<!-- Filtered --> >+<img src="http://localhost:8000/media/resources/test.mp4"> >+<img src="http://localhost:8000/media/resources/test-25fps.mp4"> >+ >+<!-- Filtered --> >+<link href="http://localhost:8000/media/resources/test.mp4" rel="stylesheet" type="text/css"> >+<link href="http://localhost:8000/media/resources/test-25fps.mp4" rel="stylesheet" type="text/css"> >+ >+<!-- Filtered --> >+<script src="http://localhost:8000/media/resources/test.mp4"></script> >+<script src="http://localhost:8000/media/resources/test-25fps.mp4"></script> >+ >+<!-- Filtered --> >+<video src="http://localhost:8000/media/resources/test.mp4"></video> >+ >+<!-- Filtered --> >+<video> >+ <source src="http://localhost:8000/media/resources/test.mp4" type="video/mp4"> >+</video> >+ >+<!-- Ok --> >+<video src="http://localhost:8000/media/resources/test-25fps.mp4" oncanplay="mediaLoaded();"></video> >+ >+<!-- Ok --> >+<video oncanplay="mediaLoaded();"> >+ <source src="http://localhost:8000/media/resources/test-25fps.mp4" type="video/mp4"> >+</video> >diff --git a/LayoutTests/http/tests/contentextensions/video-element-resource-type.html.json b/LayoutTests/http/tests/contentextensions/video-element-resource-type.html.json >new file mode 100644 >index 0000000000000000000000000000000000000000..03076abb3ec0355db56a2d0bd7afa2f7f24df8d7 >--- /dev/null >+++ b/LayoutTests/http/tests/contentextensions/video-element-resource-type.html.json >@@ -0,0 +1,21 @@ >+[ >+ { >+ "action": { >+ "type": "block" >+ }, >+ "trigger": { >+ "url-filter": ".*\\.mp4" >+ } >+ }, >+ { >+ "trigger": { >+ "url-filter": ".*test-25fps\\.mp4", >+ "resource-type": [ >+ "media" >+ ] >+ }, >+ "action": { >+ "type": "ignore-previous-rules" >+ } >+ } >+]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192439
:
356678
|
356696
|
356774