[Content Extensions] Add resource type and load type triggers.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Mar 2015 01:03:43 +0000 (01:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Mar 2015 01:03:43 +0000 (01:03 +0000)
commit9201f8cf1d9235c5cc0f6d2b84956b0c1c43b5db
tree0c8e44f4ce9a887bd4f03ddf50abfa45550dee74
parent2164346c78baf8ead39b738cace88170e9753981
[Content Extensions] Add resource type and load type triggers.
https://bugs.webkit.org/show_bug.cgi?id=142422

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-11
Reviewed by Benjamin Poulain.

Source/WebCore:

New API tests.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::getTypeFlags):
(WebCore::ContentExtensions::loadTrigger):
* contentextensions/ContentExtensionRule.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
* contentextensions/ContentExtensionsBackend.h:
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* loader/ResourceLoadInfo.cpp: Added.
(WebCore::toResourceType):
(WebCore::readResourceType):
(WebCore::readLoadType):
(WebCore::ResourceLoadInfo::isThirdParty):
(WebCore::ResourceLoadInfo::getResourceFlags):
* loader/ResourceLoadInfo.h: Added.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/UserContentController.cpp:
(WebCore::UserContentController::actionsForResourceLoad):
(WebCore::UserContentController::actionsForURL): Deleted.
* page/UserContentController.h:

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testRequest):
(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::testURL): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/contentextensions/ContentExtensionCompiler.cpp
Source/WebCore/contentextensions/ContentExtensionParser.cpp
Source/WebCore/contentextensions/ContentExtensionRule.h
Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
Source/WebCore/contentextensions/ContentExtensionsBackend.h
Source/WebCore/contentextensions/DFABytecode.h
Source/WebCore/contentextensions/DFABytecodeCompiler.cpp
Source/WebCore/contentextensions/DFABytecodeCompiler.h
Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp
Source/WebCore/contentextensions/DFABytecodeInterpreter.h
Source/WebCore/loader/ResourceLoadInfo.cpp [new file with mode: 0644]
Source/WebCore/loader/ResourceLoadInfo.h [new file with mode: 0644]
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/page/UserContentController.cpp
Source/WebCore/page/UserContentController.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp