[Content Filtering] Determine navigation and content policy before continuing to filter a load
<rdar://problem/22449104>
Created attachment 260039 [details] Patch
Attachment 260039 [details] did not pass style-queue: ERROR: Source/WebCore/loader/ContentFilter.cpp:82: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 30 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 260047 [details] Patch
Attachment 260047 [details] did not pass style-queue: ERROR: Source/WebCore/loader/ContentFilter.cpp:82: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Bump. This is a large patch, but most of it is testing code and reverts. The interesting parts are the changes to ContentFilter and DocumentLoader.
Comment on attachment 260047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=260047&action=review Most of this looks fine. One comment that makes me not want to r+ > Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp:49 > const uint8_t decisionPointAfterResponse = 2; > const uint8_t decisionPointAfterAddData = 3; > const uint8_t decisionPointAfterFinishedAddingData = 4; > +const uint8_t decisionPointNever = 5; > const uint8_t decisionAllow = 0; > const uint8_t decisionBlock = 1; Can all of these become an enum class so that the switch statements have compile-time protection against missing a case, please? I know it's existing code, but it's local to this file, shouldn't be hard to change.
Comment on attachment 260047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=260047&action=review >> Source/WebCore/bindings/js/JSMockContentFilterSettingsCustom.cpp:49 >> const uint8_t decisionBlock = 1; > > Can all of these become an enum class so that the switch statements have compile-time protection against missing a case, please? > > I know it's existing code, but it's local to this file, shouldn't be hard to change. Yup, I'll just get rid of the const uint8_ts and use the existing enum classes.
Created attachment 260314 [details] Patch
Attachment 260314 [details] did not pass style-queue: ERROR: Source/WebCore/loader/ContentFilter.cpp:82: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 33 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r189193: <http://trac.webkit.org/changeset/189193>
Looks like this caused bug 148684.
One of these tests is flaky, filed bug 148885.