Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 21:15:06 +0000 (21:15 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 21:15:06 +0000 (21:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150174

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView dealloc]):
(-[WKWebView allowsLinkPreview]):
(-[WKWebView setAllowsLinkPreview:]):
(-[WKWebView acceptsFirstResponder]):
(-[WKWebView becomeFirstResponder]):
(-[WKWebView resignFirstResponder]):
(-[WKWebView viewWillStartLiveResize]):
(-[WKWebView viewDidEndLiveResize]):
(-[WKWebView isFlipped]):
(-[WKWebView intrinsicContentSize]):
(-[WKWebView prepareContentInRect:]):
(-[WKWebView setFrameSize:]):
(-[WKWebView renewGState]):
(-[WKWebView writeSelectionToPasteboard:types:]):
(-[WKWebView centerSelectionInVisibleArea:]):
(-[WKWebView validRequestorForSendType:returnType:]):
(-[WKWebView readSelectionFromPasteboard:]):
(-[WKWebView changeFont:]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView startSpeaking:]):
(-[WKWebView stopSpeaking:]):
(-[WKWebView showGuessPanel:]):
(-[WKWebView checkSpelling:]):
(-[WKWebView changeSpelling:]):
(-[WKWebView toggleContinuousSpellChecking:]):
(-[WKWebView isGrammarCheckingEnabled]):
(-[WKWebView setGrammarCheckingEnabled:]):
(-[WKWebView toggleGrammarChecking:]):
(-[WKWebView toggleAutomaticSpellingCorrection:]):
(-[WKWebView orderFrontSubstitutionsPanel:]):
(-[WKWebView toggleSmartInsertDelete:]):
(-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
(-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticQuoteSubstitution:]):
(-[WKWebView isAutomaticDashSubstitutionEnabled]):
(-[WKWebView setAutomaticDashSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticDashSubstitution:]):
(-[WKWebView isAutomaticLinkDetectionEnabled]):
(-[WKWebView setAutomaticLinkDetectionEnabled:]):
(-[WKWebView toggleAutomaticLinkDetection:]):
(-[WKWebView isAutomaticTextReplacementEnabled]):
(-[WKWebView setAutomaticTextReplacementEnabled:]):
(-[WKWebView toggleAutomaticTextReplacement:]):
(-[WKWebView uppercaseWord:]):
(-[WKWebView lowercaseWord:]):
(-[WKWebView capitalizeWord:]):
(-[WKWebView _wantsKeyDownForEvent:]):
(-[WKWebView scrollWheel:]):
(-[WKWebView swipeWithEvent:]):
(-[WKWebView mouseMoved:]):
(-[WKWebView mouseDown:]):
(-[WKWebView mouseUp:]):
(-[WKWebView mouseDragged:]):
(-[WKWebView mouseEntered:]):
(-[WKWebView mouseExited:]):
(-[WKWebView otherMouseDown:]):
(-[WKWebView otherMouseDragged:]):
(-[WKWebView otherMouseUp:]):
(-[WKWebView rightMouseDown:]):
(-[WKWebView rightMouseDragged:]):
(-[WKWebView rightMouseUp:]):
(-[WKWebView pressureChangeWithEvent:]):
(-[WKWebView acceptsFirstMouse:]):
(-[WKWebView shouldDelayWindowOrderingForEvent:]):
(-[WKWebView doCommandBySelector:]):
(-[WKWebView insertText:]):
(-[WKWebView insertText:replacementRange:]):
(-[WKWebView inputContext]):
(-[WKWebView performKeyEquivalent:]):
(-[WKWebView keyUp:]):
(-[WKWebView keyDown:]):
(-[WKWebView flagsChanged:]):
(-[WKWebView setMarkedText:selectedRange:replacementRange:]):
(-[WKWebView unmarkText]):
(-[WKWebView selectedRange]):
(-[WKWebView hasMarkedText]):
(-[WKWebView markedRange]):
(-[WKWebView attributedSubstringForProposedRange:actualRange:]):
(-[WKWebView characterIndexForPoint:]):
(-[WKWebView firstRectForCharacterRange:actualRange:]):
(-[WKWebView selectedRangeWithCompletionHandler:]):
(-[WKWebView markedRangeWithCompletionHandler:]):
(-[WKWebView hasMarkedTextWithCompletionHandler:]):
(-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
(-[WKWebView firstRectForCharacterRange:completionHandler:]):
(-[WKWebView characterIndexForPoint:completionHandler:]):
(-[WKWebView validAttributesForMarkedText]):
(-[WKWebView draggedImage:endedAt:operation:]):
(-[WKWebView draggingEntered:]):
(-[WKWebView draggingUpdated:]):
(-[WKWebView draggingExited:]):
(-[WKWebView prepareForDragOperation:]):
(-[WKWebView performDragOperation:]):
(-[WKWebView _hitTest:dragTypes:]):
(-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
(-[WKWebView viewWillMoveToWindow:]):
(-[WKWebView viewDidMoveToWindow]):
(-[WKWebView drawRect:]):
(-[WKWebView isOpaque]):
(-[WKWebView mouseDownCanMoveWindow]):
(-[WKWebView viewDidHide]):
(-[WKWebView viewDidUnhide]):
(-[WKWebView viewDidChangeBackingProperties]):
(-[WKWebView _activeSpaceDidChange:]):
(-[WKWebView accessibilityFocusedUIElement]):
(-[WKWebView accessibilityIsIgnored]):
(-[WKWebView accessibilityHitTest:]):
(-[WKWebView accessibilityAttributeValue:]):
(-[WKWebView hitTest:]):
(-[WKWebView conversationIdentifier]):
(-[WKWebView quickLookWithEvent:]):
(-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
(-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
(-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
(-[WKWebView removeTrackingRect:]):
(-[WKWebView _removeTrackingRects:count:]):
(-[WKWebView view:stringForToolTip:point:userData:]):
(-[WKWebView pasteboardChangedOwner:]):
(-[WKWebView pasteboard:provideDataForType:]):
(-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKWebView wantsUpdateLayer]):
(-[WKWebView updateLayer]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView allowsBackForwardNavigationGestures]):
(-[WKWebView smartMagnifyWithEvent:]):
(-[WKWebView setMagnification:centeredAtPoint:]):
(-[WKWebView setMagnification:]):
(-[WKWebView magnification]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView allowsMagnification]):
(-[WKWebView magnifyWithEvent:]):
(-[WKWebView rotateWithEvent:]):
(-[WKWebView _web_superInputContext]):
(-[WKWebView _web_superQuickLookWithEvent:]):
(-[WKWebView _web_superSwipeWithEvent:]):
(-[WKWebView _web_superMagnifyWithEvent:]):
(-[WKWebView _web_superSmartMagnifyWithEvent:]):
(-[WKWebView _web_superRemoveTrackingRect:]):
(-[WKWebView _web_superAccessibilityAttributeValue:]):
(-[WKWebView _web_superDoCommandBySelector:]):
(-[WKWebView _web_superPerformKeyEquivalent:]):
(-[WKWebView _web_superKeyDown:]):
(-[WKWebView _web_superHitTest:]):
(-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKWebView _web_prepareForImmediateActionAnimation]):
(-[WKWebView _web_cancelImmediateActionAnimation]):
(-[WKWebView _web_completeImmediateActionAnimation]):
(-[WKWebView _web_didChangeContentSize:]):
(-[WKWebView _web_dismissContentRelativeChildWindows]):
(-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKWebView _setEditable:]):
(-[WKWebView _remoteObjectRegistry]):
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
(-[WKWebView _inspectorAttachmentView]):
(-[WKWebView _setInspectorAttachmentView:]):
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
(-[WKWebView _setOverrideDeviceScaleFactor:]):
(-[WKWebView _overrideDeviceScaleFactor]):
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
(-[WKWebView _setMinimumLayoutWidth:]):
(-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
(-[WKWebView _ignoresNonWheelEvents]): Deleted.
(-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
(-[WKWebView _setIntrinsicContentSize:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _web_superInputContext]):
(-[WKView _web_superQuickLookWithEvent:]):
(-[WKView _web_superSwipeWithEvent:]):
(-[WKView _web_superMagnifyWithEvent:]):
(-[WKView _web_superSmartMagnifyWithEvent:]):
(-[WKView _web_superRemoveTrackingRect:]):
(-[WKView _web_superAccessibilityAttributeValue:]):
(-[WKView _web_superDoCommandBySelector:]):
(-[WKView _web_superPerformKeyEquivalent:]):
(-[WKView _web_superKeyDown:]):
(-[WKView _web_superHitTest:]):
(-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKView _web_prepareForImmediateActionAnimation]):
(-[WKView _web_cancelImmediateActionAnimation]):
(-[WKView _web_completeImmediateActionAnimation]):
(-[WKView _web_didChangeContentSize:]):
(-[WKView _web_dismissContentRelativeChildWindows]):
(-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKView _superInputContext]): Deleted.
(-[WKView _superQuickLookWithEvent:]): Deleted.
(-[WKView _superSwipeWithEvent:]): Deleted.
(-[WKView _superMagnifyWithEvent:]): Deleted.
(-[WKView _superSmartMagnifyWithEvent:]): Deleted.
(-[WKView _superRemoveTrackingRect:]): Deleted.
(-[WKView _superAccessibilityAttributeValue:]): Deleted.
(-[WKView _superDoCommandBySelector:]): Deleted.
(-[WKView _superPerformKeyEquivalent:]): Deleted.
(-[WKView _superKeyDown:]): Deleted.
(-[WKView _superHitTest:]): Deleted.
(-[WKView _addFontPanelObserver]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::hitTest):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::WebViewImpl::executeSavedCommandBySelector):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::prepareForImmediateActionAnimation):
(WebKit::WebViewImpl::cancelImmediateActionAnimation):
(WebKit::WebViewImpl::completeImmediateActionAnimation):
(WebKit::WebViewImpl::didChangeContentSize):
(WebKit::WebViewImpl::accessibilityAttributeValue):
(WebKit::WebViewImpl::removeTrackingRect):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyDown):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
Plop.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Revert some parts of r188828 which no longer apply.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/mac/PageClientImpl.mm
Tools/ChangeLog
Tools/WebKitTestRunner/mac/EventSenderProxy.mm

