Bug 85300 - Support for web content filter delegate for filtering https content
Summary: Support for web content filter delegate for filtering https content
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Vicki Pfau
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-05-01 12:08 PDT by Vicki Pfau
Modified: 2012-05-01 17:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (11.94 KB, patch)
2012-05-01 12:08 PDT, Vicki Pfau
no flags Details | Formatted Diff | Diff
Patch (13.28 KB, patch)
2012-05-01 16:25 PDT, Vicki Pfau
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vicki Pfau 2012-05-01 12:08:34 PDT
Created attachment 139656 [details]
Patch

<rdar://problem/10422318>
Comment 1 WebKit Review Bot 2012-05-01 12:11:20 PDT
Attachment 139656 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebKit2/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebCore/loader/MainResourceLoader.cpp:497:  Declaration has space between type name and * in WebFilterEvaluator *filter  [whitespace/declaration] [3]
Source/WebCore/loader/MainResourceLoader.cpp:513:  Declaration has space between type name and * in WebFilterEvaluator *filter  [whitespace/declaration] [3]
Source/WebKit/mac/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 5 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 Alexey Proskuryakov 2012-05-01 13:08:19 PDT
Comment on attachment 139656 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=139656&action=review

> Source/WebCore/ChangeLog:21
> +        * platform/mac/WebCoreSystemInterface.h:
> +        * platform/mac/WebCoreSystemInterface.mm:

You also need to update headers and binaries in WebKitLibraries.

> Source/WebCore/loader/MainResourceLoader.cpp:501
> +        if (wkFilterWasBlocked(filter))
> +            didFinishLoading(0);

I don't think that this is right. DidFinishLoading is called when network layer finishes, not when you want to cancel a ResourceHandle.

> Source/WebCore/loader/MainResourceLoader.cpp:502
> +        wkFilterRelease(filter);

I don't understand why the filter needs to be released here.

> Source/WebCore/loader/MainResourceLoader.cpp:517
> +            didReceiveData(data, length, -1, false);

DidReceiveData can do anything, including getting MainResourceLoader indirectly deleted. You need to at least protect the loader with a RefPtr.

> Source/WebCore/loader/MainResourceLoader.h:38
> +#include "WebCoreSystemInterface.h"

No need to include, a forward declaration would work better.
Comment 3 Alexey Proskuryakov 2012-05-01 13:25:47 PDT
Comment on attachment 139656 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=139656&action=review

> Source/WebCore/loader/MainResourceLoader.cpp:516
> +        if (data)

Also, can data be zero here?
Comment 4 Vicki Pfau 2012-05-01 16:25:41 PDT
Created attachment 139705 [details]
Patch
Comment 5 Alexey Proskuryakov 2012-05-01 16:30:21 PDT
Comment on attachment 139705 [details]
Patch

r=me
Comment 6 WebKit Review Bot 2012-05-01 16:30:22 PDT
Attachment 139705 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/loader/MainResourceLoader.cpp:531:  Declaration has space between type name and * in WebFilterEvaluator *filter  [whitespace/declaration] [3]
Total errors found: 1 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Vicki Pfau 2012-05-01 17:16:30 PDT
Committed r115765: <http://trac.webkit.org/changeset/115765>