Changeset 223267 in webkit
- Timestamp:
- Oct 12, 2017 5:41:45 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r223265 r223267 1 2017-10-12 Alex Christensen <achristensen@webkit.org> 2 3 Expose some of WKView's WebViewImpl accessors through WKWebViewPrivate 4 https://bugs.webkit.org/show_bug.cgi?id=178240 5 <rdar://problem/34962720> 6 7 Reviewed by Tim Horton. 8 9 Also renamed createFullScreenWindow to fullScreenWindow to reflect the fact that it returns 10 an autoreleased NSWindow so we don't make the same naming mistake in the WKWebView SPI. 11 12 * UIProcess/API/Cocoa/WKWebView.mm: 13 (-[WKWebView _dismissContentRelativeChildWindows]): 14 (-[WKWebView _setFrame:andScrollBy:]): 15 (-[WKWebView _setTotalHeightOfBanners:]): 16 (-[WKWebView _totalHeightOfBanners]): 17 (-[WKWebView _beginDeferringViewInWindowChanges]): 18 (-[WKWebView _endDeferringViewInWindowChanges]): 19 (-[WKWebView _endDeferringViewInWindowChangesSync]): 20 (-[WKWebView _gestureEventWasNotHandledByWebCore:]): 21 (-[WKWebView _setIgnoresNonWheelEvents:]): 22 (-[WKWebView _ignoresNonWheelEvents]): 23 (-[WKWebView _setCustomSwipeViews:]): 24 (-[WKWebView _setCustomSwipeViewsTopContentInset:]): 25 (-[WKWebView _tryToSwipeWithEvent:ignoringPinnedState:]): 26 (-[WKWebView _setDidMoveSwipeSnapshotCallback:]): 27 (-[WKWebView _fullScreenPlaceholderView]): 28 (-[WKWebView _fullScreenWindow]): 29 (-[WKWebView _disableFrameSizeUpdates]): 30 (-[WKWebView _enableFrameSizeUpdates]): 31 (-[WKWebView _canChangeFrameLayout:]): 32 (-[WKWebView _underlayColor]): 33 (-[WKWebView _setUnderlayColor:]): 34 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 35 * UIProcess/API/mac/WKView.mm: 36 (-[WKView createFullScreenWindow]): 37 * UIProcess/Cocoa/WebViewImpl.h: 38 * UIProcess/Cocoa/WebViewImpl.mm: 39 (WebKit::WebViewImpl::fullScreenWindowController): 40 (WebKit::WebViewImpl::fullScreenWindow): 41 (WebKit::WebViewImpl::createFullScreenWindow): Deleted. 42 1 43 2017-10-12 Youenn Fablet <youenn@apple.com> 2 44 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r222059 r223267 150 150 #endif 151 151 - (void)_webView:(WKWebView *)webView didChangeSafeAreaShouldAffectObscuredInsets:(BOOL)safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(11.0)); 152 #else 152 #else // TARGET_OS_IPHONE 153 - (void)_prepareForImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 154 - (void)_cancelImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 155 - (void)_completeImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 153 156 - (void)_showWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 154 157 - (void)_focusWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); … … 175 178 - (NSMenu *)_webView:(WKWebView *)webView contextMenu:(NSMenu *)menu forElement:(_WKContextMenuElementInfo *)element WK_API_AVAILABLE(macosx(10.12)); 176 179 - (NSMenu *)_webView:(WKWebView *)webView contextMenu:(NSMenu *)menu forElement:(_WKContextMenuElementInfo *)element userInfo:(id <NSSecureCoding>)userInfo WK_API_AVAILABLE(macosx(10.12)); 177 #endif 180 #endif // TARGET_OS_IPHONE 178 181 179 182 @end -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKViewPrivate.h
r222577 r223267 27 27 28 28 #import <WebKit/WKBase.h> 29 #import <WebKit/WKImmediateActionTypes.h>30 29 #import <WebKit/WKLayoutMode.h> 31 30 #import <WebKit/WKView.h> -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r223082 r223267 3684 3684 } 3685 3685 3686 // We don't expose these various bits of SPI like WKView does,3687 // so have these internal methods just do the work (or do nothing):3688 3686 - (void)_web_prepareForImmediateActionAnimation 3689 3687 { 3688 id <WKUIDelegatePrivate> uiDelegate = (id <WKUIDelegatePrivate>)[self UIDelegate]; 3689 if ([uiDelegate respondsToSelector:@selector(_prepareForImmediateActionAnimationForWebView:)]) 3690 [uiDelegate _prepareForImmediateActionAnimationForWebView:self]; 3691 else 3692 [self _prepareForImmediateActionAnimation]; 3690 3693 } 3691 3694 3692 3695 - (void)_web_cancelImmediateActionAnimation 3693 3696 { 3697 id <WKUIDelegatePrivate> uiDelegate = (id <WKUIDelegatePrivate>)[self UIDelegate]; 3698 if ([uiDelegate respondsToSelector:@selector(_cancelImmediateActionAnimationForWebView:)]) 3699 [uiDelegate _cancelImmediateActionAnimationForWebView:self]; 3700 else 3701 [self _cancelImmediateActionAnimation]; 3694 3702 } 3695 3703 3696 3704 - (void)_web_completeImmediateActionAnimation 3697 3705 { 3706 id <WKUIDelegatePrivate> uiDelegate = (id <WKUIDelegatePrivate>)[self UIDelegate]; 3707 if ([uiDelegate respondsToSelector:@selector(_completeImmediateActionAnimationForWebView:)]) 3708 [uiDelegate _completeImmediateActionAnimationForWebView:self]; 3709 else 3710 [self _completeImmediateActionAnimation]; 3698 3711 } 3699 3712 … … 5349 5362 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle 5350 5363 { 5351 if (auto webFrameProxy = _page->process().webFrame(frameHandle._frameID))5364 if (auto* webFrameProxy = _page->process().webFrame(frameHandle._frameID)) 5352 5365 return _impl->printOperationWithPrintInfo(printInfo, *webFrameProxy); 5353 5366 return nil; … … 5661 5674 } 5662 5675 5676 - (void)_dismissContentRelativeChildWindows 5677 { 5678 _impl->dismissContentRelativeChildWindowsFromViewOnly(); 5679 } 5680 5681 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset 5682 { 5683 _impl->setFrameAndScrollBy(NSRectToCGRect(rect), NSSizeToCGSize(offset)); 5684 } 5685 5686 - (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners 5687 { 5688 _impl->setTotalHeightOfBanners(totalHeightOfBanners); 5689 } 5690 5691 - (CGFloat)_totalHeightOfBanners 5692 { 5693 return _impl->totalHeightOfBanners(); 5694 } 5695 5696 - (void)_beginDeferringViewInWindowChanges 5697 { 5698 _impl->beginDeferringViewInWindowChanges(); 5699 } 5700 5701 - (void)_endDeferringViewInWindowChanges 5702 { 5703 _impl->endDeferringViewInWindowChanges(); 5704 } 5705 5706 - (void)_endDeferringViewInWindowChangesSync 5707 { 5708 _impl->endDeferringViewInWindowChangesSync(); 5709 } 5710 5711 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event 5712 { 5713 _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event); 5714 } 5715 5716 - (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents 5717 { 5718 _impl->setIgnoresNonWheelEvents(ignoresNonWheelEvents); 5719 } 5720 5721 - (BOOL)_ignoresNonWheelEvents 5722 { 5723 return _impl->ignoresNonWheelEvents(); 5724 } 5725 5726 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews 5727 { 5728 _impl->setCustomSwipeViews(customSwipeViews); 5729 } 5730 5731 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset 5732 { 5733 _impl->setCustomSwipeViewsTopContentInset(topContentInset); 5734 } 5735 5736 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState 5737 { 5738 return _impl->tryToSwipeWithEvent(event, ignoringPinnedState); 5739 } 5740 5741 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback 5742 { 5743 _impl->setDidMoveSwipeSnapshotCallback(callback); 5744 } 5745 5746 - (NSView *)_fullScreenPlaceholderView 5747 { 5748 return _impl->fullScreenPlaceholderView(); 5749 } 5750 5751 - (NSWindow *)_fullScreenWindow 5752 { 5753 return _impl->fullScreenWindow(); 5754 } 5755 5756 - (void)_disableFrameSizeUpdates 5757 { 5758 _impl->disableFrameSizeUpdates(); 5759 } 5760 5761 - (void)_enableFrameSizeUpdates 5762 { 5763 _impl->enableFrameSizeUpdates(); 5764 } 5765 5766 - (void)_prepareForImmediateActionAnimation 5767 { 5768 } 5769 5770 - (void)_cancelImmediateActionAnimation 5771 { 5772 } 5773 5774 - (void)_completeImmediateActionAnimation 5775 { 5776 } 5777 5778 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle 5779 { 5780 if (auto* webFrameProxy = _page->process().webFrame(frameHandle._frameID)) 5781 return _impl->canChangeFrameLayout(*webFrameProxy); 5782 return false; 5783 } 5784 5785 - (NSColor *)_underlayColor 5786 { 5787 return _impl->underlayColor(); 5788 } 5789 5790 - (void)_setUnderlayColor:(NSColor *)underlayColor 5791 { 5792 _impl->setUnderlayColor(underlayColor); 5793 } 5794 5663 5795 - (BOOL)_hasActiveVideoForControlsManager 5664 5796 { -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
r222212 r223267 386 386 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(NSArray<NSValue *> *rects))completionHandler WK_API_AVAILABLE(ios(WK_IOS_TBA)); 387 387 388 #endif // TARGET_OS_IPHONE 389 390 #if !TARGET_OS_IPHONE 388 #else 389 - (void)_dismissContentRelativeChildWindows WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 390 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 391 - (void)_beginDeferringViewInWindowChanges WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 392 - (void)_endDeferringViewInWindowChanges WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 393 - (void)_endDeferringViewInWindowChangesSync WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 394 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 395 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 396 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 397 - (NSView *)_fullScreenPlaceholderView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 398 - (NSWindow *)_fullScreenWindow WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 399 - (void)_disableFrameSizeUpdates WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 400 - (void)_enableFrameSizeUpdates WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 401 - (void)_prepareForImmediateActionAnimation WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 402 - (void)_cancelImmediateActionAnimation WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 403 - (void)_completeImmediateActionAnimation WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 404 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 405 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 406 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 407 @property (nonatomic, setter=_setTotalHeightOfBanners:) CGFloat _totalHeightOfBanners WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 408 @property (nonatomic, copy, setter=_setUnderlayColor:) NSColor *_underlayColor; 409 @property (nonatomic, readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 391 410 @property (nonatomic, readonly) WKPageRef _pageRefForTransitionToWKWebView WK_API_AVAILABLE(macosx(WK_MAC_TBA)); 392 411 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macosx(10.12)); -
trunk/Source/WebKit/UIProcess/API/mac/WKView.mm
r222577 r223267 1246 1246 - (NSWindow *)createFullScreenWindow 1247 1247 { 1248 return _data->_impl-> createFullScreenWindow();1248 return _data->_impl->fullScreenWindow(); 1249 1249 } 1250 1250 -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
r222422 r223267 283 283 #endif 284 284 NSView *fullScreenPlaceholderView(); 285 NSWindow * createFullScreenWindow();285 NSWindow *fullScreenWindow(); 286 286 287 287 bool isEditable() const; -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
r222896 r223267 2433 2433 { 2434 2434 if (!m_fullScreenWindowController) 2435 m_fullScreenWindowController = adoptNS([[WKFullScreenWindowController alloc] initWithWindow: createFullScreenWindow() webView:m_view.getAutoreleased() page:m_page]);2435 m_fullScreenWindowController = adoptNS([[WKFullScreenWindowController alloc] initWithWindow:fullScreenWindow() webView:m_view.getAutoreleased() page:m_page]); 2436 2436 2437 2437 return m_fullScreenWindowController.get(); … … 2457 2457 } 2458 2458 2459 NSWindow *WebViewImpl:: createFullScreenWindow()2459 NSWindow *WebViewImpl::fullScreenWindow() 2460 2460 { 2461 2461 #if ENABLE(FULLSCREEN_API)
Note: See TracChangeset
for help on using the changeset viewer.