index a20c4a5..30195f6 100644 (file)
@@ -1,3 +1,250 @@
+2015-11-02  Tim Horton  <timothy_horton@apple.com>
+
+        Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
+        https://bugs.webkit.org/show_bug.cgi?id=150174
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]):
+        (-[WKWebView dealloc]):
+        (-[WKWebView allowsLinkPreview]):
+        (-[WKWebView setAllowsLinkPreview:]):
+        (-[WKWebView acceptsFirstResponder]):
+        (-[WKWebView becomeFirstResponder]):
+        (-[WKWebView resignFirstResponder]):
+        (-[WKWebView viewWillStartLiveResize]):
+        (-[WKWebView viewDidEndLiveResize]):
+        (-[WKWebView isFlipped]):
+        (-[WKWebView intrinsicContentSize]):
+        (-[WKWebView prepareContentInRect:]):
+        (-[WKWebView setFrameSize:]):
+        (-[WKWebView renewGState]):
+        (-[WKWebView writeSelectionToPasteboard:types:]):
+        (-[WKWebView centerSelectionInVisibleArea:]):
+        (-[WKWebView validRequestorForSendType:returnType:]):
+        (-[WKWebView readSelectionFromPasteboard:]):
+        (-[WKWebView changeFont:]):
+        (-[WKWebView validateUserInterfaceItem:]):
+        (-[WKWebView startSpeaking:]):
+        (-[WKWebView stopSpeaking:]):
+        (-[WKWebView showGuessPanel:]):
+        (-[WKWebView checkSpelling:]):
+        (-[WKWebView changeSpelling:]):
+        (-[WKWebView toggleContinuousSpellChecking:]):
+        (-[WKWebView isGrammarCheckingEnabled]):
+        (-[WKWebView setGrammarCheckingEnabled:]):
+        (-[WKWebView toggleGrammarChecking:]):
+        (-[WKWebView toggleAutomaticSpellingCorrection:]):
+        (-[WKWebView orderFrontSubstitutionsPanel:]):
+        (-[WKWebView toggleSmartInsertDelete:]):
+        (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
+        (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
+        (-[WKWebView toggleAutomaticQuoteSubstitution:]):
+        (-[WKWebView isAutomaticDashSubstitutionEnabled]):
+        (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
+        (-[WKWebView toggleAutomaticDashSubstitution:]):
+        (-[WKWebView isAutomaticLinkDetectionEnabled]):
+        (-[WKWebView setAutomaticLinkDetectionEnabled:]):
+        (-[WKWebView toggleAutomaticLinkDetection:]):
+        (-[WKWebView isAutomaticTextReplacementEnabled]):
+        (-[WKWebView setAutomaticTextReplacementEnabled:]):
+        (-[WKWebView toggleAutomaticTextReplacement:]):
+        (-[WKWebView uppercaseWord:]):
+        (-[WKWebView lowercaseWord:]):
+        (-[WKWebView capitalizeWord:]):
+        (-[WKWebView _wantsKeyDownForEvent:]):
+        (-[WKWebView scrollWheel:]):
+        (-[WKWebView swipeWithEvent:]):
+        (-[WKWebView mouseMoved:]):
+        (-[WKWebView mouseDown:]):
+        (-[WKWebView mouseUp:]):
+        (-[WKWebView mouseDragged:]):
+        (-[WKWebView mouseEntered:]):
+        (-[WKWebView mouseExited:]):
+        (-[WKWebView otherMouseDown:]):
+        (-[WKWebView otherMouseDragged:]):
+        (-[WKWebView otherMouseUp:]):
+        (-[WKWebView rightMouseDown:]):
+        (-[WKWebView rightMouseDragged:]):
+        (-[WKWebView rightMouseUp:]):
+        (-[WKWebView pressureChangeWithEvent:]):
+        (-[WKWebView acceptsFirstMouse:]):
+        (-[WKWebView shouldDelayWindowOrderingForEvent:]):
+        (-[WKWebView doCommandBySelector:]):
+        (-[WKWebView insertText:]):
+        (-[WKWebView insertText:replacementRange:]):
+        (-[WKWebView inputContext]):
+        (-[WKWebView performKeyEquivalent:]):
+        (-[WKWebView keyUp:]):
+        (-[WKWebView keyDown:]):
+        (-[WKWebView flagsChanged:]):
+        (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
+        (-[WKWebView unmarkText]):
+        (-[WKWebView selectedRange]):
+        (-[WKWebView hasMarkedText]):
+        (-[WKWebView markedRange]):
+        (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
+        (-[WKWebView characterIndexForPoint:]):
+        (-[WKWebView firstRectForCharacterRange:actualRange:]):
+        (-[WKWebView selectedRangeWithCompletionHandler:]):
+        (-[WKWebView markedRangeWithCompletionHandler:]):
+        (-[WKWebView hasMarkedTextWithCompletionHandler:]):
+        (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
+        (-[WKWebView firstRectForCharacterRange:completionHandler:]):
+        (-[WKWebView characterIndexForPoint:completionHandler:]):
+        (-[WKWebView validAttributesForMarkedText]):
+        (-[WKWebView draggedImage:endedAt:operation:]):
+        (-[WKWebView draggingEntered:]):
+        (-[WKWebView draggingUpdated:]):
+        (-[WKWebView draggingExited:]):
+        (-[WKWebView prepareForDragOperation:]):
+        (-[WKWebView performDragOperation:]):
+        (-[WKWebView _hitTest:dragTypes:]):
+        (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
+        (-[WKWebView viewWillMoveToWindow:]):
+        (-[WKWebView viewDidMoveToWindow]):
+        (-[WKWebView drawRect:]):
+        (-[WKWebView isOpaque]):
+        (-[WKWebView mouseDownCanMoveWindow]):
+        (-[WKWebView viewDidHide]):
+        (-[WKWebView viewDidUnhide]):
+        (-[WKWebView viewDidChangeBackingProperties]):
+        (-[WKWebView _activeSpaceDidChange:]):
+        (-[WKWebView accessibilityFocusedUIElement]):
+        (-[WKWebView accessibilityIsIgnored]):
+        (-[WKWebView accessibilityHitTest:]):
+        (-[WKWebView accessibilityAttributeValue:]):
+        (-[WKWebView hitTest:]):
+        (-[WKWebView conversationIdentifier]):
+        (-[WKWebView quickLookWithEvent:]):
+        (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
+        (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
+        (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
+        (-[WKWebView removeTrackingRect:]):
+        (-[WKWebView _removeTrackingRects:count:]):
+        (-[WKWebView view:stringForToolTip:point:userData:]):
+        (-[WKWebView pasteboardChangedOwner:]):
+        (-[WKWebView pasteboard:provideDataForType:]):
+        (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
+        (-[WKWebView wantsUpdateLayer]):
+        (-[WKWebView updateLayer]):
+        (-[WKWebView setAllowsBackForwardNavigationGestures:]):
+        (-[WKWebView allowsBackForwardNavigationGestures]):
+        (-[WKWebView smartMagnifyWithEvent:]):
+        (-[WKWebView setMagnification:centeredAtPoint:]):
+        (-[WKWebView setMagnification:]):
+        (-[WKWebView magnification]):
+        (-[WKWebView setAllowsMagnification:]):
+        (-[WKWebView allowsMagnification]):
+        (-[WKWebView magnifyWithEvent:]):
+        (-[WKWebView rotateWithEvent:]):
+        (-[WKWebView _web_superInputContext]):
+        (-[WKWebView _web_superQuickLookWithEvent:]):
+        (-[WKWebView _web_superSwipeWithEvent:]):
+        (-[WKWebView _web_superMagnifyWithEvent:]):
+        (-[WKWebView _web_superSmartMagnifyWithEvent:]):
+        (-[WKWebView _web_superRemoveTrackingRect:]):
+        (-[WKWebView _web_superAccessibilityAttributeValue:]):
+        (-[WKWebView _web_superDoCommandBySelector:]):
+        (-[WKWebView _web_superPerformKeyEquivalent:]):
+        (-[WKWebView _web_superKeyDown:]):
+        (-[WKWebView _web_superHitTest:]):
+        (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
+        (-[WKWebView _web_prepareForImmediateActionAnimation]):
+        (-[WKWebView _web_cancelImmediateActionAnimation]):
+        (-[WKWebView _web_completeImmediateActionAnimation]):
+        (-[WKWebView _web_didChangeContentSize:]):
+        (-[WKWebView _web_dismissContentRelativeChildWindows]):
+        (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
+        (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
+        (-[WKWebView _setEditable:]):
+        (-[WKWebView _remoteObjectRegistry]):
+        (-[WKWebView _layoutMode]):
+        (-[WKWebView _setLayoutMode:]):
+        (-[WKWebView _setViewScale:]):
+        (-[WKWebView _drawsTransparentBackground]):
+        (-[WKWebView _setDrawsTransparentBackground:]):
+        (-[WKWebView _inspectorAttachmentView]):
+        (-[WKWebView _setInspectorAttachmentView:]):
+        (-[WKWebView _windowOcclusionDetectionEnabled]):
+        (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
+        (-[WKWebView _setOverrideDeviceScaleFactor:]):
+        (-[WKWebView _overrideDeviceScaleFactor]):
+        (-[WKWebView _setTopContentInset:]):
+        (-[WKWebView _topContentInset]):
+        (-[WKWebView _pageExtendedBackgroundColor]):
+        (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
+        (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
+        (-[WKWebView _automaticallyAdjustsContentInsets]):
+        (-[WKWebView _setMinimumLayoutWidth:]):
+        (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
+        (-[WKWebView _ignoresNonWheelEvents]): Deleted.
+        (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
+        (-[WKWebView _setIntrinsicContentSize:]): Deleted.
+        * UIProcess/API/Cocoa/WKWebViewInternal.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _web_superInputContext]):
+        (-[WKView _web_superQuickLookWithEvent:]):
+        (-[WKView _web_superSwipeWithEvent:]):
+        (-[WKView _web_superMagnifyWithEvent:]):
+        (-[WKView _web_superSmartMagnifyWithEvent:]):
+        (-[WKView _web_superRemoveTrackingRect:]):
+        (-[WKView _web_superAccessibilityAttributeValue:]):
+        (-[WKView _web_superDoCommandBySelector:]):
+        (-[WKView _web_superPerformKeyEquivalent:]):
+        (-[WKView _web_superKeyDown:]):
+        (-[WKView _web_superHitTest:]):
+        (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
+        (-[WKView _web_prepareForImmediateActionAnimation]):
+        (-[WKView _web_cancelImmediateActionAnimation]):
+        (-[WKView _web_completeImmediateActionAnimation]):
+        (-[WKView _web_didChangeContentSize:]):
+        (-[WKView _web_dismissContentRelativeChildWindows]):
+        (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
+        (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
+        (-[WKView _superInputContext]): Deleted.
+        (-[WKView _superQuickLookWithEvent:]): Deleted.
+        (-[WKView _superSwipeWithEvent:]): Deleted.
+        (-[WKView _superMagnifyWithEvent:]): Deleted.
+        (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
+        (-[WKView _superRemoveTrackingRect:]): Deleted.
+        (-[WKView _superAccessibilityAttributeValue:]): Deleted.
+        (-[WKView _superDoCommandBySelector:]): Deleted.
+        (-[WKView _superPerformKeyEquivalent:]): Deleted.
+        (-[WKView _superKeyDown:]): Deleted.
+        (-[WKView _superHitTest:]): Deleted.
+        (-[WKView _addFontPanelObserver]): Deleted.
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::hitTest):
+        (WebKit::WebViewImpl::updateSecureInputState):
+        (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
+        (WebKit::WebViewImpl::executeSavedCommandBySelector):
+        (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
+        (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
+        (WebKit::WebViewImpl::quickLookWithEvent):
+        (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
+        (WebKit::WebViewImpl::cancelImmediateActionAnimation):
+        (WebKit::WebViewImpl::completeImmediateActionAnimation):
+        (WebKit::WebViewImpl::didChangeContentSize):
+        (WebKit::WebViewImpl::accessibilityAttributeValue):
+        (WebKit::WebViewImpl::removeTrackingRect):
+        (WebKit::WebViewImpl::swipeWithEvent):
+        (WebKit::WebViewImpl::magnifyWithEvent):
+        (WebKit::WebViewImpl::smartMagnifyWithEvent):
+        (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
+        (WebKit::WebViewImpl::doCommandBySelector):
+        (WebKit::WebViewImpl::inputContext):
+        (WebKit::WebViewImpl::performKeyEquivalent):
+        (WebKit::WebViewImpl::keyDown):
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::setDragImage):
+        (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
+        (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
+        Plop.
+
 2015-11-02  Anders Carlsson  <andersca@apple.com>
 
         Remove unused API client callback code
index 18de9bc..6da4e32 100644 (file)
 #import "WebPreferencesKeys.h"
 #import "WebProcessPool.h"
 #import "WebProcessProxy.h"
+#import "WebViewImpl.h"
 #import "_WKDiagnosticLoggingDelegate.h"
 #import "_WKFindDelegate.h"
 #import "_WKFormDelegate.h"
+#import "_WKHitTestResultInternal.h"
 #import "_WKInputDelegate.h"
 #import "_WKRemoteObjectRegistryInternal.h"
 #import "_WKSessionStateInternal.h"
@@ -144,6 +146,9 @@ enum class DynamicViewportUpdateMode {
 #if PLATFORM(MAC)
 #import "WKViewInternal.h"
 #import <WebCore/ColorMac.h>
+
+@interface WKWebView () <WebViewImplDelegate>
+@end
 #endif
 
 static HashMap<WebKit::WebPageProxy*, WKWebView *>& pageToViewMap()
@@ -161,12 +166,13 @@ WKWebView* fromWebPageProxy(WebKit::WebPageProxy& page)
     std::unique_ptr<WebKit::NavigationState> _navigationState;
     std::unique_ptr<WebKit::UIDelegate> _uiDelegate;
 
-    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
     _WKRenderingProgressEvents _observedRenderingProgressEvents;
 
     WebKit::WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate;
 
 #if PLATFORM(IOS)
+    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
+
     RetainPtr<WKScrollView> _scrollView;
     RetainPtr<WKContentView> _contentView;
 
@@ -228,8 +234,7 @@ WKWebView* fromWebPageProxy(WebKit::WebPageProxy& page)
     Vector<std::function<void ()>> _snapshotsDeferredDuringResize;
 #endif
 #if PLATFORM(MAC)
-    RetainPtr<WKView> _wkView;
-    CGSize _intrinsicContentSize;
+    std::unique_ptr<WebKit::WebViewImpl> _impl;
 #endif
 }
 
@@ -308,7 +313,6 @@ static bool shouldAllowPictureInPictureMediaPlayback()
 
     [_configuration _validate];
 
-    CGRect bounds = self.bounds;
 
     WebKit::WebProcessPool& processPool = *[_configuration processPool]->_processPool;
     
@@ -347,6 +351,7 @@ static bool shouldAllowPictureInPictureMediaPlayback()
 #endif
 
 #if PLATFORM(IOS)
+    CGRect bounds = self.bounds;
     _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]);
     [_scrollView setInternalDelegate:self];
     [_scrollView setBouncesZoom:YES];
@@ -383,14 +388,11 @@ static bool shouldAllowPictureInPictureMediaPlayback()
 #endif
 
 #if PLATFORM(MAC)
-    _wkView = adoptNS([[WKView alloc] initWithFrame:bounds processPool:processPool configuration:WTF::move(pageConfiguration) webView:self]);
-    [self addSubview:_wkView.get()];
-    _page = WebKit::toImpl([_wkView pageRef]);
-
-    _intrinsicContentSize = CGSizeMake(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
+    _impl = std::make_unique<WebKit::WebViewImpl>(self, self, processPool, WTF::move(pageConfiguration));
+    _page = &_impl->page();
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
-    [_wkView _setAutomaticallyAdjustsContentInsets:YES];
+    _impl->setAutomaticallyAdjustsContentInsets(true);
 #endif
 #endif
 
@@ -417,13 +419,13 @@ static bool shouldAllowPictureInPictureMediaPlayback()
 
 - (void)dealloc
 {
+#if PLATFORM(IOS)
     if (_remoteObjectRegistry)
         _page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID());
 
     _page->close();
 
     [_remoteObjectRegistry _invalidate];
-#if PLATFORM(IOS)
     [[_configuration _contentProviderRegistry] removePage:*_page];
     [[NSNotificationCenter defaultCenter] removeObserver:self];
     [_scrollView setInternalDelegate:nil];
@@ -697,7 +699,7 @@ static WKErrorCode callbackErrorCode(WebKit::CallbackBase::Error error)
 - (BOOL)allowsLinkPreview
 {
 #if PLATFORM(MAC)
-    return [_wkView allowsLinkPreview];
+    return _impl->allowsLinkPreview();
 #elif PLATFORM(IOS)
     return _allowsLinkPreview;
 #endif
@@ -706,7 +708,7 @@ static WKErrorCode callbackErrorCode(WebKit::CallbackBase::Error error)
 - (void)setAllowsLinkPreview:(BOOL)allowsLinkPreview
 {
 #if PLATFORM(MAC)
-    [_wkView setAllowsLinkPreview:allowsLinkPreview];
+    _impl->setAllowsLinkPreview(allowsLinkPreview);
     return;
 #elif PLATFORM(IOS)
     if (_allowsLinkPreview == allowsLinkPreview)
@@ -1877,108 +1879,870 @@ static WebCore::FloatPoint constrainContentOffset(WebCore::FloatPoint contentOff
 
 #if PLATFORM(MAC)
 
+- (BOOL)acceptsFirstResponder
+{
+    return _impl->acceptsFirstResponder();
+}
+
 - (BOOL)becomeFirstResponder
 {
-    return [[self window] makeFirstResponder: _wkView.get()];
+    return _impl->becomeFirstResponder();
 }
 
-- (BOOL)acceptsFirstResponder
+- (BOOL)resignFirstResponder
+{
+    return _impl->resignFirstResponder();
+}
+
+- (void)viewWillStartLiveResize
+{
+    _impl->viewWillStartLiveResize();
+}
+
+- (void)viewDidEndLiveResize
+{
+    _impl->viewDidEndLiveResize();
+}
+
+- (BOOL)isFlipped
+{
+    return YES;
+}
+
+- (NSSize)intrinsicContentSize
+{
+    return NSSizeFromCGSize(_impl->intrinsicContentSize());
+}
+
+- (void)prepareContentInRect:(NSRect)rect
+{
+    _impl->prepareContentInRect(NSRectToCGRect(rect));
+}
+
+- (void)setFrameSize:(NSSize)size
+{
+    [super setFrameSize:size];
+    _impl->setFrameSize(NSSizeToCGSize(size));
+}
+
+- (void)renewGState
+{
+    _impl->renewGState();
+    [super renewGState];
+}
+
+#define WEBCORE_COMMAND(command) - (void)command:(id)sender { _impl->executeEditCommandForSelector(_cmd); }
+
+WEBCORE_COMMAND(alignCenter)
+WEBCORE_COMMAND(alignJustified)
+WEBCORE_COMMAND(alignLeft)
+WEBCORE_COMMAND(alignRight)
+WEBCORE_COMMAND(copy)
+WEBCORE_COMMAND(cut)
+WEBCORE_COMMAND(delete)
+WEBCORE_COMMAND(deleteBackward)
+WEBCORE_COMMAND(deleteBackwardByDecomposingPreviousCharacter)
+WEBCORE_COMMAND(deleteForward)
+WEBCORE_COMMAND(deleteToBeginningOfLine)
+WEBCORE_COMMAND(deleteToBeginningOfParagraph)
+WEBCORE_COMMAND(deleteToEndOfLine)
+WEBCORE_COMMAND(deleteToEndOfParagraph)
+WEBCORE_COMMAND(deleteToMark)
+WEBCORE_COMMAND(deleteWordBackward)
+WEBCORE_COMMAND(deleteWordForward)
+WEBCORE_COMMAND(ignoreSpelling)
+WEBCORE_COMMAND(indent)
+WEBCORE_COMMAND(insertBacktab)
+WEBCORE_COMMAND(insertLineBreak)
+WEBCORE_COMMAND(insertNewline)
+WEBCORE_COMMAND(insertNewlineIgnoringFieldEditor)
+WEBCORE_COMMAND(insertParagraphSeparator)
+WEBCORE_COMMAND(insertTab)
+WEBCORE_COMMAND(insertTabIgnoringFieldEditor)
+WEBCORE_COMMAND(makeTextWritingDirectionLeftToRight)
+WEBCORE_COMMAND(makeTextWritingDirectionNatural)
+WEBCORE_COMMAND(makeTextWritingDirectionRightToLeft)
+WEBCORE_COMMAND(moveBackward)
+WEBCORE_COMMAND(moveBackwardAndModifySelection)
+WEBCORE_COMMAND(moveDown)
+WEBCORE_COMMAND(moveDownAndModifySelection)
+WEBCORE_COMMAND(moveForward)
+WEBCORE_COMMAND(moveForwardAndModifySelection)
+WEBCORE_COMMAND(moveLeft)
+WEBCORE_COMMAND(moveLeftAndModifySelection)
+WEBCORE_COMMAND(moveParagraphBackwardAndModifySelection)
+WEBCORE_COMMAND(moveParagraphForwardAndModifySelection)
+WEBCORE_COMMAND(moveRight)
+WEBCORE_COMMAND(moveRightAndModifySelection)
+WEBCORE_COMMAND(moveToBeginningOfDocument)
+WEBCORE_COMMAND(moveToBeginningOfDocumentAndModifySelection)
+WEBCORE_COMMAND(moveToBeginningOfLine)
+WEBCORE_COMMAND(moveToBeginningOfLineAndModifySelection)
+WEBCORE_COMMAND(moveToBeginningOfParagraph)
+WEBCORE_COMMAND(moveToBeginningOfParagraphAndModifySelection)
+WEBCORE_COMMAND(moveToBeginningOfSentence)
+WEBCORE_COMMAND(moveToBeginningOfSentenceAndModifySelection)
+WEBCORE_COMMAND(moveToEndOfDocument)
+WEBCORE_COMMAND(moveToEndOfDocumentAndModifySelection)
+WEBCORE_COMMAND(moveToEndOfLine)
+WEBCORE_COMMAND(moveToEndOfLineAndModifySelection)
+WEBCORE_COMMAND(moveToEndOfParagraph)
+WEBCORE_COMMAND(moveToEndOfParagraphAndModifySelection)
+WEBCORE_COMMAND(moveToEndOfSentence)
+WEBCORE_COMMAND(moveToEndOfSentenceAndModifySelection)
+WEBCORE_COMMAND(moveToLeftEndOfLine)
+WEBCORE_COMMAND(moveToLeftEndOfLineAndModifySelection)
+WEBCORE_COMMAND(moveToRightEndOfLine)
+WEBCORE_COMMAND(moveToRightEndOfLineAndModifySelection)
+WEBCORE_COMMAND(moveUp)
+WEBCORE_COMMAND(moveUpAndModifySelection)
+WEBCORE_COMMAND(moveWordBackward)
+WEBCORE_COMMAND(moveWordBackwardAndModifySelection)
+WEBCORE_COMMAND(moveWordForward)
+WEBCORE_COMMAND(moveWordForwardAndModifySelection)
+WEBCORE_COMMAND(moveWordLeft)
+WEBCORE_COMMAND(moveWordLeftAndModifySelection)
+WEBCORE_COMMAND(moveWordRight)
+WEBCORE_COMMAND(moveWordRightAndModifySelection)
+WEBCORE_COMMAND(outdent)
+WEBCORE_COMMAND(pageDown)
+WEBCORE_COMMAND(pageDownAndModifySelection)
+WEBCORE_COMMAND(pageUp)
+WEBCORE_COMMAND(pageUpAndModifySelection)
+WEBCORE_COMMAND(paste)
+WEBCORE_COMMAND(pasteAsPlainText)
+WEBCORE_COMMAND(scrollPageDown)
+WEBCORE_COMMAND(scrollPageUp)
+WEBCORE_COMMAND(scrollLineDown)
+WEBCORE_COMMAND(scrollLineUp)
+WEBCORE_COMMAND(scrollToBeginningOfDocument)
+WEBCORE_COMMAND(scrollToEndOfDocument)
+WEBCORE_COMMAND(selectAll)
+WEBCORE_COMMAND(selectLine)
+WEBCORE_COMMAND(selectParagraph)
+WEBCORE_COMMAND(selectSentence)
+WEBCORE_COMMAND(selectToMark)
+WEBCORE_COMMAND(selectWord)
+WEBCORE_COMMAND(setMark)
+WEBCORE_COMMAND(subscript)
+WEBCORE_COMMAND(superscript)
+WEBCORE_COMMAND(swapWithMark)
+WEBCORE_COMMAND(takeFindStringFromSelection)
+WEBCORE_COMMAND(transpose)
+WEBCORE_COMMAND(underline)
+WEBCORE_COMMAND(unscript)
+WEBCORE_COMMAND(yank)
+WEBCORE_COMMAND(yankAndSelect)
+
+#undef WEBCORE_COMMAND
+
+- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pasteboard types:(NSArray *)types
+{
+    return _impl->writeSelectionToPasteboard(pasteboard, types);
+}
+
+- (void)centerSelectionInVisibleArea:(id)sender
+{
+    _impl->centerSelectionInVisibleArea();
+}
+
+- (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType
+{
+    return _impl->validRequestorForSendAndReturnTypes(sendType, returnType);
+}
+
+- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard
+{
+    return _impl->readSelectionFromPasteboard(pasteboard);
+}
+
+- (void)changeFont:(id)sender
+{
+    _impl->changeFontFromFontPanel();
+}
+
+- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
+{
+    return _impl->validateUserInterfaceItem(item);
+}
+
+- (IBAction)startSpeaking:(id)sender
+{
+    _impl->startSpeaking();
+}
+
+- (IBAction)stopSpeaking:(id)sender
+{
+    _impl->stopSpeaking(sender);
+}
+
+- (IBAction)showGuessPanel:(id)sender
+{
+    _impl->showGuessPanel(sender);
+}
+
+- (IBAction)checkSpelling:(id)sender
+{
+    _impl->checkSpelling();
+}
+
+- (void)changeSpelling:(id)sender
+{
+    _impl->changeSpelling(sender);
+}
+
+- (IBAction)toggleContinuousSpellChecking:(id)sender
+{
+    _impl->toggleContinuousSpellChecking();
+}
+
+- (BOOL)isGrammarCheckingEnabled
+{
+    return _impl->isGrammarCheckingEnabled();
+}
+
+- (void)setGrammarCheckingEnabled:(BOOL)flag
+{
+    _impl->setGrammarCheckingEnabled(flag);
+}
+
+- (IBAction)toggleGrammarChecking:(id)sender
+{
+    _impl->toggleGrammarChecking();
+}
+
+- (IBAction)toggleAutomaticSpellingCorrection:(id)sender
+{
+    _impl->toggleAutomaticSpellingCorrection();
+}
+
+- (void)orderFrontSubstitutionsPanel:(id)sender
+{
+    _impl->orderFrontSubstitutionsPanel(sender);
+}
+
+- (IBAction)toggleSmartInsertDelete:(id)sender
+{
+    _impl->toggleSmartInsertDelete();
+}
+
+- (BOOL)isAutomaticQuoteSubstitutionEnabled
+{
+    return _impl->isAutomaticQuoteSubstitutionEnabled();
+}
+
+- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag
+{
+    _impl->setAutomaticQuoteSubstitutionEnabled(flag);
+}
+
+- (void)toggleAutomaticQuoteSubstitution:(id)sender
+{
+    _impl->toggleAutomaticQuoteSubstitution();
+}
+
+- (BOOL)isAutomaticDashSubstitutionEnabled
+{
+    return _impl->isAutomaticDashSubstitutionEnabled();
+}
+
+- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag
+{
+    _impl->setAutomaticDashSubstitutionEnabled(flag);
+}
+
+- (void)toggleAutomaticDashSubstitution:(id)sender
+{
+    _impl->toggleAutomaticDashSubstitution();
+}
+
+- (BOOL)isAutomaticLinkDetectionEnabled
+{
+    return _impl->isAutomaticLinkDetectionEnabled();
+}
+
+- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag
+{
+    _impl->setAutomaticLinkDetectionEnabled(flag);
+}
+
+- (void)toggleAutomaticLinkDetection:(id)sender
+{
+    _impl->toggleAutomaticLinkDetection();
+}
+
+- (BOOL)isAutomaticTextReplacementEnabled
+{
+    return _impl->isAutomaticTextReplacementEnabled();
+}
+
+- (void)setAutomaticTextReplacementEnabled:(BOOL)flag
+{
+    _impl->setAutomaticTextReplacementEnabled(flag);
+}
+
+- (void)toggleAutomaticTextReplacement:(id)sender
+{
+    _impl->toggleAutomaticTextReplacement();
+}
+
+- (void)uppercaseWord:(id)sender
+{
+    _impl->uppercaseWord();
+}
+
+- (void)lowercaseWord:(id)sender
+{
+    _impl->lowercaseWord();
+}
+
+- (void)capitalizeWord:(id)sender
+{
+    _impl->capitalizeWord();
+}
+
+- (BOOL)_wantsKeyDownForEvent:(NSEvent *)event
+{
+    return _impl->wantsKeyDownForEvent(event);
+}
+
+- (void)scrollWheel:(NSEvent *)event
+{
+    _impl->scrollWheel(event);
+}
+
+- (void)swipeWithEvent:(NSEvent *)event
+{
+    _impl->swipeWithEvent(event);
+}
+
+- (void)mouseMoved:(NSEvent *)event
+{
+    _impl->mouseMoved(event);
+}
+
+- (void)mouseDown:(NSEvent *)event
+{
+    _impl->mouseDown(event);
+}
+
+- (void)mouseUp:(NSEvent *)event
+{
+    _impl->mouseUp(event);
+}
+
+- (void)mouseDragged:(NSEvent *)event
+{
+    _impl->mouseDragged(event);
+}
+
+- (void)mouseEntered:(NSEvent *)event
+{
+    _impl->mouseEntered(event);
+}
+
+- (void)mouseExited:(NSEvent *)event
+{
+    _impl->mouseExited(event);
+}
+
+- (void)otherMouseDown:(NSEvent *)event
+{
+    _impl->otherMouseDown(event);
+}
+
+- (void)otherMouseDragged:(NSEvent *)event
+{
+    _impl->otherMouseDragged(event);
+}
+
+- (void)otherMouseUp:(NSEvent *)event
+{
+    _impl->otherMouseUp(event);
+}
+
+- (void)rightMouseDown:(NSEvent *)event
+{
+    _impl->rightMouseDown(event);
+}
+
+- (void)rightMouseDragged:(NSEvent *)event
+{
+    _impl->rightMouseDragged(event);
+}
+
+- (void)rightMouseUp:(NSEvent *)event
+{
+    _impl->rightMouseUp(event);
+}
+
+- (void)pressureChangeWithEvent:(NSEvent *)event
+{
+    _impl->pressureChangeWithEvent(event);
+}
+
+- (BOOL)acceptsFirstMouse:(NSEvent *)event
+{
+    return _impl->acceptsFirstMouse(event);
+}
+
+- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)event
+{
+    return _impl->shouldDelayWindowOrderingForEvent(event);
+}
+
+- (void)doCommandBySelector:(SEL)selector
+{
+    _impl->doCommandBySelector(selector);
+}
+
+- (void)insertText:(id)string
+{
+    _impl->insertText(string);
+}
+
+- (void)insertText:(id)string replacementRange:(NSRange)replacementRange
+{
+    _impl->insertText(string, replacementRange);
+}
+
+- (NSTextInputContext *)inputContext
+{
+    return _impl->inputContext();
+}
+
+- (BOOL)performKeyEquivalent:(NSEvent *)event
+{
+    return _impl->performKeyEquivalent(event);
+}
+
+- (void)keyUp:(NSEvent *)theEvent
+{
+    _impl->keyUp(theEvent);
+}
+
+- (void)keyDown:(NSEvent *)theEvent
+{
+    _impl->keyDown(theEvent);
+}
+
+- (void)flagsChanged:(NSEvent *)theEvent
+{
+    _impl->flagsChanged(theEvent);
+}
+
+- (void)setMarkedText:(id)string selectedRange:(NSRange)newSelectedRange replacementRange:(NSRange)replacementRange
+{
+    _impl->setMarkedText(string, newSelectedRange, replacementRange);
+}
+
+- (void)unmarkText
+{
+    _impl->unmarkText();
+}
+
+- (NSRange)selectedRange
+{
+    return _impl->selectedRange();
+}
+
+- (BOOL)hasMarkedText
+{
+    return _impl->hasMarkedText();
+}
+
+- (NSRange)markedRange
+{
+    return _impl->markedRange();
+}
+
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)nsRange actualRange:(NSRangePointer)actualRange
+{
+    return _impl->attributedSubstringForProposedRange(nsRange, actualRange);
+}
+
+- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
+{
+    return _impl->characterIndexForPoint(thePoint);
+}
+
+- (NSRect)firstRectForCharacterRange:(NSRange)theRange actualRange:(NSRangePointer)actualRange
+{
+    return _impl->firstRectForCharacterRange(theRange, actualRange);
+}
+
+#if USE(ASYNC_NSTEXTINPUTCLIENT)
+
+- (void)selectedRangeWithCompletionHandler:(void(^)(NSRange selectedRange))completionHandlerPtr
+{
+    _impl->selectedRangeWithCompletionHandler(completionHandlerPtr);
+}
+
+- (void)markedRangeWithCompletionHandler:(void(^)(NSRange markedRange))completionHandlerPtr
+{
+    _impl->markedRangeWithCompletionHandler(completionHandlerPtr);
+}
+
+- (void)hasMarkedTextWithCompletionHandler:(void(^)(BOOL hasMarkedText))completionHandlerPtr
+{
+    _impl->hasMarkedTextWithCompletionHandler(completionHandlerPtr);
+}
+
+- (void)attributedSubstringForProposedRange:(NSRange)nsRange completionHandler:(void(^)(NSAttributedString *attrString, NSRange actualRange))completionHandlerPtr
+{
+    _impl->attributedSubstringForProposedRange(nsRange, completionHandlerPtr);
+}
+
+- (void)firstRectForCharacterRange:(NSRange)theRange completionHandler:(void(^)(NSRect firstRect, NSRange actualRange))completionHandlerPtr
+{
+    _impl->firstRectForCharacterRange(theRange, completionHandlerPtr);
+}
+
+- (void)characterIndexForPoint:(NSPoint)thePoint completionHandler:(void(^)(NSUInteger))completionHandlerPtr
+{
+    _impl->characterIndexForPoint(thePoint, completionHandlerPtr);
+}
+
+#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
+
+- (NSArray *)validAttributesForMarkedText
+{
+    return _impl->validAttributesForMarkedText();
+}
+
+#if ENABLE(DRAG_SUPPORT)
+- (void)draggedImage:(NSImage *)image endedAt:(NSPoint)endPoint operation:(NSDragOperation)operation
+{
+    _impl->draggedImage(image, NSPointToCGPoint(endPoint), operation);
+}
+
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo
+{
+    return _impl->draggingEntered(draggingInfo);
+}
+
+- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo
+{
+    return _impl->draggingUpdated(draggingInfo);
+}
+
+- (void)draggingExited:(id <NSDraggingInfo>)draggingInfo
+{
+    _impl->draggingExited(draggingInfo);
+}
+
+- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)draggingInfo
+{
+    return _impl->prepareForDragOperation(draggingInfo);
+}
+
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)draggingInfo
+{
+    return _impl->performDragOperation(draggingInfo);
+}
+
+- (NSView *)_hitTest:(NSPoint *)point dragTypes:(NSSet *)types
+{
+    return _impl->hitTestForDragTypes(NSPointToCGPoint(*point), types);
+}
+#endif // ENABLE(DRAG_SUPPORT)
+
+- (BOOL)_windowResizeMouseLocationIsInVisibleScrollerThumb:(NSPoint)point
+{
+    return _impl->windowResizeMouseLocationIsInVisibleScrollerThumb(NSPointToCGPoint(point));
+}
+
+- (void)viewWillMoveToWindow:(NSWindow *)window
+{
+    _impl->viewWillMoveToWindow(window);
+}
+
+- (void)viewDidMoveToWindow
+{
+    _impl->viewDidMoveToWindow();
+}
+
+- (void)drawRect:(NSRect)rect
+{
+    _impl->drawRect(NSRectToCGRect(rect));
+}
+
+- (BOOL)isOpaque
+{
+    return _impl->isOpaque();
+}
+
+- (BOOL)mouseDownCanMoveWindow
+{
+    return WebKit::WebViewImpl::mouseDownCanMoveWindow();
+}
+
+- (void)viewDidHide
+{
+    _impl->viewDidHide();
+}
+
+- (void)viewDidUnhide
+{
+    _impl->viewDidUnhide();
+}
+
+- (void)viewDidChangeBackingProperties
+{
+    _impl->viewDidChangeBackingProperties();
+}
+
+- (void)_activeSpaceDidChange:(NSNotification *)notification
+{
+    _impl->activeSpaceDidChange();
+}
+
+- (id)accessibilityFocusedUIElement
+{
+    return _impl->accessibilityFocusedUIElement();
+}
+
+- (BOOL)accessibilityIsIgnored
+{
+    return _impl->accessibilityIsIgnored();
+}
+
+- (id)accessibilityHitTest:(NSPoint)point
+{
+    return _impl->accessibilityHitTest(NSPointToCGPoint(point));
+}
+
+- (id)accessibilityAttributeValue:(NSString *)attribute
+{
+    return _impl->accessibilityAttributeValue(attribute);
+}
+
+- (NSView *)hitTest:(NSPoint)point
+{
+    if (!_impl)
+        return [super hitTest:point];
+    return _impl->hitTest(NSPointToCGPoint(point));
+}
+
+- (NSInteger)conversationIdentifier
+{
+    return (NSInteger)self;
+}
+
+- (void)quickLookWithEvent:(NSEvent *)event
+{
+    _impl->quickLookWithEvent(event);
+}
+
+- (NSTrackingRectTag)addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside
+{
+    return _impl->addTrackingRect(NSRectToCGRect(rect), owner, data, assumeInside);
+}
+
+- (NSTrackingRectTag)_addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside useTrackingNum:(int)tag
+{
+    return _impl->addTrackingRectWithTrackingNum(NSRectToCGRect(rect), owner, data, assumeInside, tag);
+}
+
+- (void)_addTrackingRects:(NSRect *)rects owner:(id)owner userDataList:(void **)userDataList assumeInsideList:(BOOL *)assumeInsideList trackingNums:(NSTrackingRectTag *)trackingNums count:(int)count
+{
+    CGRect *cgRects = (CGRect *)calloc(1, sizeof(CGRect));
+    for (int i = 0; i < count; i++)
+        cgRects[i] = NSRectToCGRect(rects[i]);
+    _impl->addTrackingRectsWithTrackingNums(cgRects, owner, userDataList, assumeInsideList, trackingNums, count);
+    free(cgRects);
+}
+
+- (void)removeTrackingRect:(NSTrackingRectTag)tag
+{
+    if (!_impl)
+        return;
+    _impl->removeTrackingRect(tag);
+}
+
+- (void)_removeTrackingRects:(NSTrackingRectTag *)tags count:(int)count
 {
-    return [_wkView acceptsFirstResponder];
+    if (!_impl)
+        return;
+    _impl->removeTrackingRects(tags, count);
 }
 
-- (void)resizeSubviewsWithOldSize:(NSSize)oldSize
+- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
 {
-    [_wkView setFrame:self.bounds];
+    return _impl->stringForToolTip(tag);
+}
+
+- (void)pasteboardChangedOwner:(NSPasteboard *)pasteboard
+{
+    _impl->pasteboardChangedOwner(pasteboard);
+}
+
+- (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)type
+{
+    _impl->provideDataForPasteboard(pasteboard, type);
+}
+
+- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
+{
+    return _impl->namesOfPromisedFilesDroppedAtDestination(dropDestination);
+}
+
+- (BOOL)wantsUpdateLayer
+{
+    return WebKit::WebViewImpl::wantsUpdateLayer();
+}
+
+- (void)updateLayer
+{
+    _impl->updateLayer();
 }
 
 - (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
 {
-    [_wkView setAllowsBackForwardNavigationGestures:allowsBackForwardNavigationGestures];
+    _impl->setAllowsBackForwardNavigationGestures(allowsBackForwardNavigationGestures);
 }
 
 - (BOOL)allowsBackForwardNavigationGestures
 {
-    return [_wkView allowsBackForwardNavigationGestures];
+    return _impl->allowsBackForwardNavigationGestures();
+}
+
+- (void)smartMagnifyWithEvent:(NSEvent *)event
+{
+    _impl->smartMagnifyWithEvent(event);
+}
+
+- (void)setMagnification:(double)magnification centeredAtPoint:(NSPoint)point
+{
+    _impl->setMagnification(magnification, NSPointToCGPoint(point));
+}
+
+- (void)setMagnification:(double)magnification
+{
+    _impl->setMagnification(magnification);
+}
+
+- (double)magnification
+{
+    return _impl->magnification();
 }
 
 - (void)setAllowsMagnification:(BOOL)allowsMagnification
 {
-    [_wkView setAllowsMagnification:allowsMagnification];
+    _impl->setAllowsMagnification(allowsMagnification);
 }
 
 - (BOOL)allowsMagnification
 {
-    return [_wkView allowsMagnification];
+    return _impl->allowsMagnification();
+}
+
+- (void)magnifyWithEvent:(NSEvent *)event
+{
+    _impl->magnifyWithEvent(event);
 }
 
-- (void)setMagnification:(CGFloat)magnification
+#if ENABLE(MAC_GESTURE_EVENTS)
+- (void)rotateWithEvent:(NSEvent *)event
 {
-    [_wkView setMagnification:magnification];
+    _impl->rotateWithEvent(event);
 }
+#endif
 
-- (CGFloat)magnification
+- (NSTextInputContext *)_web_superInputContext
 {
-    return [_wkView magnification];
+    return [super inputContext];
 }
 
-- (void)setMagnification:(CGFloat)magnification centeredAtPoint:(CGPoint)point
+- (void)_web_superQuickLookWithEvent:(NSEvent *)event
 {
-    [_wkView setMagnification:magnification centeredAtPoint:NSPointFromCGPoint(point)];
+    [super quickLookWithEvent:event];
 }
 
-- (BOOL)_ignoresNonWheelEvents
+- (void)_web_superSwipeWithEvent:(NSEvent *)event
 {
-    return [_wkView _ignoresNonWheelEvents];
+    [super swipeWithEvent:event];
 }
 
-- (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents
+- (void)_web_superMagnifyWithEvent:(NSEvent *)event
 {
-    [_wkView _setIgnoresNonWheelEvents:ignoresNonWheelEvents];
+    [super magnifyWithEvent:event];
 }
 
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event
 {
-    return [_wkView draggingEntered:sender];
+    [super smartMagnifyWithEvent:event];
 }
 
-- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
+- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag
 {
-    return [_wkView draggingUpdated:sender];
+    [super removeTrackingRect:tag];
 }
 
-- (void)draggingExited:(id <NSDraggingInfo>)sender
+- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute
 {
-    [_wkView draggingExited:sender];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    return [super accessibilityAttributeValue:attribute];
+#pragma clang diagnostic pop
 }
 
-- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
+- (void)_web_superDoCommandBySelector:(SEL)selector
 {
-    return [_wkView prepareForDragOperation:sender];
+    [super doCommandBySelector:selector];
 }
 
-- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
+- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event
 {
-    return [_wkView performDragOperation:sender];
+    return [super performKeyEquivalent:event];
 }
 
-- (CGSize)intrinsicContentSize
+- (void)_web_superKeyDown:(NSEvent *)event
 {
-    return _intrinsicContentSize;
+    [super keyDown:event];
 }
 
-- (void)_setIntrinsicContentSize:(CGSize)intrinsicContentSize
+- (NSView *)_web_superHitTest:(NSPoint)point
 {
-    // If the intrinsic content size is less than the minimum layout width, the content flowed to fit,
-    // so we can report that that dimension is flexible. If not, we need to report our intrinsic width
-    // so that autolayout will know to provide space for us.
+    return [super hitTest:point];
+}
 
-    CGSize intrinsicContentSizeAcknowledgingFlexibleWidth = intrinsicContentSize;
-    if (intrinsicContentSize.width < _page->minimumLayoutSize().width())
-        intrinsicContentSizeAcknowledgingFlexibleWidth.width = NSViewNoInstrinsicMetric;
+- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
+{
+    return [self _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)userData];
+}
 
-    _intrinsicContentSize = intrinsicContentSizeAcknowledgingFlexibleWidth;
-    [self invalidateIntrinsicContentSize];
+// We don't expose these various bits of SPI like WKView does,
+// so have these internal methods just do the work (or do nothing):
+- (void)_web_prepareForImmediateActionAnimation
+{
+}
+
+- (void)_web_cancelImmediateActionAnimation
+{
+}
+
+- (void)_web_completeImmediateActionAnimation
+{
+}
+
+- (void)_web_didChangeContentSize:(NSSize)newSize
+{
+}
+
+- (void)_web_dismissContentRelativeChildWindows
+{
+    _impl->dismissContentRelativeChildWindowsFromViewOnly();
+}
+
+- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)withAnimation
+{
+    _impl->dismissContentRelativeChildWindowsWithAnimationFromViewOnly(withAnimation);
+}
+
+- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
+{
+    _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event);
 }
 
 #endif // PLATFORM(MAC)
@@ -1995,19 +2759,23 @@ static WebCore::FloatPoint constrainContentOffset(WebCore::FloatPoint contentOff
 - (void)_setEditable:(BOOL)editable
 {
     _page->setEditable(editable);
-#if !PLATFORM(IOS)
-    [_wkView _addFontPanelObserver];
+#if PLATFORM(MAC)
+    _impl->startObservingFontPanel();
 #endif
 }
 
 - (_WKRemoteObjectRegistry *)_remoteObjectRegistry
 {
+#if PLATFORM(MAC)
+    return _impl->remoteObjectRegistry();
+#else
     if (!_remoteObjectRegistry) {
         _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
         _page->process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
     }
 
     return _remoteObjectRegistry.get();
+#endif
 }
 
 - (WKBrowsingContextHandle *)_handle
@@ -2618,7 +3386,7 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
 - (_WKLayoutMode)_layoutMode
 {
 #if PLATFORM(MAC)
-    switch ([_wkView _layoutMode]) {
+    switch (_impl->layoutMode()) {
     case kWKLayoutModeFixedSize:
         return _WKLayoutModeFixedSize;
     case kWKLayoutModeDynamicSizeComputedFromViewScale:
@@ -2653,7 +3421,7 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
         wkViewLayoutMode = kWKLayoutModeViewSize;
         break;
     }
-    [_wkView _setLayoutMode:wkViewLayoutMode];
+    _impl->setLayoutMode(wkViewLayoutMode);
 #else
     _page->setUseFixedLayout(layoutMode == _WKLayoutModeFixedSize || layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale);
 #endif
@@ -2677,7 +3445,7 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
 - (void)_setViewScale:(CGFloat)viewScale
 {
 #if PLATFORM(MAC)
-    [_wkView _setViewScale:viewScale];
+    _impl->setViewScale(viewScale);
 #else
     if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale))
         [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
@@ -3143,73 +3911,79 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
 
 #pragma mark - OS X-specific methods
 
-- (NSColor *)_pageExtendedBackgroundColor
+- (BOOL)_drawsTransparentBackground
 {
-    WebCore::Color color = _page->pageExtendedBackgroundColor();
-    if (!color.isValid())
-        return nil;
+    return _impl->drawsTransparentBackground();
+}
 
-    return nsColor(color);
+- (void)_setDrawsTransparentBackground:(BOOL)drawsTransparentBackground
+{
+    _impl->setDrawsTransparentBackground(drawsTransparentBackground);
 }
 
-- (BOOL)_drawsTransparentBackground
+#if WK_API_ENABLED
+- (NSView *)_inspectorAttachmentView
 {
-    return _page->drawsTransparentBackground();
+    return _impl->inspectorAttachmentView();
 }
 
-- (void)_setDrawsTransparentBackground:(BOOL)drawsTransparentBackground
+- (void)_setInspectorAttachmentView:(NSView *)newView
 {
-    _page->setDrawsTransparentBackground(drawsTransparentBackground);
+    _impl->setInspectorAttachmentView(newView);
 }
+#endif
 
-- (void)_setOverrideDeviceScaleFactor:(CGFloat)deviceScaleFactor
+- (BOOL)_windowOcclusionDetectionEnabled
 {
-    [_wkView _setOverrideDeviceScaleFactor:deviceScaleFactor];
+    return _impl->windowOcclusionDetectionEnabled();
 }
 
-- (CGFloat)_overrideDeviceScaleFactor
+- (void)_setWindowOcclusionDetectionEnabled:(BOOL)enabled
 {
-    return [_wkView _overrideDeviceScaleFactor];
+    _impl->setWindowOcclusionDetectionEnabled(enabled);
 }
 
-- (id)_immediateActionAnimationControllerForHitTestResult:(_WKHitTestResult *)hitTestResult withType:(_WKImmediateActionType)type userData:(id<NSSecureCoding>)userData
+- (void)_setOverrideDeviceScaleFactor:(CGFloat)deviceScaleFactor
 {
-    return nil;
+    _impl->setOverrideDeviceScaleFactor(deviceScaleFactor);
+}
+
+- (CGFloat)_overrideDeviceScaleFactor
+{
+    return _impl->overrideDeviceScaleFactor();
 }
 
 - (void)_setTopContentInset:(CGFloat)contentInset
 {
-    [_wkView _setTopContentInset:contentInset];
+    return _impl->setTopContentInset(contentInset);
 }
 
 - (CGFloat)_topContentInset
 {
-    return [_wkView _topContentInset];
+    return _impl->topContentInset();
 }
 
-- (BOOL)_windowOcclusionDetectionEnabled
+- (NSColor *)_pageExtendedBackgroundColor
 {
-    return [_wkView windowOcclusionDetectionEnabled];
+    return _impl->pageExtendedBackgroundColor();
 }
 
-- (void)_setWindowOcclusionDetectionEnabled:(BOOL)flag
+- (id)_immediateActionAnimationControllerForHitTestResult:(_WKHitTestResult *)hitTestResult withType:(_WKImmediateActionType)type userData:(id<NSSecureCoding>)userData
 {
-    [_wkView setWindowOcclusionDetectionEnabled:flag];
+    return nil;
 }
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
-
 - (void)_setAutomaticallyAdjustsContentInsets:(BOOL)automaticallyAdjustsContentInsets
 {
-    [_wkView _setAutomaticallyAdjustsContentInsets:automaticallyAdjustsContentInsets];
+    _impl->setAutomaticallyAdjustsContentInsets(automaticallyAdjustsContentInsets);
 }
 
 - (BOOL)_automaticallyAdjustsContentInsets
 {
-    return [_wkView _automaticallyAdjustsContentInsets];
+    return _impl->automaticallyAdjustsContentInsets();
 }
-
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+#endif
 
 - (CGFloat)_minimumLayoutWidth
 {
@@ -3223,7 +3997,7 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
     _page->setMinimumLayoutSize(WebCore::IntSize(width, 0));
     _page->setMainFrameIsScrollable(!expandsToFit);
 
-    [_wkView setShouldClipToVisibleRect:expandsToFit];
+    _impl->setClipsToVisibleRect(expandsToFit);
 }
 
 #endif
index 47b9de3..cb25919 100644 (file)
@@ -111,9 +111,6 @@ struct PrintInfo;
 
 @property (nonatomic, readonly) BOOL _allowsDoubleTapGestures;
 @property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
-#else
-@property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
-- (void)_setIntrinsicContentSize:(CGSize)intrinsicContentSize;
 #endif
 
 - (WKPageRef)_pageForTesting;
index 55a35b4..d3931aa 100644 (file)
@@ -664,64 +664,6 @@ Some other editing-related methods still unimplemented:
 
 #endif // USE(ASYNC_NSTEXTINPUTCLIENT)
 
-- (NSTextInputContext *)_superInputContext
-{
-    return [super inputContext];
-}
-
-- (void)_superQuickLookWithEvent:(NSEvent *)event
-{
-    [super quickLookWithEvent:event];
-}
-
-- (void)_superSwipeWithEvent:(NSEvent *)event
-{
-    [super swipeWithEvent:event];
-}
-
-- (void)_superMagnifyWithEvent:(NSEvent *)event
-{
-    [super magnifyWithEvent:event];
-}
-
-- (void)_superSmartMagnifyWithEvent:(NSEvent *)event
-{
-    [super smartMagnifyWithEvent:event];
-}
-
-- (void)_superRemoveTrackingRect:(NSTrackingRectTag)tag
-{
-    [super removeTrackingRect:tag];
-}
-
-- (id)_superAccessibilityAttributeValue:(NSString *)attribute
-{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    return [super accessibilityAttributeValue:attribute];
-#pragma clang diagnostic pop
-}
-
-- (void)_superDoCommandBySelector:(SEL)selector
-{
-    [super doCommandBySelector:selector];
-}
-
-- (BOOL)_superPerformKeyEquivalent:(NSEvent *)event
-{
-    return [super performKeyEquivalent:event];
-}
-
-- (void)_superKeyDown:(NSEvent *)event
-{
-    [super keyDown:event];
-}
-
-- (NSView *)_superHitTest:(NSPoint)point
-{
-    return [super hitTest:point];
-}
-
 - (NSArray *)validAttributesForMarkedText
 {
     return _data->_impl->validAttributesForMarkedText();
@@ -769,11 +711,6 @@ Some other editing-related methods still unimplemented:
     return _data->_impl->windowResizeMouseLocationIsInVisibleScrollerThumb(NSPointToCGPoint(point));
 }
 
-- (void)_addFontPanelObserver
-{
-    _data->_impl->startObservingFontPanel();
-}
-
 - (void)viewWillMoveToWindow:(NSWindow *)window
 {
     _data->_impl->viewWillMoveToWindow(window);
@@ -937,6 +874,104 @@ Some other editing-related methods still unimplemented:
 }
 #endif // WK_API_ENABLED
 
+- (NSTextInputContext *)_web_superInputContext
+{
+    return [super inputContext];
+}
+
+- (void)_web_superQuickLookWithEvent:(NSEvent *)event
+{
+    [super quickLookWithEvent:event];
+}
+
+- (void)_web_superSwipeWithEvent:(NSEvent *)event
+{
+    [super swipeWithEvent:event];
+}
+
+- (void)_web_superMagnifyWithEvent:(NSEvent *)event
+{
+    [super magnifyWithEvent:event];
+}
+
+- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event
+{
+    [super smartMagnifyWithEvent:event];
+}
+
+- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag
+{
+    [super removeTrackingRect:tag];
+}
+
+- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute
+{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    return [super accessibilityAttributeValue:attribute];
+#pragma clang diagnostic pop
+}
+
+- (void)_web_superDoCommandBySelector:(SEL)selector
+{
+    [super doCommandBySelector:selector];
+}
+
+- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event
+{
+    return [super performKeyEquivalent:event];
+}
+
+- (void)_web_superKeyDown:(NSEvent *)event
+{
+    [super keyDown:event];
+}
+
+- (NSView *)_web_superHitTest:(NSPoint)point
+{
+    return [super hitTest:point];
+}
+
+- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
+{
+    return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];
+}
+
+- (void)_web_prepareForImmediateActionAnimation
+{
+    [self _prepareForImmediateActionAnimation];
+}
+
+- (void)_web_cancelImmediateActionAnimation
+{
+    [self _cancelImmediateActionAnimation];
+}
+
+- (void)_web_completeImmediateActionAnimation
+{
+    [self _completeImmediateActionAnimation];
+}
+
+- (void)_web_didChangeContentSize:(NSSize)newSize
+{
+    [self _didChangeContentSize:newSize];
+}
+
+- (void)_web_dismissContentRelativeChildWindows
+{
+    [self _dismissContentRelativeChildWindows];
+}
+
+- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)withAnimation
+{
+    [self _dismissContentRelativeChildWindowsWithAnimation:withAnimation];
+}
+
+- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
+{
+    [self _gestureEventWasNotHandledByWebCore:event];
+}
+
 @end
 
 @implementation WKView (Private)
@@ -1359,11 +1394,6 @@ static _WKOverlayScrollbarStyle toAPIScrollbarStyle(WTF::Optional<WebCore::Scrol
     _data->_impl->setDidMoveSwipeSnapshotCallback(callback);
 }
 
-- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
-{
-    return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];
-}
-
 - (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(uint32_t)type userData:(WKTypeRef)userData
 {
     return nil;
index d4a15da..76c6c0c 100644 (file)
@@ -50,8 +50,6 @@ class WebProcessPool;
 @property (nonatomic, setter=_setThumbnailView:) _WKThumbnailView *_thumbnailView;
 #endif
 
-- (void)_addFontPanelObserver;
-
 @end
 
 #endif
index c874c0a..db2e898 100644 (file)
@@ -52,31 +52,29 @@ OBJC_CLASS _WKThumbnailView;
 
 @protocol WebViewImplDelegate
 
-- (NSTextInputContext *)_superInputContext;
-- (void)_superQuickLookWithEvent:(NSEvent *)event;
-- (void)_superRemoveTrackingRect:(NSTrackingRectTag)tag;
-- (void)_superSwipeWithEvent:(NSEvent *)event;
-- (void)_superMagnifyWithEvent:(NSEvent *)event;
-- (void)_superSmartMagnifyWithEvent:(NSEvent *)event;
-- (id)_superAccessibilityAttributeValue:(NSString *)attribute;
-- (void)_superDoCommandBySelector:(SEL)selector;
-- (BOOL)_superPerformKeyEquivalent:(NSEvent *)event;
-- (void)_superKeyDown:(NSEvent *)event;
-- (NSView *)_superHitTest:(NSPoint)point;
-
-// This is a hack; these things live can live on a category (e.g. WKView (Private)) but WKView itself conforms to this protocol.
-// They're not actually optional.
-@optional
+- (NSTextInputContext *)_web_superInputContext;
+- (void)_web_superQuickLookWithEvent:(NSEvent *)event;
+- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag;
+- (void)_web_superSwipeWithEvent:(NSEvent *)event;
+- (void)_web_superMagnifyWithEvent:(NSEvent *)event;
+- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event;
+- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute;
+- (void)_web_superDoCommandBySelector:(SEL)selector;
+- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event;
+- (void)_web_superKeyDown:(NSEvent *)event;
+- (NSView *)_web_superHitTest:(NSPoint)point;
 
 - (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData;
+- (void)_web_prepareForImmediateActionAnimation;
+- (void)_web_cancelImmediateActionAnimation;
+- (void)_web_completeImmediateActionAnimation;
 
-- (void)_prepareForImmediateActionAnimation;
-- (void)_cancelImmediateActionAnimation;
-- (void)_completeImmediateActionAnimation;
-- (void)_dismissContentRelativeChildWindows;
-- (void)_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
-- (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
-- (void)_didChangeContentSize:(NSSize)newSize;
+- (void)_web_dismissContentRelativeChildWindows;
+- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
+
+- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
+
+- (void)_web_didChangeContentSize:(NSSize)newSize;
 
 @end
 
index 5c5d38b..8e10f3c 100644 (file)
@@ -1274,7 +1274,7 @@ void WebViewImpl::activeSpaceDidChange()
 
 NSView *WebViewImpl::hitTest(CGPoint point)
 {
-    NSView *hitView = [m_view _superHitTest:NSPointFromCGPoint(point)];
+    NSView *hitView = [m_view _web_superHitTest:NSPointFromCGPoint(point)];
     if (hitView && hitView == m_layerHostingView)
         hitView = m_view;
 
@@ -1417,7 +1417,7 @@ void WebViewImpl::updateSecureInputState()
         return;
     }
     // WKView has a single input context for all editable areas (except for plug-ins).
-    NSTextInputContext *context = [m_view _superInputContext];
+    NSTextInputContext *context = [m_view _web_superInputContext];
     bool isInPasswordField = m_page->editorState().isInPasswordField;
 
     if (isInPasswordField) {
@@ -1453,7 +1453,7 @@ void WebViewImpl::notifyInputContextAboutDiscardedComposition()
 
     LOG(TextInput, "-> discardMarkedText");
 
-    [[m_view _superInputContext] discardMarkedText]; // Inform the input method that we won't have an inline input area despite having been asked to.
+    [[m_view _web_superInputContext] discardMarkedText]; // Inform the input method that we won't have an inline input area despite having been asked to.
 }
 
 void WebViewImpl::setPluginComplexTextInputState(PluginComplexTextInputState pluginComplexTextInputState)
@@ -1700,7 +1700,7 @@ bool WebViewImpl::executeSavedCommandBySelector(SEL selector)
     // The sink does two things: 1) Tells us if the responder went unhandled, and
     // 2) prevents any NSBeep; we don't ever want to beep here.
     RetainPtr<WKResponderChainSink> sink = adoptNS([[WKResponderChainSink alloc] initWithResponderChain:m_view]);
-    [m_view _superDoCommandBySelector:selector];
+    [m_view _web_superDoCommandBySelector:selector];
     [sink detach];
     return ![sink didReceiveUnhandledCommand];
 }
@@ -2181,7 +2181,7 @@ void WebViewImpl::setTextIndicatorAnimationProgress(float progress)
 
 void WebViewImpl::dismissContentRelativeChildWindowsWithAnimation(bool animate)
 {
-    [m_view _dismissContentRelativeChildWindowsWithAnimation:animate];
+    [m_view _web_dismissContentRelativeChildWindowsWithAnimation:animate];
 }
 
 void WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly(bool animate)
@@ -2190,7 +2190,7 @@ void WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly(bo
     // We can't invert these because clients can override (and have overridden) _dismissContentRelativeChildWindows, so it needs to be called.
     // For this same reason, this can't be moved to WebViewImpl without care.
     clearTextIndicatorWithAnimation(animate ? WebCore::TextIndicatorWindowDismissalAnimation::FadeOut : WebCore::TextIndicatorWindowDismissalAnimation::None);
-    [m_view _dismissContentRelativeChildWindows];
+    [m_view _web_dismissContentRelativeChildWindows];
 }
 
 void WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly()
@@ -2232,7 +2232,7 @@ void WebViewImpl::quickLookWithEvent(NSEvent *event)
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     if (m_immediateActionGestureRecognizer) {
-        [m_view _superQuickLookWithEvent:event];
+        [m_view _web_superQuickLookWithEvent:event];
         return;
     }
 #endif
@@ -2280,22 +2280,22 @@ void WebViewImpl::didPerformImmediateActionHitTest(const WebHitTestResultData& r
 
 void WebViewImpl::prepareForImmediateActionAnimation()
 {
-    [m_view _prepareForImmediateActionAnimation];
+    [m_view _web_prepareForImmediateActionAnimation];
 }
 
 void WebViewImpl::cancelImmediateActionAnimation()
 {
-    [m_view _cancelImmediateActionAnimation];
+    [m_view _web_cancelImmediateActionAnimation];
 }
 
 void WebViewImpl::completeImmediateActionAnimation()
 {
-    [m_view _completeImmediateActionAnimation];
+    [m_view _web_completeImmediateActionAnimation];
 }
 
 void WebViewImpl::didChangeContentSize(CGSize newSize)
 {
-    [m_view _didChangeContentSize:NSSizeFromCGSize(newSize)];
+    [m_view _web_didChangeContentSize:NSSizeFromCGSize(newSize)];
 }
 
 void WebViewImpl::setIgnoresNonWheelEvents(bool ignoresNonWheelEvents)
@@ -2404,7 +2404,7 @@ id WebViewImpl::accessibilityAttributeValue(NSString *attribute)
             if ([attribute isEqualToString:NSAccessibilityEnabledAttribute])
                 return @YES;
     
-    return [m_view _superAccessibilityAttributeValue:attribute];
+    return [m_view _web_superAccessibilityAttributeValue:attribute];
 }
 
 void WebViewImpl::setPrimaryTrackingArea(NSTrackingArea *trackingArea)
@@ -2455,7 +2455,7 @@ void WebViewImpl::removeTrackingRect(NSTrackingRectTag tag)
     }
 
     if (tag == m_lastToolTipTag) {
-        [m_view _superRemoveTrackingRect:tag];
+        [m_view _web_superRemoveTrackingRect:tag];
         m_lastToolTipTag = 0;
         return;
     }
@@ -3139,7 +3139,7 @@ void WebViewImpl::swipeWithEvent(NSEvent *event)
         return;
 
     if (!m_allowsBackForwardNavigationGestures) {
-        [m_view _superSwipeWithEvent:event];
+        [m_view _web_superSwipeWithEvent:event];
         return;
     }
 
@@ -3148,7 +3148,7 @@ void WebViewImpl::swipeWithEvent(NSEvent *event)
     else if (event.deltaX < 0.0)
         m_page->goForward();
     else
-        [m_view _superSwipeWithEvent:event];
+        [m_view _web_superSwipeWithEvent:event];
 }
 
 void WebViewImpl::magnifyWithEvent(NSEvent *event)
@@ -3158,7 +3158,7 @@ void WebViewImpl::magnifyWithEvent(NSEvent *event)
         NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, m_view);
         m_page->handleGestureEvent(webEvent);
 #endif
-        [m_view _superMagnifyWithEvent:event];
+        [m_view _web_superMagnifyWithEvent:event];
         return;
     }
 
@@ -3182,7 +3182,7 @@ void WebViewImpl::magnifyWithEvent(NSEvent *event)
 void WebViewImpl::smartMagnifyWithEvent(NSEvent *event)
 {
     if (!m_allowsMagnification) {
-        [m_view _superSmartMagnifyWithEvent:event];
+        [m_view _web_superSmartMagnifyWithEvent:event];
         return;
     }
 
@@ -3211,7 +3211,7 @@ void WebViewImpl::rotateWithEvent(NSEvent *event)
 
 void WebViewImpl::gestureEventWasNotHandledByWebCore(NSEvent *event)
 {
-    [m_view _gestureEventWasNotHandledByWebCore:event];
+    [m_view _web_gestureEventWasNotHandledByWebCore:event];
 }
 
 void WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly(NSEvent *event)
@@ -3360,7 +3360,7 @@ void WebViewImpl::doCommandBySelector(SEL selector)
     } else {
         // FIXME: Send the command to Editor synchronously and only send it along the
         // responder chain if it's a selector that does not correspond to an editing command.
-        [m_view _superDoCommandBySelector:selector];
+        [m_view _web_superDoCommandBySelector:selector];
     }
 }
 
@@ -3576,7 +3576,7 @@ NSTextInputContext *WebViewImpl::inputContext()
     if (!m_page->editorState().isContentEditable)
         return nil;
 
-    return [m_view _superInputContext];
+    return [m_view _web_superInputContext];
 }
 
 void WebViewImpl::unmarkText()
@@ -3671,13 +3671,13 @@ bool WebViewImpl::performKeyEquivalent(NSEvent *event)
     // but both get transformed to a cancelOperation: command, executing which passes an Esc key event to -performKeyEquivalent:.
     // Don't interpret this event again, avoiding re-entrancy and infinite loops.
     if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask))
-        return [m_view _superPerformKeyEquivalent:event];
+        return [m_view _web_superPerformKeyEquivalent:event];
 
     if (m_keyDownEventBeingResent) {
         // WebCore has already seen the event, no need for custom processing.
         // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit
         // first performs the original key equivalent, and if that isn't handled, it dispatches a synthetic Cmd+'+'.
-        return [m_view _superPerformKeyEquivalent:event];
+        return [m_view _web_superPerformKeyEquivalent:event];
     }
 
     ASSERT(event == [NSApp currentEvent]);
@@ -3694,7 +3694,7 @@ bool WebViewImpl::performKeyEquivalent(NSEvent *event)
         return YES;
     }
     
-    return [m_view _superPerformKeyEquivalent:event];
+    return [m_view _web_superPerformKeyEquivalent:event];
 }
 
 void WebViewImpl::keyUp(NSEvent *event)
@@ -3727,7 +3727,7 @@ void WebViewImpl::keyDown(NSEvent *event)
     // there is no range selection).
     // If this is the case we should ignore the key down.
     if (m_keyDownEventBeingResent == event) {
-        [m_view _superKeyDown:event];
+        [m_view _web_superKeyDown:event];
         return;
     }
 
@@ -3831,7 +3831,7 @@ void WebViewImpl::doCommandBySelector(SEL selector)
     } else {
         // FIXME: Send the command to Editor synchronously and only send it along the
         // responder chain if it's a selector that does not correspond to an editing command.
-        [m_view _superDoCommandBySelector:selector];
+        [m_view _web_superDoCommandBySelector:selector];
     }
 }
 
@@ -3908,7 +3908,7 @@ NSTextInputContext *WebViewImpl::inputContext()
     if (!m_page->editorState().isContentEditable)
         return nil;
 
-    return [m_view _superInputContext];
+    return [m_view _web_superInputContext];
 }
 
 NSRange WebViewImpl::selectedRange()
@@ -4110,13 +4110,13 @@ bool WebViewImpl::performKeyEquivalent(NSEvent *event)
     // but both get transformed to a cancelOperation: command, executing which passes an Esc key event to -performKeyEquivalent:.
     // Don't interpret this event again, avoiding re-entrancy and infinite loops.
     if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask))
-        return [m_view _superPerformKeyEquivalent:event];
+        return [m_view _web_superPerformKeyEquivalent:event];
 
     if (m_keyDownEventBeingResent) {
         // WebCore has already seen the event, no need for custom processing.
         // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit
         // first performs the original key equivalent, and if that isn't handled, it dispatches a synthetic Cmd+'+'.
-        return [m_view _superPerformKeyEquivalent:event];
+        return [m_view _web_superPerformKeyEquivalent:event];
     }
 
     ASSERT(event == [NSApp currentEvent]);
@@ -4133,7 +4133,7 @@ bool WebViewImpl::performKeyEquivalent(NSEvent *event)
         return true;
     }
     
-    return [m_view _superPerformKeyEquivalent:event];
+    return [m_view _web_superPerformKeyEquivalent:event];
 }
 
 void WebViewImpl::keyUp(NSEvent *event)
@@ -4168,7 +4168,7 @@ void WebViewImpl::keyDown(NSEvent *event)
     // there is no range selection).
     // If this is the case we should ignore the key down.
     if (m_keyDownEventBeingResent == event) {
-        [m_view _superKeyDown:event];
+        [m_view _web_superKeyDown:event];
         return;
     }
 
index 0513cad..75c1cea 100644 (file)
@@ -358,13 +358,7 @@ void PageClientImpl::setDragImage(const IntPoint& clientPosition, PassRefPtr<Sha
     size.scale(1.0 / m_impl->page().deviceScaleFactor());
     [dragNSImage setSize:size];
 
-#if WK_API_ENABLED
-    if (m_webView) {
-        NSPoint webViewPosition = [m_view convertPoint:clientPosition toView:m_webView];
-        m_impl->dragImageForView(m_webView, dragNSImage.get(), webViewPosition, isLinkDrag);
-    } else
-#endif
-        m_impl->dragImageForView(m_view, dragNSImage.get(), clientPosition, isLinkDrag);
+    m_impl->dragImageForView(m_view, dragNSImage.get(), clientPosition, isLinkDrag);
 }
 
 void PageClientImpl::setPromisedDataForImage(const String& pasteboardName, PassRefPtr<SharedBuffer> imageBuffer, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL, PassRefPtr<SharedBuffer> archiveBuffer)
@@ -605,13 +599,6 @@ void PageClientImpl::recommendedScrollbarStyleDidChange(ScrollbarStyle newStyle)
 
 void PageClientImpl::intrinsicContentSizeDidChange(const IntSize& intrinsicContentSize)
 {
-#if WK_API_ENABLED
-    if (m_webView) {
-        [m_webView _setIntrinsicContentSize:intrinsicContentSize];
-        return;
-    }
-#endif
-
     m_impl->setIntrinsicContentSize(intrinsicContentSize);
 }
 
@@ -798,10 +785,6 @@ void PageClientImpl::didPerformImmediateActionHitTest(const WebHitTestResultData
 
 void* PageClientImpl::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
 {
-#if WK_API_ENABLED
-    if (m_webView)
-        return [m_webView _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)(userData.get())];
-#endif
     return m_impl->immediateActionAnimationControllerForHitTestResult(hitTestResult.get(), type, userData.get());
 }
 
index 6786be6..e68b8f9 100644 (file)
@@ -1,3 +1,15 @@
+2015-11-02  Tim Horton  <timothy_horton@apple.com>
+
+        Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
+        https://bugs.webkit.org/show_bug.cgi?id=150174
+
+        Reviewed by Anders Carlsson.
+
+        * WebKitTestRunner/mac/EventSenderProxy.mm:
+        (WTR::EventSenderProxy::mouseUp):
+        (WTR::EventSenderProxy::mouseMoveTo):
+        Revert some parts of r188828 which no longer apply.
+
 2015-10-30  Dana Burkart  <dburkart@apple.com>
 
         svn-apply should handle unified diffs
index dd3443e..f7cb728 100644 (file)
@@ -348,17 +348,9 @@ void EventSenderProxy::mouseUp(unsigned buttonNumber, WKEventModifiers modifiers
     // FIXME: Silly hack to teach WKTR to respect capturing mouse events outside the WKView.
     // The right solution is just to use NSApplication's built-in event sending methods, 
     // instead of rolling our own algorithm for selecting an event target.
-    // FIXME: This is even worse now, because we need to hit the WKWebView's inner WKView
-    // when using the modern API, so the level of fakery and horror increases.
-    if (!targetView) {
+    if (!targetView)
         targetView = m_testController->mainWebView()->platformView();
-        for (NSView *wkWebViewChild in targetView.subviews) {
-            if ([wkWebViewChild isKindOfClass:[WKView class]]) {
-                targetView = wkWebViewChild;
-                break;
-            }
-        }
-    }
+
     ASSERT(targetView);
     [NSApp _setCurrentEvent:event];
     [targetView mouseUp:event];
@@ -622,7 +614,7 @@ void EventSenderProxy::startAndCancelMouseForceClick()
 void EventSenderProxy::mouseMoveTo(double x, double y)
 {
     NSView *view = m_testController->mainWebView()->platformView();
-    NSPoint position = [view convertPoint:NSMakePoint(x, view.frame.size.height - y) toView:nil];
+    NSPoint position = [view convertPoint:NSMakePoint(x, y) toView:nil];
     m_position.x = position.x;
     m_position.y = position.y;
     NSEvent *event = [NSEvent mouseEventWithType:(m_leftMouseButtonDown ? NSLeftMouseDragged : NSMouseMoved)