Bug 148506 - [Content Filtering] Determine navigation and content policy before continuing to filter a load
Summary: [Content Filtering] Determine navigation and content policy before continuing...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks: 128858
  Show dependency treegraph
 
Reported: 2015-08-26 17:52 PDT by Andy Estes
Modified: 2015-09-04 23:19 PDT (History)
10 users (show)

See Also:


Attachments
Patch (62.41 KB, patch)
2015-08-26 23:23 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (65.12 KB, patch)
2015-08-27 00:53 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (67.57 KB, patch)
2015-08-31 13:53 PDT, Andy Estes
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.