RESOLVED FIXED143055
Apply ContentExtension actions after redirects
https://bugs.webkit.org/show_bug.cgi?id=143055
Summary Apply ContentExtension actions after redirects
Brady Eidson
Reported 2015-03-25 12:12:22 PDT
Apply ContentExtension actions after redirects rdar://problem/20062613
Attachments
WIP for posterity (16.12 KB, patch)
2015-03-25 12:17 PDT, Brady Eidson
no flags
Patch v1 (24.79 KB, patch)
2015-03-25 14:14 PDT, Brady Eidson
no flags
Patch v2 (25.88 KB, patch)
2015-03-25 14:52 PDT, Brady Eidson
achristensen: review+
achristensen: commit-queue-
Archive of layout-test-results from ews106 for mac-mavericks-wk2 (992.84 KB, application/zip)
2015-03-25 15:38 PDT, Build Bot
no flags
Archive of layout-test-results from ews101 for mac-mavericks (720.33 KB, application/zip)
2015-03-25 16:01 PDT, Build Bot
no flags
Brady Eidson
Comment 1 2015-03-25 12:17:59 PDT
Created attachment 249422 [details] WIP for posterity This is probably a pretty final-ish patch, but I'm working on layout tests to cover both main resources and subresources.
Brady Eidson
Comment 2 2015-03-25 14:14:52 PDT
Created attachment 249425 [details] Patch v1
WebKit Commit Bot
Comment 3 2015-03-25 14:17:32 PDT
Attachment 249425 [details] did not pass style-queue: ERROR: Tools/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] ERROR: Source/WebCore/contentextensions/ContentExtensionsBackend.h:68: The parameter name "request" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 4 2015-03-25 14:39:46 PDT
Comment on attachment 249425 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=249425&action=review > LayoutTests/http/tests/contentextensions/subresource-redirect-blocked.html:1 > +This page has an image.<br> Don't you need subresource-redirect-blocked-expected.txt? > Source/WebCore/contentextensions/ContentExtensionsBackend.h:68 > + void processContentExtensionRulesForLoad(ResourceRequest& request, ResourceType, DocumentLoader& initiatingDocumentLoader); request > Source/WebCore/loader/NetscapePlugInStreamLoader.cpp:48 > + m_resourceType = ResourceType::PlugInStream; This should be m_resourceType(ResourceType::PlugInStream) > Tools/ChangeLog:4 > + Need a short description (OOPS!). > + Need the bug URL (OOPS!). forgot
Brady Eidson
Comment 5 2015-03-25 14:51:56 PDT
(In reply to comment #4) > Comment on attachment 249425 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249425&action=review > > > LayoutTests/http/tests/contentextensions/subresource-redirect-blocked.html:1 > > +This page has an image.<br> > > Don't you need subresource-redirect-blocked-expected.txt? Yup, forgot to git-add it > > > Source/WebCore/contentextensions/ContentExtensionsBackend.h:68 > > + void processContentExtensionRulesForLoad(ResourceRequest& request, ResourceType, DocumentLoader& initiatingDocumentLoader); > > request Yup, gone. > > > Source/WebCore/loader/NetscapePlugInStreamLoader.cpp:48 > > + m_resourceType = ResourceType::PlugInStream; > > This should be m_resourceType(ResourceType::PlugInStream) Can't be - m_resourceType belongs to the base class, can't be included in subclass initialized lists > > > Tools/ChangeLog:4 > > + Need a short description (OOPS!). > > + Need the bug URL (OOPS!). > > forgot I sure did!
Brady Eidson
Comment 6 2015-03-25 14:52:32 PDT
Created attachment 249431 [details] Patch v2
Alex Christensen
Comment 7 2015-03-25 15:27:27 PDT
Comment on attachment 249431 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=249431&action=review Looks good except these small things: > Source/WebCore/loader/NetscapePlugInStreamLoader.cpp:48 > + m_resourceType = ResourceType::PlugInStream; m_resourceType(ResourceType::PlugInStream) > Source/WebCore/loader/ResourceLoadInfo.h:44 > + PlugInStream = 0x0100, You also need to change LoadType::FirstParty LoadType::ThirdParty so this doesn't overlap. Maybe these should be made one enum so that is more obvious.
Build Bot
Comment 8 2015-03-25 15:38:15 PDT
Comment on attachment 249431 [details] Patch v2 Attachment 249431 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5576653375799296 New failing tests: svg/as-image/svg-image-with-svg-data-uri.html svg/as-image/svg-image-with-data-uri-from-canvas.html svg/as-image/svg-image-with-data-uri-reloading.html svg/as-image/svg-image-with-data-uri-background.html svg/as-image/svg-image-with-data-uri-use-data-uri.svg svg/as-image/img-zoom-svg-stylesheet.html svg/as-image/svg-image-with-data-uri-images-disabled.html
Build Bot
Comment 9 2015-03-25 15:38:19 PDT
Created attachment 249434 [details] Archive of layout-test-results from ews106 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Alex Christensen
Comment 10 2015-03-25 15:43:30 PDT
(In reply to comment #8) > Comment on attachment 249431 [details] > Patch v2 > > Attachment 249431 [details] did not pass mac-wk2-ews (mac-wk2): > Output: http://webkit-queues.appspot.com/results/5576653375799296 > > New failing tests: > svg/as-image/svg-image-with-svg-data-uri.html > svg/as-image/svg-image-with-data-uri-from-canvas.html > svg/as-image/svg-image-with-data-uri-reloading.html > svg/as-image/svg-image-with-data-uri-background.html > svg/as-image/svg-image-with-data-uri-use-data-uri.svg > svg/as-image/img-zoom-svg-stylesheet.html > svg/as-image/svg-image-with-data-uri-images-disabled.html I knew you didn't run all tests on all platforms! Please check these before landing.
Build Bot
Comment 11 2015-03-25 16:01:03 PDT
Comment on attachment 249431 [details] Patch v2 Attachment 249431 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5283148732563456 New failing tests: svg/as-image/svg-image-with-svg-data-uri.html svg/as-image/svg-image-with-data-uri-from-canvas.html svg/as-image/svg-image-with-data-uri-reloading.html svg/as-image/svg-image-with-data-uri-background.html svg/as-image/svg-image-with-data-uri-use-data-uri.svg svg/as-image/img-zoom-svg-stylesheet.html svg/as-image/svg-image-with-data-uri-images-disabled.html
Build Bot
Comment 12 2015-03-25 16:01:08 PDT
Created attachment 249436 [details] Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Brady Eidson
Comment 13 2015-03-25 16:50:48 PDT
Will definitely look at tests before landing.
Brady Eidson
Comment 14 2015-03-25 16:52:40 PDT
(In reply to comment #7) > Comment on attachment 249431 [details] > Patch v2 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249431&action=review > > Looks good except these small things: > > > Source/WebCore/loader/NetscapePlugInStreamLoader.cpp:48 > > + m_resourceType = ResourceType::PlugInStream; > > m_resourceType(ResourceType::PlugInStream) As mentioned above - That's initializer syntax, but this can't be an initializer, as the variable belongs to the super class. > > > Source/WebCore/loader/ResourceLoadInfo.h:44 > > + PlugInStream = 0x0100, > > You also need to change LoadType::FirstParty LoadType::ThirdParty so this > doesn't overlap. Maybe these should be made one enum so that is more > obvious. That was *not* obvious. Will change.
Brady Eidson
Comment 15 2015-03-26 10:57:08 PDT
Brady Eidson
Comment 16 2015-03-26 11:00:36 PDT
The layout test failures were a missing null check on UserContentController that has now been added.
Note You need to log in before you can comment on or make changes to this bug.