Changeset 166257 in webkit
- Timestamp:
- Mar 25, 2014, 2:52:20 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r166256 r166257 1 2014-03-25 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] Inspector View Indication Support 4 https://bugs.webkit.org/show_bug.cgi?id=130709 5 6 Reviewed by Simon Fraser. 7 8 * inspector/InspectorClient.h: 9 (WebCore::InspectorClient::showInspectorIndication): 10 (WebCore::InspectorClient::hideInspectorIndication): 11 * inspector/InspectorController.cpp: 12 (WebCore::InspectorController::setIndicating): 13 Rename indicate/hideIndication to show/hide names. 14 1 15 2014-03-25 Brent Fulgham <bfulgham@apple.com> 2 16 -
trunk/Source/WebCore/inspector/InspectorClient.h
r165676 r166257 57 57 virtual void hideHighlight() = 0; 58 58 59 virtual void indicate() { }60 virtual void hideIn dication() { }59 virtual void showInspectorIndication() { } 60 virtual void hideInspectorIndication() { } 61 61 62 62 virtual bool canClearBrowserCache() { return false; } -
trunk/Source/WebCore/inspector/InspectorController.cpp
r165545 r166257 375 375 #else 376 376 if (indicating) 377 m_inspectorClient-> indicate();377 m_inspectorClient->showInspectorIndication(); 378 378 else 379 m_inspectorClient->hideIn dication();379 m_inspectorClient->hideInspectorIndication(); 380 380 #endif 381 381 } -
trunk/Source/WebKit/ios/ChangeLog
r166120 r166257 1 2014-03-25 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] Inspector View Indication Support 4 https://bugs.webkit.org/show_bug.cgi?id=130709 5 6 Reviewed by Simon Fraser. 7 8 * WebCoreSupport/WebInspectorClientIOS.mm: 9 (WebInspectorClient::showInspectorIndication): 10 (WebInspectorClient::hideInspectorIndication): 11 Renamed methods. 12 1 13 2014-03-22 Darin Adler <darin@apple.com> 2 14 -
trunk/Source/WebKit/ios/WebCoreSupport/WebInspectorClientIOS.mm
r165676 r166257 88 88 } 89 89 90 void WebInspectorClient:: indicate()90 void WebInspectorClient::showInspectorIndication() 91 91 { 92 [m_webView set IndicatingForRemoteInspector:YES];92 [m_webView setShowingInspectorIndication:YES]; 93 93 } 94 94 95 void WebInspectorClient::hideIn dication()95 void WebInspectorClient::hideInspectorIndication() 96 96 { 97 [m_webView set IndicatingForRemoteInspector:NO];97 [m_webView setShowingInspectorIndication:NO]; 98 98 } 99 99 -
trunk/Source/WebKit/mac/ChangeLog
r166201 r166257 1 2014-03-25 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] Inspector View Indication Support 4 https://bugs.webkit.org/show_bug.cgi?id=130709 5 6 Reviewed by Simon Fraser. 7 8 * WebCoreSupport/WebInspectorClient.h: 9 * WebCoreSupport/WebInspectorClient.mm: 10 (WebInspectorClient::didSetSearchingForNode): Deleted. 11 (WebInspectorClient::releaseFrontend): Deleted. 12 * WebView/WebView.mm: 13 (-[WebView setShowingInspectorIndication:]): 14 * WebView/WebViewPrivate.h: 15 Renamed methods. 16 1 17 2014-03-24 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
r165676 r166257 74 74 virtual void hideHighlight() override; 75 75 76 virtual void indicate() override; 77 virtual void hideIndication() override; 76 #if PLATFORM(IOS) 77 virtual void showInspectorIndication() override; 78 virtual void hideInspectorIndication() override; 79 #endif 78 80 79 81 virtual void didSetSearchingForNode(bool) override; -
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
r165676 r166257 182 182 } 183 183 184 void WebInspectorClient::indicate()185 {186 #if ENABLE(REMOTE_INSPECTOR)187 [m_webView setIndicatingForRemoteInspector:YES];188 #endif189 }190 191 void WebInspectorClient::hideIndication()192 {193 #if ENABLE(REMOTE_INSPECTOR)194 [m_webView setIndicatingForRemoteInspector:NO];195 #endif196 }197 198 184 void WebInspectorClient::didSetSearchingForNode(bool enabled) 199 185 { -
trunk/Source/WebKit/mac/WebView/WebView.mm
r166117 r166257 1894 1894 } 1895 1895 1896 - (void)set IndicatingForRemoteInspector:(BOOL)enabled1896 - (void)setShowingInspectorIndication:(BOOL)showing 1897 1897 { 1898 1898 #if PLATFORM(IOS) 1899 1899 ASSERT(WebThreadIsLocked()); 1900 1900 1901 if ( enabled) {1901 if (showing) { 1902 1902 if (!_private->indicateLayer) { 1903 1903 _private->indicateLayer = [[WebIndicateLayer alloc] initWithWebView:self]; … … 1911 1911 } 1912 1912 #else 1913 // FIXME: Needs implementation or put an implementationin WebCore::InspectorOverlay.1913 // Implemented in WebCore::InspectorOverlay. 1914 1914 #endif 1915 1915 } -
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
r166117 r166257 320 320 321 321 /*! 322 @method set IndicatingForRemoteInspector322 @method setShowingInspectorIndication 323 323 @param enabled Show the indication when true, hide when false. 324 324 @abstract indicate this WebView on screen for a remote inspector. 325 325 */ 326 - (void)set IndicatingForRemoteInspector:(BOOL)enabled;326 - (void)setShowingInspectorIndication:(BOOL)enabled; 327 327 328 328 #if TARGET_OS_IPHONE -
trunk/Source/WebKit2/ChangeLog
r166253 r166257 1 2014-03-25 Joseph Pecoraro <pecoraro@apple.com> 2 3 [iOS] Inspector View Indication Support 4 https://bugs.webkit.org/show_bug.cgi?id=130709 5 6 Reviewed by Simon Fraser. 7 8 * UIProcess/ios/WKContentView.h: 9 * UIProcess/ios/WKContentView.mm: 10 (-[WKInspectorIndicationView initWithFrame:]): 11 (-[WKContentView isShowingInspectorIndication]): 12 (-[WKContentView setShowingInspectorIndication:]): 13 (-[WKContentView _didCommitLayerTree:WebKit::]): 14 When indicating include a simple tinted UIView over the content. 15 16 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 17 * UIProcess/API/Cocoa/WKWebView.mm: 18 (-[WKWebView _showInspectorIndication]): 19 (-[WKWebView _hideInspectorIndication]): 20 Have the content view show or hide an indication. 21 22 * UIProcess/PageClient.h: 23 * UIProcess/ios/PageClientImplIOS.h: 24 * UIProcess/ios/PageClientImplIOS.mm: 25 (WebKit::PageClientImpl::showInspectorIndication): 26 (WebKit::PageClientImpl::hideInspectorIndication): 27 * UIProcess/WebPageProxy.h: 28 * UIProcess/WebPageProxy.messages.in: 29 * UIProcess/ios/WebPageProxyIOS.mm: 30 (WebKit::WebPageProxy::showInspectorIndication): 31 (WebKit::WebPageProxy::hideInspectorIndication): 32 Pass WebProcess indication message up to the WKWebView. 33 34 * WebProcess/WebCoreSupport/WebInspectorClient.cpp: 35 (WebKit::WebInspectorClient::indicate): 36 (WebKit::WebInspectorClient::hideIndication): 37 * WebProcess/WebCoreSupport/WebInspectorClient.h: 38 * WebProcess/WebPage/WebPage.h: 39 * WebProcess/WebPage/ios/WebPageIOS.mm: 40 (WebKit::WebPage::indicate): 41 (WebKit::WebPage::hideIndication): 42 Pass WebCore / remote inspector indication message up to UIProcess. 43 1 44 2014-03-25 Anders Carlsson <andersca@apple.com> 2 45 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r166251 r166257 70 70 - (CGFloat)getVerticalOverlapForView:(UIView *)view usingKeyboardInfo:(NSDictionary *)info; 71 71 @end 72 73 72 #endif 74 73 … … 1111 1110 } 1112 1111 1112 - (void)_showInspectorIndication 1113 { 1114 [_contentView setShowingInspectorIndication:YES]; 1115 } 1116 1117 - (void)_hideInspectorIndication 1118 { 1119 [_contentView setShowingInspectorIndication:NO]; 1120 } 1121 1113 1122 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler 1114 1123 { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r166017 r166257 91 91 - (void)_endInteractiveObscuredInsetsChange; 92 92 93 - (void)_showInspectorIndication; 94 - (void)_hideInspectorIndication; 95 93 96 - (void)_snapshotRect:(CGRect)rectInViewCoordinates intoImageOfWidth:(CGFloat)imageWidth completionHandler:(void(^)(CGImageRef))completionHandler; 94 97 #else -
trunk/Source/WebKit2/UIProcess/PageClient.h
r165356 r166257 250 250 virtual void saveImageToLibrary(PassRefPtr<WebCore::SharedBuffer>) = 0; 251 251 virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) = 0; 252 253 #if ENABLE(INSPECTOR) 254 virtual void showInspectorIndication() = 0; 255 virtual void hideInspectorIndication() = 0; 256 #endif 252 257 #endif 253 258 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r166208 r166257 1326 1326 void startAssistingNode(const AssistedNodeInformation&); 1327 1327 void stopAssistingNode(); 1328 1329 #if ENABLE(INSPECTOR) 1330 void showInspectorIndication(); 1331 void hideInspectorIndication(); 1332 #endif 1333 1328 1334 void notifyRevealedSelection(); 1329 1335 #endif // PLATFORM(IOS) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r166208 r166257 320 320 StopAssistingNode() 321 321 NotifyRevealedSelection() 322 323 #if ENABLE(INSPECTOR) 324 ShowInspectorIndication() 325 HideInspectorIndication() 326 #endif 322 327 #endif 323 328 -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h
r165356 r166257 115 115 virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold); 116 116 117 #if ENABLE(INSPECTOR) 118 virtual void showInspectorIndication() override; 119 virtual void hideInspectorIndication() override; 120 #endif 121 117 122 // Auxiliary Client Creation 118 123 #if ENABLE(FULLSCREEN_API) -
trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm
r165356 r166257 364 364 } 365 365 366 #if ENABLE(INSPECTOR) 367 void PageClientImpl::showInspectorIndication() 368 { 369 [m_webView _showInspectorIndication]; 370 } 371 372 void PageClientImpl::hideInspectorIndication() 373 { 374 [m_webView _hideInspectorIndication]; 375 } 376 #endif 377 366 378 #if ENABLE(FULLSCREEN_API) 367 379 -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.h
r165022 r166257 54 54 @property (nonatomic, readonly) WebKit::WebPageProxy* page; 55 55 @property (nonatomic, readonly) BOOL isAssistingNode; 56 @property (nonatomic, getter=isShowingInspectorIndication) BOOL showingInspectorIndication; 56 57 57 58 - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView; -
trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm
r166188 r166257 131 131 } // namespace WebKit 132 132 133 @interface WKInspectorIndicationView : UIView 134 @end 135 136 @implementation WKInspectorIndicationView 137 138 - (instancetype)initWithFrame:(CGRect)frame 139 { 140 if (!(self = [super initWithFrame:frame])) 141 return nil; 142 self.userInteractionEnabled = NO; 143 self.backgroundColor = [UIColor colorWithRed:(111.0 / 255.0) green:(168.0 / 255.0) blue:(220.0 / 255.0) alpha:0.66f]; 144 return self; 145 } 146 147 @end 148 133 149 @implementation WKContentView { 134 150 std::unique_ptr<PageClientImpl> _pageClient; … … 136 152 137 153 RetainPtr<UIView> _rootContentView; 154 RetainPtr<WKInspectorIndicationView> _inspectorIndicationView; 138 155 139 156 WKWebView *_webView; … … 234 251 { 235 252 return [self isEditable]; 253 } 254 255 - (BOOL)isShowingInspectorIndication 256 { 257 return !!_inspectorIndicationView; 258 } 259 260 - (void)setShowingInspectorIndication:(BOOL)show 261 { 262 if (show) { 263 if (!_inspectorIndicationView) { 264 _inspectorIndicationView = adoptNS([[WKInspectorIndicationView alloc] initWithFrame:[self bounds]]); 265 [self insertSubview:_inspectorIndicationView.get() aboveSubview:_rootContentView.get()]; 266 } 267 } else { 268 if (_inspectorIndicationView) { 269 [_inspectorIndicationView removeFromSuperview]; 270 _inspectorIndicationView = nil; 271 } 272 } 236 273 } 237 274 … … 371 408 [self setBounds:{CGPointZero, contentsSize}]; 372 409 [_rootContentView setFrame:CGRectMake(0, 0, contentsSize.width, contentsSize.height)]; 410 [_inspectorIndicationView setFrame:[self bounds]]; 373 411 374 412 [_webView _didCommitLayerTree:layerTreeTransaction]; -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r166208 r166257 478 478 } 479 479 480 #if ENABLE(INSPECTOR) 481 void WebPageProxy::showInspectorIndication() 482 { 483 m_pageClient.showInspectorIndication(); 484 } 485 486 void WebPageProxy::hideInspectorIndication() 487 { 488 m_pageClient.hideInspectorIndication(); 489 } 490 #endif 491 480 492 void WebPageProxy::focusNextAssistedNode(bool isForward) 481 493 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
r164830 r166257 98 98 } 99 99 100 #if PLATFORM(IOS) 101 void WebInspectorClient::showInspectorIndication() 102 { 103 m_page->showInspectorIndication(); 104 } 105 106 void WebInspectorClient::hideInspectorIndication() 107 { 108 m_page->hideInspectorIndication(); 109 } 110 #endif 111 100 112 bool WebInspectorClient::sendMessageToFrontend(const String& message) 101 113 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h
r162139 r166257 66 66 virtual void hideHighlight() override; 67 67 68 #if PLATFORM(IOS) 69 virtual void showInspectorIndication() override; 70 virtual void hideInspectorIndication() override; 71 #endif 72 68 73 virtual bool sendMessageToFrontend(const String&) override; 69 74 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r166208 r166257 469 469 void setAssistedNodeValueAsNumber(double); 470 470 void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection); 471 472 #if ENABLE(INSPECTOR) 473 void showInspectorIndication(); 474 void hideInspectorIndication(); 475 #endif 471 476 #endif 472 477 -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r166208 r166257 371 371 } 372 372 373 #if ENABLE(INSPECTOR) 374 void WebPage::showInspectorIndication() 375 { 376 send(Messages::WebPageProxy::ShowInspectorIndication()); 377 } 378 379 void WebPage::hideInspectorIndication() 380 { 381 send(Messages::WebPageProxy::HideInspectorIndication()); 382 } 383 #endif 384 373 385 static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode) 374 386 {
Note:
See TracChangeset
for help on using the changeset viewer.