WebKit Bugzilla
Attachment 356774 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-20181206181208.patch (text/plain), 6.94 KB, created by
Benjamin Poulain
on 2018-12-06 18:12:08 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Benjamin Poulain
Created:
2018-12-06 18:12:08 PST
Size:
6.94 KB
patch
obsolete
>Subversion Revision: 238836 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aafb0e26ac210952ab7416718392906536f13608..de17532ee54c109e0d955358158c81304af3e7a5 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 from 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..d1a5840c9a5ee8546cfaa73bd753e027c6f8663a 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 from 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..d37e989edc7d71a662925bdae5c5dbff35e6dbb8 >--- /dev/null >+++ b/LayoutTests/http/tests/contentextensions/video-element-resource-type-expected.txt >@@ -0,0 +1,9 @@ >+CONSOLE MESSAGE: line 18: 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 19: 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 22: 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 23: 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 >+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.mp4 >+ >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..d37cb2194a6a5b78293731d1b511687b10d93d8a >--- /dev/null >+++ b/LayoutTests/http/tests/contentextensions/video-element-resource-type.html >@@ -0,0 +1,43 @@ >+<script> >+if (window.testRunner) { >+ testRunner.waitUntilDone(); >+ 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