Bug 148506

Summary: [Content Filtering] Determine navigation and content policy before continuing to filter a load
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, beidson, commit-queue, darin, japhet, kling, koivisto, mitz, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=148684
https://bugs.webkit.org/show_bug.cgi?id=148885
Bug Depends on:    
Bug Blocks: 128858    
Attachments:
Description Flags
Patch
none
Patch
none
Patch beidson: review+

Description Andy Estes 2015-08-26 17:52:25 PDT
[Content Filtering] Determine navigation and content policy before continuing to filter a load
Comment 1 Radar WebKit Bug Importer 2015-08-26 17:57:01 PDT
<rdar://problem/22449104>
Comment 2 Andy Estes 2015-08-26 23:23:20 PDT
Created attachment 260039 [details]
Patch
Comment 3 WebKit Commit Bot 2015-08-26 23:25:49 PDT
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.
Comment 4 Andy Estes 2015-08-27 00:53:13 PDT
Created attachment 260047 [details]
Patch
Comment 5 WebKit Commit Bot 2015-08-27 00:54:14 PDT
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.
Comment 6 Andy Estes 2015-08-30 20:37:40 PDT
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 7 Brady Eidson 2015-08-31 10:53:22 PDT
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 8 Andy Estes 2015-08-31 13:51:24 PDT
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.
Comment 9 Andy Estes 2015-08-31 13:53:46 PDT
Created attachment 260314 [details]
Patch
Comment 10 WebKit Commit Bot 2015-08-31 13:55:25 PDT
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.
Comment 11 Andy Estes 2015-08-31 16:27:41 PDT
Committed r189193: <http://trac.webkit.org/changeset/189193>
Comment 12 Alexey Proskuryakov 2015-09-01 22:07:48 PDT
Looks like this caused bug 148684.
Comment 13 Alexey Proskuryakov 2015-09-04 23:19:50 PDT
One of these tests is flaky, filed bug 148885.