Bug 130371 - WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
Summary: WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2014-03-17 17:00 PDT by Joseph Pecoraro
Modified: 2014-03-18 14:48 PDT (History)
4 users (show)

See Also:

[PATCH] Proposed Fix (6.59 KB, patch)
2014-03-17 17:07 PDT, Joseph Pecoraro
joepeck: review-
Details | Formatted Diff | Diff
[PATCH] Proposed Fix (10.26 KB, patch)
2014-03-18 11:28 PDT, Joseph Pecoraro
joepeck: review-
Details | Formatted Diff | Diff
[PATCH] Proposed Fix (10.28 KB, patch)
2014-03-18 11:30 PDT, Joseph Pecoraro
mitz: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-03-17 17:00:21 PDT
Give WebKit2 SPI to disallow remote inspection of a WebView

  - WebCore has WebCore::Page::setRemoteInspectionAllowed.
  - WebKit1 already has SPI: -[WebView setAllowRemoteInspection:]
  - WebKit2 does not have any SPI.

There may be discussion on making this API. But for now, just match what we have in WebKit1.

Comment 1 Joseph Pecoraro 2014-03-17 17:07:51 PDT
Created attachment 226985 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2014-03-17 17:20:44 PDT
Comment on attachment 226985 [details]
[PATCH] Proposed Fix

Dan Bernstein raised a comment on IRC that this state (allowsRemoteInspection) should be part of the WebProcessCreationParameters so that if a web process crashed it would be restored with the same state. Sounds like a legit issue. r- on this iteration while I address that.
Comment 3 Joseph Pecoraro 2014-03-18 11:28:40 PDT
Created attachment 227081 [details]
[PATCH] Proposed Fix
Comment 4 Joseph Pecoraro 2014-03-18 11:29:57 PDT
Comment on attachment 227081 [details]
[PATCH] Proposed Fix

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

> Source/WebKit2/UIProcess/API/C/WKPage.cpp:1650
> +#else
> +    UNUSED_PARAM(page);
> +#endif    

This should return false in the #else to compile on ports that do not have ENABLE(REMOTE_INSPECTOR).
Comment 5 Joseph Pecoraro 2014-03-18 11:30:37 PDT
Created attachment 227082 [details]
[PATCH] Proposed Fix
Comment 6 WebKit Commit Bot 2014-03-18 11:32:35 PDT
Attachment 227082 [details] did not pass style-queue:

ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:75:  Missing spaces around =  [whitespace/operators] [4]
Total errors found: 1 in 12 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2014-03-18 13:20:06 PDT
Comment on attachment 227082 [details]
[PATCH] Proposed Fix

Rejecting attachment 227082 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 227082, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
r165835 = 43a4900917f73f5055ff7f644956617946b670d4
r165836 = bc5c3ab8b4183916054ec60692e7830771dc0baf
r165837 = f04ec0f78f120b59e4b84cede3d53dfe61fc99b9
r165838 = 5bf5912f022fc0dc603b7f3cd403f34b838c4619
r165839 = 1bc90ffb97e375fe0360680ffd28d02bd8acf3fa
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.appspot.com/results/5235785955540992
Comment 8 Joseph Pecoraro 2014-03-18 14:48:45 PDT