[Content Extensions] resource-type and load-type should be independent.
https://bugs.webkit.org/show_bug.cgi?id=145528
rdar://problem/
21190765
Reviewed by Benjamin Poulain.
Source/WebCore:
Covered by existing tests and a new API test.
Right now we use the same uint16_t to store all the load-type and resource-type flags,
then we just do a bitwise and to check both at the same time. This results in a trigger
with load-type and resource-type firing if either condition is met, not both conditions.
A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
Check and correctly handle rules with both resource-type and load-type flags.
* loader/ResourceLoadInfo.h:
Add masks to separate flags from resource-type and load-type.
Tools:
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185079
268f45cc-cd09-0410-ab3c-
d52691b4dbfc