Title: [166257] trunk/Source
Revision
166257
Author
joep...@webkit.org
Date
2014-03-25 14:52:20 -0700 (Tue, 25 Mar 2014)

Log Message

[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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166256 => 166257)


--- 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)
@@ -1,3 +1,17 @@
+2014-03-25  Joseph Pecoraro  <pecor...@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.
+
 2014-03-25  Brent Fulgham  <bfulg...@apple.com>
 
         Unreviewed build fix. Typo on checkin.

Modified: trunk/Source/WebCore/inspector/InspectorClient.h (166256 => 166257)


--- 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)
@@ -56,8 +56,8 @@
     virtual void highlight() = 0;
     virtual void hideHighlight() = 0;
 
-    virtual void indicate() { }
-    virtual void hideIndication() { }
+    virtual void showInspectorIndication() { }
+    virtual void hideInspectorIndication() { }
 
     virtual bool canClearBrowserCache() { return false; }
     virtual void clearBrowserCache() { }

Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (166256 => 166257)


--- 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)
@@ -374,9 +374,9 @@
     m_overlay->setIndicating(indicating);
 #else
     if (indicating)
-        m_inspectorClient->indicate();
+        m_inspectorClient->showInspectorIndication();
     else
-        m_inspectorClient->hideIndication();
+        m_inspectorClient->hideInspectorIndication();
 #endif
 }
 

Modified: trunk/Source/WebKit/ios/ChangeLog (166256 => 166257)


--- 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)
@@ -1,3 +1,15 @@
+2014-03-25  Joseph Pecoraro  <pecor...@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.
+
 2014-03-22  Darin Adler  <da...@apple.com>
 
         Remove String::deprecatedCharacters

Modified: trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm (166256 => 166257)


--- 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)
@@ -87,14 +87,14 @@
     [m_highlighter.get() hideHighlight];
 }
 
-void WebInspectorClient::indicate()
+void WebInspectorClient::showInspectorIndication()
 {
-    [m_webView setIndicatingForRemoteInspector:YES];
+    [m_webView setShowingInspectorIndication:YES];
 }
 
-void WebInspectorClient::hideIndication()
+void WebInspectorClient::hideInspectorIndication()
 {
-    [m_webView setIndicatingForRemoteInspector:NO];
+    [m_webView setShowingInspectorIndication:NO];
 }
 
 void WebInspectorClient::didSetSearchingForNode(bool enabled)

Modified: trunk/Source/WebKit/mac/ChangeLog (166256 => 166257)


--- 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)
@@ -1,3 +1,19 @@
+2014-03-25  Joseph Pecoraro  <pecor...@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.
+
 2014-03-24  Brent Fulgham  <bfulg...@apple.com>
 
         Activate WebVTT Tests Once Merging is Complete

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h (166256 => 166257)


--- 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)
@@ -73,8 +73,10 @@
     virtual void highlight() override;
     virtual void hideHighlight() override;
 
-    virtual void indicate() override;
-    virtual void hideIndication() override;
+#if PLATFORM(IOS)
+    virtual void showInspectorIndication() override;
+    virtual void hideInspectorIndication() override;
+#endif
 
     virtual void didSetSearchingForNode(bool) override;
 

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (166256 => 166257)


--- 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)
@@ -181,20 +181,6 @@
     [m_highlighter.get() hideHighlight];
 }
 
-void WebInspectorClient::indicate()
-{
-#if ENABLE(REMOTE_INSPECTOR)
-    [m_webView setIndicatingForRemoteInspector:YES];
-#endif
-}
-
-void WebInspectorClient::hideIndication()
-{
-#if ENABLE(REMOTE_INSPECTOR)
-    [m_webView setIndicatingForRemoteInspector:NO];
-#endif
-}
-
 void WebInspectorClient::didSetSearchingForNode(bool enabled)
 {
     WebInspector *inspector = [m_webView inspector];

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (166256 => 166257)


--- 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)
@@ -1893,12 +1893,12 @@
     _private->page->setRemoteInspectionAllowed(allow);
 }
 
