<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166257] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166257">166257</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-25 14:52:20 -0700 (Tue, 25 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS] Inspector View Indication Support
https://bugs.webkit.org/show_bug.cgi?id=130709
Reviewed by Simon Fraser.
Source/WebCore:
* inspector/InspectorClient.h:
(WebCore::InspectorClient::showInspectorIndication):
(WebCore::InspectorClient::hideInspectorIndication):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::setIndicating):
Rename indicate/hideIndication to show/hide names.
Source/WebKit/ios:
* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorClient::showInspectorIndication):
(WebInspectorClient::hideInspectorIndication):
Renamed methods.
Source/WebKit/mac:
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::didSetSearchingForNode): Deleted.
(WebInspectorClient::releaseFrontend): Deleted.
* WebView/WebView.mm:
(-[WebView setShowingInspectorIndication:]):
* WebView/WebViewPrivate.h:
Renamed methods.
Source/WebKit2:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKInspectorIndicationView initWithFrame:]):
(-[WKContentView isShowingInspectorIndication]):
(-[WKContentView setShowingInspectorIndication:]):
(-[WKContentView _didCommitLayerTree:WebKit::]):
When indicating include a simple tinted UIView over the content.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showInspectorIndication]):
(-[WKWebView _hideInspectorIndication]):
Have the content view show or hide an indication.
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showInspectorIndication):
(WebKit::PageClientImpl::hideInspectorIndication):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showInspectorIndication):
(WebKit::WebPageProxy::hideInspectorIndication):
Pass WebProcess indication message up to the WKWebView.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::indicate):
(WebKit::WebInspectorClient::hideIndication):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::indicate):
(WebKit::WebPage::hideIndication):
Pass WebCore / remote inspector indication message up to UIProcess.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorClienth">trunk/Source/WebCore/inspector/InspectorClient.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorControllercpp">trunk/Source/WebCore/inspector/InspectorController.cpp</a></li>
<li><a href="#trunkSourceWebKitiosChangeLog">trunk/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitiosWebCoreSupportWebInspectorClientIOSmm">trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebInspectorClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebInspectorClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewPrivateh">trunk/Source/WebKit/mac/WebView/WebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewh">trunk/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebCore/ChangeLog        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-03-25 Joseph Pecoraro <pecoraro@apple.com>
+
+ [iOS] Inspector View Indication Support
+ https://bugs.webkit.org/show_bug.cgi?id=130709
+
+ Reviewed by Simon Fraser.
+
+ * inspector/InspectorClient.h:
+ (WebCore::InspectorClient::showInspectorIndication):
+ (WebCore::InspectorClient::hideInspectorIndication):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::setIndicating):
+ Rename indicate/hideIndication to show/hide names.
+
</ins><span class="cx"> 2014-03-25 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed build fix. Typo on checkin.
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorClient.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorClient.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebCore/inspector/InspectorClient.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> virtual void highlight() = 0;
</span><span class="cx"> virtual void hideHighlight() = 0;
</span><span class="cx">
</span><del>- virtual void indicate() { }
- virtual void hideIndication() { }
</del><ins>+ virtual void showInspectorIndication() { }
+ virtual void hideInspectorIndication() { }
</ins><span class="cx">
</span><span class="cx"> virtual bool canClearBrowserCache() { return false; }
</span><span class="cx"> virtual void clearBrowserCache() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorController.cpp        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -374,9 +374,9 @@
</span><span class="cx"> m_overlay->setIndicating(indicating);
</span><span class="cx"> #else
</span><span class="cx"> if (indicating)
</span><del>- m_inspectorClient->indicate();
</del><ins>+ m_inspectorClient->showInspectorIndication();
</ins><span class="cx"> else
</span><del>- m_inspectorClient->hideIndication();
</del><ins>+ m_inspectorClient->hideInspectorIndication();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/ios/ChangeLog        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-03-25 Joseph Pecoraro <pecoraro@apple.com>
+
+ [iOS] Inspector View Indication Support
+ https://bugs.webkit.org/show_bug.cgi?id=130709
+
+ Reviewed by Simon Fraser.
+
+ * WebCoreSupport/WebInspectorClientIOS.mm:
+ (WebInspectorClient::showInspectorIndication):
+ (WebInspectorClient::hideInspectorIndication):
+ Renamed methods.
+
</ins><span class="cx"> 2014-03-22 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove String::deprecatedCharacters
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebCoreSupportWebInspectorClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -87,14 +87,14 @@
</span><span class="cx"> [m_highlighter.get() hideHighlight];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::indicate()
</del><ins>+void WebInspectorClient::showInspectorIndication()
</ins><span class="cx"> {
</span><del>- [m_webView setIndicatingForRemoteInspector:YES];
</del><ins>+ [m_webView setShowingInspectorIndication:YES];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::hideIndication()
</del><ins>+void WebInspectorClient::hideInspectorIndication()
</ins><span class="cx"> {
</span><del>- [m_webView setIndicatingForRemoteInspector:NO];
</del><ins>+ [m_webView setShowingInspectorIndication:NO];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebInspectorClient::didSetSearchingForNode(bool enabled)
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-03-25 Joseph Pecoraro <pecoraro@apple.com>
+
+ [iOS] Inspector View Indication Support
+ https://bugs.webkit.org/show_bug.cgi?id=130709
+
+ Reviewed by Simon Fraser.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::didSetSearchingForNode): Deleted.
+ (WebInspectorClient::releaseFrontend): Deleted.
+ * WebView/WebView.mm:
+ (-[WebView setShowingInspectorIndication:]):
+ * WebView/WebViewPrivate.h:
+ Renamed methods.
+
</ins><span class="cx"> 2014-03-24 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Activate WebVTT Tests Once Merging is Complete
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -73,8 +73,10 @@
</span><span class="cx"> virtual void highlight() override;
</span><span class="cx"> virtual void hideHighlight() override;
</span><span class="cx">
</span><del>- virtual void indicate() override;
- virtual void hideIndication() override;
</del><ins>+#if PLATFORM(IOS)
+ virtual void showInspectorIndication() override;
+ virtual void hideInspectorIndication() override;
+#endif
</ins><span class="cx">
</span><span class="cx"> virtual void didSetSearchingForNode(bool) override;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebInspectorClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -181,20 +181,6 @@
</span><span class="cx"> [m_highlighter.get() hideHighlight];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::indicate()
-{
-#if ENABLE(REMOTE_INSPECTOR)
- [m_webView setIndicatingForRemoteInspector:YES];
-#endif
-}
-
-void WebInspectorClient::hideIndication()
-{
-#if ENABLE(REMOTE_INSPECTOR)
- [m_webView setIndicatingForRemoteInspector:NO];
-#endif
-}
-
</del><span class="cx"> void WebInspectorClient::didSetSearchingForNode(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> WebInspector *inspector = [m_webView inspector];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1893,12 +1893,12 @@
</span><span class="cx"> _private->page->setRemoteInspectionAllowed(allow);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)setIndicatingForRemoteInspector:(BOOL)enabled
</del><ins>+- (void)setShowingInspectorIndication:(BOOL)showing
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> ASSERT(WebThreadIsLocked());
</span><span class="cx">
</span><del>- if (enabled) {
</del><ins>+ if (showing) {
</ins><span class="cx"> if (!_private->indicateLayer) {
</span><span class="cx"> _private->indicateLayer = [[WebIndicateLayer alloc] initWithWebView:self];
</span><span class="cx"> [_private->indicateLayer setNeedsLayout];
</span><span class="lines">@@ -1910,7 +1910,7 @@
</span><span class="cx"> _private->indicateLayer = nil;
</span><span class="cx"> }
</span><span class="cx"> #else
</span><del>- // FIXME: Needs implementation or put an implementation in WebCore::InspectorOverlay.
</del><ins>+ // Implemented in WebCore::InspectorOverlay.
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -319,11 +319,11 @@
</span><span class="cx"> - (void)setAllowsRemoteInspection:(BOOL)allow;
</span><span class="cx">
</span><span class="cx"> /*!
</span><del>- @method setIndicatingForRemoteInspector
</del><ins>+ @method setShowingInspectorIndication
</ins><span class="cx"> @param enabled Show the indication when true, hide when false.
</span><span class="cx"> @abstract indicate this WebView on screen for a remote inspector.
</span><span class="cx"> */
</span><del>-- (void)setIndicatingForRemoteInspector:(BOOL)enabled;
</del><ins>+- (void)setShowingInspectorIndication:(BOOL)enabled;
</ins><span class="cx">
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> /*!
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/ChangeLog        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2014-03-25 Joseph Pecoraro <pecoraro@apple.com>
+
+ [iOS] Inspector View Indication Support
+ https://bugs.webkit.org/show_bug.cgi?id=130709
+
+ Reviewed by Simon Fraser.
+
+ * UIProcess/ios/WKContentView.h:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKInspectorIndicationView initWithFrame:]):
+ (-[WKContentView isShowingInspectorIndication]):
+ (-[WKContentView setShowingInspectorIndication:]):
+ (-[WKContentView _didCommitLayerTree:WebKit::]):
+ When indicating include a simple tinted UIView over the content.
+
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _showInspectorIndication]):
+ (-[WKWebView _hideInspectorIndication]):
+ Have the content view show or hide an indication.
+
+ * UIProcess/PageClient.h:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::showInspectorIndication):
+ (WebKit::PageClientImpl::hideInspectorIndication):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::showInspectorIndication):
+ (WebKit::WebPageProxy::hideInspectorIndication):
+ Pass WebProcess indication message up to the WKWebView.
+
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ (WebKit::WebInspectorClient::indicate):
+ (WebKit::WebInspectorClient::hideIndication):
+ * WebProcess/WebCoreSupport/WebInspectorClient.h:
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::indicate):
+ (WebKit::WebPage::hideIndication):
+ Pass WebCore / remote inspector indication message up to UIProcess.
+
</ins><span class="cx"> 2014-03-25 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Add more properties to WKWindowFeatures
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -69,7 +69,6 @@
</span><span class="cx"> @interface UIPeripheralHost(UIKitInternal)
</span><span class="cx"> - (CGFloat)getVerticalOverlapForView:(UIView *)view usingKeyboardInfo:(NSDictionary *)info;
</span><span class="cx"> @end
</span><del>-
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -1110,6 +1109,16 @@
</span><span class="cx"> [self _updateVisibleContentRects];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_showInspectorIndication
+{
+ [_contentView setShowingInspectorIndication:YES];
+}
+
+- (void)_hideInspectorIndication
+{
+ [_contentView setShowingInspectorIndication:NO];
+}
+
</ins><span class="cx"> - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler
</span><span class="cx"> {
</span><span class="cx"> CGRect snapshotRectInContentCoordinates = [self convertRect:rectInViewCoordinates toView:_contentView.get()];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -90,6 +90,9 @@
</span><span class="cx"> - (void)_beginInteractiveObscuredInsetsChange;
</span><span class="cx"> - (void)_endInteractiveObscuredInsetsChange;
</span><span class="cx">
</span><ins>+- (void)_showInspectorIndication;
+- (void)_hideInspectorIndication;
+
</ins><span class="cx"> - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler;
</span><span class="cx"> #else
</span><span class="cx"> @property (readonly) NSColor *_pageExtendedBackgroundColor;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -249,7 +249,12 @@
</span><span class="cx"> virtual void positionInformationDidChange(const InteractionInformationAtPosition&) = 0;
</span><span class="cx"> virtual void saveImageToLibrary(PassRefPtr<WebCore::SharedBuffer>) = 0;
</span><span class="cx"> virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) = 0;
</span><ins>+
+#if ENABLE(INSPECTOR)
+ virtual void showInspectorIndication() = 0;
+ virtual void hideInspectorIndication() = 0;
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> // Auxiliary Client Creation
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -1325,6 +1325,12 @@
</span><span class="cx">
</span><span class="cx"> void startAssistingNode(const AssistedNodeInformation&);
</span><span class="cx"> void stopAssistingNode();
</span><ins>+
+#if ENABLE(INSPECTOR)
+ void showInspectorIndication();
+ void hideInspectorIndication();
+#endif
+
</ins><span class="cx"> void notifyRevealedSelection();
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -319,7 +319,12 @@
</span><span class="cx"> StartAssistingNode(WebKit::AssistedNodeInformation information)
</span><span class="cx"> StopAssistingNode()
</span><span class="cx"> NotifyRevealedSelection()
</span><ins>+
+#if ENABLE(INSPECTOR)
+ ShowInspectorIndication()
+ HideInspectorIndication()
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> # Search popup menus
</span><span class="cx"> SaveRecentSearches(String name, Vector<String> searchItems)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -114,6 +114,11 @@
</span><span class="cx"> virtual void saveImageToLibrary(PassRefPtr<WebCore::SharedBuffer>);
</span><span class="cx"> virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
</span><span class="cx">
</span><ins>+#if ENABLE(INSPECTOR)
+ virtual void showInspectorIndication() override;
+ virtual void hideInspectorIndication() override;
+#endif
+
</ins><span class="cx"> // Auxiliary Client Creation
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx"> virual WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -363,6 +363,18 @@
</span><span class="cx"> [m_contentView _didUpdateBlockSelectionWithTouch:(WKSelectionTouch)touch withFlags:(WKSelectionFlags)flags growThreshold:growThreshold shrinkThreshold:shrinkThreshold];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(INSPECTOR)
+void PageClientImpl::showInspectorIndication()
+{
+ [m_webView _showInspectorIndication];
+}
+
+void PageClientImpl::hideInspectorIndication()
+{
+ [m_webView _hideInspectorIndication];
+}
+#endif
+
</ins><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">
</span><span class="cx"> WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">
</span><span class="cx"> @property (nonatomic, readonly) WebKit::WebPageProxy* page;
</span><span class="cx"> @property (nonatomic, readonly) BOOL isAssistingNode;
</span><ins>+@property (nonatomic, getter=isShowingInspectorIndication) BOOL showingInspectorIndication;
</ins><span class="cx">
</span><span class="cx"> - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -130,11 +130,28 @@
</span><span class="cx"> };
</span><span class="cx"> } // namespace WebKit
</span><span class="cx">
</span><ins>+@interface WKInspectorIndicationView : UIView
+@end
+
+@implementation WKInspectorIndicationView
+
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ if (!(self = [super initWithFrame:frame]))
+ return nil;
+ self.userInteractionEnabled = NO;
+ self.backgroundColor = [UIColor colorWithRed:(111.0 / 255.0) green:(168.0 / 255.0) blue:(220.0 / 255.0) alpha:0.66f];
+ return self;
+}
+
+@end
+
</ins><span class="cx"> @implementation WKContentView {
</span><span class="cx"> std::unique_ptr<PageClientImpl> _pageClient;
</span><span class="cx"> RetainPtr<WKBrowsingContextController> _browsingContextController;
</span><span class="cx">
</span><span class="cx"> RetainPtr<UIView> _rootContentView;
</span><ins>+ RetainPtr<WKInspectorIndicationView> _inspectorIndicationView;
</ins><span class="cx">
</span><span class="cx"> WKWebView *_webView;
</span><span class="cx">
</span><span class="lines">@@ -235,6 +252,26 @@
</span><span class="cx"> return [self isEditable];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (BOOL)isShowingInspectorIndication
+{
+ return !!_inspectorIndicationView;
+}
+
+- (void)setShowingInspectorIndication:(BOOL)show
+{
+ if (show) {
+ if (!_inspectorIndicationView) {
+ _inspectorIndicationView = adoptNS([[WKInspectorIndicationView alloc] initWithFrame:[self bounds]]);
+ [self insertSubview:_inspectorIndicationView.get() aboveSubview:_rootContentView.get()];
+ }
+ } else {
+ if (_inspectorIndicationView) {
+ [_inspectorIndicationView removeFromSuperview];
+ _inspectorIndicationView = nil;
+ }
+ }
+}
+
</ins><span class="cx"> static inline FloatRect fixedPositionRectFromExposedRect(CGRect unobscuredRect, CGSize documentSize, CGFloat scale)
</span><span class="cx"> {
</span><span class="cx"> return FrameView::rectForViewportConstrainedObjects(enclosingLayoutRect(unobscuredRect), roundedLayoutSize(FloatSize(documentSize)), scale, false, StickToViewportBounds);
</span><span class="lines">@@ -370,6 +407,7 @@
</span><span class="cx">
</span><span class="cx"> [self setBounds:{CGPointZero, contentsSize}];
</span><span class="cx"> [_rootContentView setFrame:CGRectMake(0, 0, contentsSize.width, contentsSize.height)];
</span><ins>+ [_inspectorIndicationView setFrame:[self bounds]];
</ins><span class="cx">
</span><span class="cx"> [_webView _didCommitLayerTree:layerTreeTransaction];
</span><span class="cx"> [self _updateChangedSelection];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -477,6 +477,18 @@
</span><span class="cx"> m_pageClient.stopAssistingNode();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(INSPECTOR)
+void WebPageProxy::showInspectorIndication()
+{
+ m_pageClient.showInspectorIndication();
+}
+
+void WebPageProxy::hideInspectorIndication()
+{
+ m_pageClient.hideInspectorIndication();
+}
+#endif
+
</ins><span class="cx"> void WebPageProxy::focusNextAssistedNode(bool isForward)
</span><span class="cx"> {
</span><span class="cx"> process().send(Messages::WebPage::FocusNextAssistedNode(isForward), m_pageID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -97,6 +97,18 @@
</span><span class="cx"> m_page->uninstallPageOverlay(m_highlightOverlay, true);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+void WebInspectorClient::showInspectorIndication()
+{
+ m_page->showInspectorIndication();
+}
+
+void WebInspectorClient::hideInspectorIndication()
+{
+ m_page->hideInspectorIndication();
+}
+#endif
+
</ins><span class="cx"> bool WebInspectorClient::sendMessageToFrontend(const String& message)
</span><span class="cx"> {
</span><span class="cx"> WebInspector* inspector = m_page->inspector();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -65,6 +65,11 @@
</span><span class="cx"> virtual void highlight() override;
</span><span class="cx"> virtual void hideHighlight() override;
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ virtual void showInspectorIndication() override;
+ virtual void hideInspectorIndication() override;
+#endif
+
</ins><span class="cx"> virtual bool sendMessageToFrontend(const String&) override;
</span><span class="cx">
</span><span class="cx"> virtual bool supportsFrameInstrumentation();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -468,7 +468,12 @@
</span><span class="cx"> void setAssistedNodeValue(const String&);
</span><span class="cx"> void setAssistedNodeValueAsNumber(double);
</span><span class="cx"> void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
</span><ins>+
+#if ENABLE(INSPECTOR)
+ void showInspectorIndication();
+ void hideInspectorIndication();
</ins><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> NotificationPermissionRequestManager* notificationPermissionRequestManager();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (166256 => 166257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-03-25 21:34:42 UTC (rev 166256)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2014-03-25 21:52:20 UTC (rev 166257)
</span><span class="lines">@@ -370,6 +370,18 @@
</span><span class="cx"> select->optionSelectedByUser(index, true, allowMultipleSelection);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if ENABLE(INSPECTOR)
+void WebPage::showInspectorIndication()
+{
+ send(Messages::WebPageProxy::ShowInspectorIndication());
+}
+
+void WebPage::hideInspectorIndication()
+{
+ send(Messages::WebPageProxy::HideInspectorIndication());
+}
+#endif
+
</ins><span class="cx"> static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode)
</span><span class="cx"> {
</span><span class="cx"> frame->document()->updateLayoutIgnorePendingStylesheets();
</span></span></pre>
</div>
</div>
</body>
</html>