Summary: | [Content Filtering] Avoid creating a ContentFilter when loading the empty document | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andy Estes <aestes> | ||||
Component: | New Bugs | Assignee: | Andy Estes <aestes> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, beidson, cdumez, commit-queue, dbates, japhet, kling | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Andy Estes
2015-11-25 23:24:20 PST
Created attachment 266174 [details]
Patch
Comment on attachment 266174 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=266174&action=review > Source/WebCore/loader/DocumentLoader.cpp:1421 > + m_contentFilter = !m_originalSubstituteDataWasValid ? ContentFilter::createIfEnabled(*this) : nullptr; I do not have easy access to search the repository at the moment. Can we write a test/do we have a test that verifies that we enable content filtering for the main resource when loaded from app cache? If not, then I suggest that we write one to ensure that we do not regress this behavior. You may be able to take inspiration from test <http://trac.webkit.org/browser/trunk/LayoutTests/http/tests/appcache/local-content.html> on how to load the main resource from app cache. (In reply to comment #2) > Comment on attachment 266174 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=266174&action=review > > > Source/WebCore/loader/DocumentLoader.cpp:1421 > > + m_contentFilter = !m_originalSubstituteDataWasValid ? ContentFilter::createIfEnabled(*this) : nullptr; > > I do not have easy access to search the repository at the moment. Can we > write a test/do we have a test that verifies that we enable content > filtering for the main resource when loaded from app cache? If not, then I > suggest that we write one to ensure that we do not regress this behavior. > You may be able to take inspiration from test > <http://trac.webkit.org/browser/trunk/LayoutTests/http/tests/appcache/local- > content.html> on how to load the main resource from app cache. This should be covered by http://trac.webkit.org/browser/trunk/LayoutTests/http/tests/contentfiltering/load-substitute-data-from-appcache.html. Thanks for the review! Committed r192797: <http://trac.webkit.org/changeset/192797> |