-- (void)setIndicatingForRemoteInspector:(BOOL)enabled
+- (void)setShowingInspectorIndication:(BOOL)showing
 {
 #if PLATFORM(IOS)
     ASSERT(WebThreadIsLocked());
 
-    if (enabled) {
+    if (showing) {
         if (!_private->indicateLayer) {
             _private->indicateLayer = [[WebIndicateLayer alloc] initWithWebView:self];
             [_private->indicateLayer setNeedsLayout];
@@ -1910,7 +1910,7 @@
         _private->indicateLayer = nil;
     }
 #else
-    // FIXME: Needs implementation or put an implementation in WebCore::InspectorOverlay.
+    // Implemented in WebCore::InspectorOverlay.
 #endif
 }
 

Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (166256 => 166257)


--- 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)
@@ -319,11 +319,11 @@
 - (void)setAllowsRemoteInspection:(BOOL)allow;
 
 /*!
-    @method setIndicatingForRemoteInspector
+    @method setShowingInspectorIndication
     @param enabled Show the indication when true, hide when false.
     @abstract indicate this WebView on screen for a remote inspector.
 */
-- (void)setIndicatingForRemoteInspector:(BOOL)enabled;
+- (void)setShowingInspectorIndication:(BOOL)enabled;
 
 #if TARGET_OS_IPHONE
 /*!

Modified: trunk/Source/WebKit2/ChangeLog (166256 => 166257)


--- 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)
@@ -1,3 +1,46 @@
+2014-03-25  Joseph Pecoraro  <pecor...@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.
+
 2014-03-25  Anders Carlsson  <ander...@apple.com>
 
         Add more properties to WKWindowFeatures

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (166256 => 166257)


--- 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)
@@ -69,7 +69,6 @@
 @interface UIPeripheralHost(UIKitInternal)
 - (CGFloat)getVerticalOverlapForView:(UIView *)view usingKeyboardInfo:(NSDictionary *)info;
 @end
-
 #endif
 
 #if PLATFORM(MAC)
@@ -1110,6 +1109,16 @@
     [self _updateVisibleContentRects];
 }
 
+- (void)_showInspectorIndication
+{
+    [_contentView setShowingInspectorIndication:YES];
+}
+
+- (void)_hideInspectorIndication
+{
+    [_contentView setShowingInspectorIndication:NO];
+}
+
 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler
 {
     CGRect snapshotRectInContentCoordinates = [self convertRect:rectInViewCoordinates toView:_contentView.get()];

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (166256 => 166257)


--- 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)
@@ -90,6 +90,9 @@
 - (void)_beginInteractiveObscuredInsetsChange;
 - (void)_endInteractiveObscuredInsetsChange;
 
+- (void)_showInspectorIndication;
+- (void)_hideInspectorIndication;
+
 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler;
 #else
 @property (readonly) NSColor *_pageExtendedBackgroundColor;

Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (166256 => 166257)


--- 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)
@@ -249,7 +249,12 @@
     virtual void positionInformationDidChange(const InteractionInformationAtPosition&) = 0;
     virtual void saveImageToLibrary(PassRefPtr<WebCore::SharedBuffer>) = 0;
     virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) = 0;
+
+#if ENABLE(INSPECTOR)
+    virtual void showInspectorIndication() = 0;
+    virtual void hideInspectorIndication() = 0;
 #endif
+#endif
 
     // Auxiliary Client Creation
 #if ENABLE(FULLSCREEN_API)

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (166256 => 166257)


--- 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)
@@ -1325,6 +1325,12 @@
 
     void startAssistingNode(const AssistedNodeInformation&);
     void stopAssistingNode();
+
+#if ENABLE(INSPECTOR)
+    void showInspectorIndication();
+    void hideInspectorIndication();
+#endif
+
     void notifyRevealedSelection();
 #endif // PLATFORM(IOS)
 

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (166256 => 166257)


--- 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)
@@ -319,7 +319,12 @@
     StartAssistingNode(WebKit::AssistedNodeInformation information)
     StopAssistingNode()
     NotifyRevealedSelection()
+
+#if ENABLE(INSPECTOR)
+    ShowInspectorIndication()
+    HideInspectorIndication()
 #endif
+#endif
 
     # Search popup menus
     SaveRecentSearches(String name, Vector<String> searchItems)

Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (166256 => 166257)


--- 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)
@@ -114,6 +114,11 @@
     virtual void saveImageToLibrary(PassRefPtr<WebCore::SharedBuffer>);
     virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold);
 
+#if ENABLE(INSPECTOR)
+    virtual void showInspectorIndication() override;
+    virtual void hideInspectorIndication() override;
+#endif
+
     // Auxiliary Client Creation
 #if ENABLE(FULLSCREEN_API)
     virual WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() override;

Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (166256 => 166257)


--- 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)
@@ -363,6 +363,18 @@
     [m_contentView _didUpdateBlockSelectionWithTouch:(WKSelectionTouch)touch withFlags:(WKSelectionFlags)flags growThreshold:growThreshold shrinkThreshold:shrinkThreshold];
 }
 
+#if ENABLE(INSPECTOR)
+void PageClientImpl::showInspectorIndication()
+{
+    [m_webView _showInspectorIndication];
+}
+
+void PageClientImpl::hideInspectorIndication()
+{
+    [m_webView _hideInspectorIndication];
+}
+#endif
+
 #if ENABLE(FULLSCREEN_API)
 
 WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient()

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (166256 => 166257)


--- 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)
@@ -53,6 +53,7 @@
 
 @property (nonatomic, readonly) WebKit::WebPageProxy* page;
 @property (nonatomic, readonly) BOOL isAssistingNode;
+@property (nonatomic, getter=isShowingInspectorIndication) BOOL showingInspectorIndication;
 
 - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
 

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (166256 => 166257)


--- 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)
@@ -130,11 +130,28 @@
 };
 } // namespace WebKit
 
+@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
+
 @implementation WKContentView {
     std::unique_ptr<PageClientImpl> _pageClient;
     RetainPtr<WKBrowsingContextController> _browsingContextController;
 
     RetainPtr<UIView> _rootContentView;
+    RetainPtr<WKInspectorIndicationView> _inspectorIndicationView;
 
     WKWebView *_webView;
 
@@ -235,6 +252,26 @@
     return [self isEditable];
 }
 
+- (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;
+        }
+    }
+}
+
 static inline FloatRect fixedPositionRectFromExposedRect(CGRect unobscuredRect, CGSize documentSize, CGFloat scale)
 {
     return FrameView::rectForViewportConstrainedObjects(enclosingLayoutRect(unobscuredRect), roundedLayoutSize(FloatSize(documentSize)), scale, false, StickToViewportBounds);
@@ -370,6 +407,7 @@
 
     [self setBounds:{CGPointZero, contentsSize}];
     [_rootContentView setFrame:CGRectMake(0, 0, contentsSize.width, contentsSize.height)];
+    [_inspectorIndicationView setFrame:[self bounds]];
 
     [_webView _didCommitLayerTree:layerTreeTransaction];
     [self _updateChangedSelection];

Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (166256 => 166257)


--- 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)
@@ -477,6 +477,18 @@
     m_pageClient.stopAssistingNode();
 }
 
+#if ENABLE(INSPECTOR)
+void WebPageProxy::showInspectorIndication()
+{
+    m_pageClient.showInspectorIndication();
+}
+
+void WebPageProxy::hideInspectorIndication()
+{
+    m_pageClient.hideInspectorIndication();
+}
+#endif
+
 void WebPageProxy::focusNextAssistedNode(bool isForward)
 {
     process().send(Messages::WebPage::FocusNextAssistedNode(isForward), m_pageID);

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (166256 => 166257)


--- 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)
@@ -97,6 +97,18 @@
         m_page->uninstallPageOverlay(m_highlightOverlay, true);
 }
 
+#if PLATFORM(IOS)
+void WebInspectorClient::showInspectorIndication()
+{
+    m_page->showInspectorIndication();
+}
+
+void WebInspectorClient::hideInspectorIndication()
+{
+    m_page->hideInspectorIndication();
+}
+#endif
+
 bool WebInspectorClient::sendMessageToFrontend(const String& message)
 {
     WebInspector* inspector = m_page->inspector();

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (166256 => 166257)


--- 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)
@@ -65,6 +65,11 @@
     virtual void highlight() override;
     virtual void hideHighlight() override;
 
+#if PLATFORM(IOS)
+    virtual void showInspectorIndication() override;
+    virtual void hideInspectorIndication() override;
+#endif
+
     virtual bool sendMessageToFrontend(const String&) override;
 
     virtual bool supportsFrameInstrumentation();

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (166256 => 166257)


--- 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)
@@ -468,7 +468,12 @@
     void setAssistedNodeValue(const String&);
     void setAssistedNodeValueAsNumber(double);
     void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection);
+
+#if ENABLE(INSPECTOR)
+    void showInspectorIndication();
+    void hideInspectorIndication();
 #endif
+#endif
 
     NotificationPermissionRequestManager* notificationPermissionRequestManager();
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (166256 => 166257)


--- 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)
@@ -370,6 +370,18 @@
     select->optionSelectedByUser(index, true, allowMultipleSelection);
 }
 
+#if ENABLE(INSPECTOR)
+void WebPage::showInspectorIndication()
+{
+    send(Messages::WebPageProxy::ShowInspectorIndication());
+}
+
+void WebPage::hideInspectorIndication()
+{
+    send(Messages::WebPageProxy::HideInspectorIndication());
+}
+#endif
+
 static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode)
 {
     frame->document()->updateLayoutIgnorePendingStylesheets();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to