Changeset 218956 in webkit
- Timestamp:
- Jun 29, 2017 12:31:36 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r218951 r218956 1 2017-06-29 Alex Christensen <achristensen@webkit.org> 2 3 WKContentRuleLists with if-top-url or unless-top-url should run regex against entire top URL 4 https://bugs.webkit.org/show_bug.cgi?id=173980 5 6 Reviewed by Tim Horton. 7 8 * http/tests/contentextensions/top-url-expected.txt: Added. 9 * http/tests/contentextensions/top-url.html: Added. 10 * http/tests/contentextensions/top-url.html.json: Added. 11 1 12 2017-06-29 JF Bastien <jfbastien@apple.com> 2 13 -
trunk/Source/WebKit2/ChangeLog
r218953 r218956 1 2017-06-29 Alex Christensen <achristensen@webkit.org> 2 3 WKContentRuleLists with if-top-url or unless-top-url should run regex against entire top URL 4 https://bugs.webkit.org/show_bug.cgi?id=173980 5 6 Reviewed by Tim Horton. 7 8 if-top-url and unless-top-url were broken inside WebKit2 apps. This fixes them and adds a test. 9 ContentExtension::populateConditionCacheIfNeeded was calling WebCompiledContentRuleList::conditionsApplyOnlyToDomain 10 but m_data.conditionsApplyOnlyToDomainOffset was always 0 instead of ConditionsApplyOnlyToDomainOffset because 11 it wasn't being encoded and decoded when telling the WebProcess about the content rule list. This was causing us 12 to use whatever was at offset 0 in the file instead of the correct value stored in the file to determine 13 whether to run regular expressions against the entire top URL for if-top-url or unless-top-url or against 14 just the domain for if-top-domain or unless-top-domain. Luckily, offset 0 in the file is always 15 ContentRuleListStore::CurrentContentRuleListFileVersion, so it was deterministic and easy to debug. 16 17 I should have added a LayoutTest with r213669 to verify correct behavior in an actual WKWebView, 18 but I didn't because it wouldn't have caught regressions since the contentextension tests are 19 marked as flaky since r206914, but once that is fixed the new test http/tests/contentextensions/top-url.html 20 will verify that this feature is behaving correctly. It failed before this change and passes after. 21 22 * Shared/WebCompiledContentRuleListData.cpp: 23 (WebKit::WebCompiledContentRuleListData::encode): 24 (WebKit::WebCompiledContentRuleListData::decode): 25 1 26 2017-06-29 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebKit2/Shared/WebCompiledContentRuleListData.cpp
r216809 r218956 39 39 encoder << handle; 40 40 41 encoder << conditionsApplyOnlyToDomainOffset; 41 42 encoder << actionsOffset; 42 43 encoder << actionsSize; … … 56 57 compiledContentRuleListData.data = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly); 57 58 59 if (!decoder.decode(compiledContentRuleListData.conditionsApplyOnlyToDomainOffset)) 60 return false; 58 61 if (!decoder.decode(compiledContentRuleListData.actionsOffset)) 59 62 return false;
Note: See TracChangeset
for help on using the changeset viewer.