⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 191907 in webkit


Ignore:
Timestamp:
Nov 2, 2015, 1:15:06 PM (11 years ago)
Author:
timothy_horton@apple.com
Message:

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.

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Revert some parts of r188828 which no longer apply.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r191906 r191907  
     12015-11-02  Tim Horton  <timothy_horton@apple.com>
     2
     3        Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
     4        https://bugs.webkit.org/show_bug.cgi?id=150174
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * UIProcess/API/Cocoa/WKWebView.mm:
     9        (-[WKWebView initWithFrame:configuration:]):
     10        (-[WKWebView dealloc]):
     11        (-[WKWebView allowsLinkPreview]):
     12        (-[WKWebView setAllowsLinkPreview:]):
     13        (-[WKWebView acceptsFirstResponder]):
     14        (-[WKWebView becomeFirstResponder]):
     15        (-[WKWebView resignFirstResponder]):
     16        (-[WKWebView viewWillStartLiveResize]):
     17        (-[WKWebView viewDidEndLiveResize]):
     18        (-[WKWebView isFlipped]):
     19        (-[WKWebView intrinsicContentSize]):
     20        (-[WKWebView prepareContentInRect:]):
     21        (-[WKWebView setFrameSize:]):
     22        (-[WKWebView renewGState]):
     23        (-[WKWebView writeSelectionToPasteboard:types:]):
     24        (-[WKWebView centerSelectionInVisibleArea:]):
     25        (-[WKWebView validRequestorForSendType:returnType:]):
     26        (-[WKWebView readSelectionFromPasteboard:]):
     27        (-[WKWebView changeFont:]):
     28        (-[WKWebView validateUserInterfaceItem:]):
     29        (-[WKWebView startSpeaking:]):
     30        (-[WKWebView stopSpeaking:]):
     31        (-[WKWebView showGuessPanel:]):
     32        (-[WKWebView checkSpelling:]):
     33        (-[WKWebView changeSpelling:]):
     34        (-[WKWebView toggleContinuousSpellChecking:]):
     35        (-[WKWebView isGrammarCheckingEnabled]):
     36        (-[WKWebView setGrammarCheckingEnabled:]):
     37        (-[WKWebView toggleGrammarChecking:]):
     38        (-[WKWebView toggleAutomaticSpellingCorrection:]):
     39        (-[WKWebView orderFrontSubstitutionsPanel:]):
     40        (-[WKWebView toggleSmartInsertDelete:]):
     41        (-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
     42        (-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
     43        (-[WKWebView toggleAutomaticQuoteSubstitution:]):
     44        (-[WKWebView isAutomaticDashSubstitutionEnabled]):
     45        (-[WKWebView setAutomaticDashSubstitutionEnabled:]):
     46        (-[WKWebView toggleAutomaticDashSubstitution:]):
     47        (-[WKWebView isAutomaticLinkDetectionEnabled]):
     48        (-[WKWebView setAutomaticLinkDetectionEnabled:]):
     49        (-[WKWebView toggleAutomaticLinkDetection:]):
     50        (-[WKWebView isAutomaticTextReplacementEnabled]):
     51        (-[WKWebView setAutomaticTextReplacementEnabled:]):
     52        (-[WKWebView toggleAutomaticTextReplacement:]):
     53        (-[WKWebView uppercaseWord:]):
     54        (-[WKWebView lowercaseWord:]):
     55        (-[WKWebView capitalizeWord:]):
     56        (-[WKWebView _wantsKeyDownForEvent:]):
     57        (-[WKWebView scrollWheel:]):
     58        (-[WKWebView swipeWithEvent:]):
     59        (-[WKWebView mouseMoved:]):
     60        (-[WKWebView mouseDown:]):
     61        (-[WKWebView mouseUp:]):
     62        (-[WKWebView mouseDragged:]):
     63        (-[WKWebView mouseEntered:]):
     64        (-[WKWebView mouseExited:]):
     65        (-[WKWebView otherMouseDown:]):
     66        (-[WKWebView otherMouseDragged:]):
     67        (-[WKWebView otherMouseUp:]):
     68        (-[WKWebView rightMouseDown:]):
     69        (-[WKWebView rightMouseDragged:]):
     70        (-[WKWebView rightMouseUp:]):
     71        (-[WKWebView pressureChangeWithEvent:]):
     72        (-[WKWebView acceptsFirstMouse:]):
     73        (-[WKWebView shouldDelayWindowOrderingForEvent:]):
     74        (-[WKWebView doCommandBySelector:]):
     75        (-[WKWebView insertText:]):
     76        (-[WKWebView insertText:replacementRange:]):
     77        (-[WKWebView inputContext]):
     78        (-[WKWebView performKeyEquivalent:]):
     79        (-[WKWebView keyUp:]):
     80        (-[WKWebView keyDown:]):
     81        (-[WKWebView flagsChanged:]):
     82        (-[WKWebView setMarkedText:selectedRange:replacementRange:]):
     83        (-[WKWebView unmarkText]):
     84        (-[WKWebView selectedRange]):
     85        (-[WKWebView hasMarkedText]):
     86        (-[WKWebView markedRange]):
     87        (-[WKWebView attributedSubstringForProposedRange:actualRange:]):
     88        (-[WKWebView characterIndexForPoint:]):
     89        (-[WKWebView firstRectForCharacterRange:actualRange:]):
     90        (-[WKWebView selectedRangeWithCompletionHandler:]):
     91        (-[WKWebView markedRangeWithCompletionHandler:]):
     92        (-[WKWebView hasMarkedTextWithCompletionHandler:]):
     93        (-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
     94        (-[WKWebView firstRectForCharacterRange:completionHandler:]):
     95        (-[WKWebView characterIndexForPoint:completionHandler:]):
     96        (-[WKWebView validAttributesForMarkedText]):
     97        (-[WKWebView draggedImage:endedAt:operation:]):
     98        (-[WKWebView draggingEntered:]):
     99        (-[WKWebView draggingUpdated:]):
     100        (-[WKWebView draggingExited:]):
     101        (-[WKWebView prepareForDragOperation:]):
     102        (-[WKWebView performDragOperation:]):
     103        (-[WKWebView _hitTest:dragTypes:]):
     104        (-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
     105        (-[WKWebView viewWillMoveToWindow:]):
     106        (-[WKWebView viewDidMoveToWindow]):
     107        (-[WKWebView drawRect:]):
     108        (-[WKWebView isOpaque]):
     109        (-[WKWebView mouseDownCanMoveWindow]):
     110        (-[WKWebView viewDidHide]):
     111        (-[WKWebView viewDidUnhide]):
     112        (-[WKWebView viewDidChangeBackingProperties]):
     113        (-[WKWebView _activeSpaceDidChange:]):
     114        (-[WKWebView accessibilityFocusedUIElement]):
     115        (-[WKWebView accessibilityIsIgnored]):
     116        (-[WKWebView accessibilityHitTest:]):
     117        (-[WKWebView accessibilityAttributeValue:]):
     118        (-[WKWebView hitTest:]):
     119        (-[WKWebView conversationIdentifier]):
     120        (-[WKWebView quickLookWithEvent:]):
     121        (-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
     122        (-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
     123        (-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
     124        (-[WKWebView removeTrackingRect:]):
     125        (-[WKWebView _removeTrackingRects:count:]):
     126        (-[WKWebView view:stringForToolTip:point:userData:]):
     127        (-[WKWebView pasteboardChangedOwner:]):
     128        (-[WKWebView pasteboard:provideDataForType:]):
     129        (-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
     130        (-[WKWebView wantsUpdateLayer]):
     131        (-[WKWebView updateLayer]):
     132        (-[WKWebView setAllowsBackForwardNavigationGestures:]):
     133        (-[WKWebView allowsBackForwardNavigationGestures]):
     134        (-[WKWebView smartMagnifyWithEvent:]):
     135        (-[WKWebView setMagnification:centeredAtPoint:]):
     136        (-[WKWebView setMagnification:]):
     137        (-[WKWebView magnification]):
     138        (-[WKWebView setAllowsMagnification:]):
     139        (-[WKWebView allowsMagnification]):
     140        (-[WKWebView magnifyWithEvent:]):
     141        (-[WKWebView rotateWithEvent:]):
     142        (-[WKWebView _web_superInputContext]):
     143        (-[WKWebView _web_superQuickLookWithEvent:]):
     144        (-[WKWebView _web_superSwipeWithEvent:]):
     145        (-[WKWebView _web_superMagnifyWithEvent:]):
     146        (-[WKWebView _web_superSmartMagnifyWithEvent:]):
     147        (-[WKWebView _web_superRemoveTrackingRect:]):
     148        (-[WKWebView _web_superAccessibilityAttributeValue:]):
     149        (-[WKWebView _web_superDoCommandBySelector:]):
     150        (-[WKWebView _web_superPerformKeyEquivalent:]):
     151        (-[WKWebView _web_superKeyDown:]):
     152        (-[WKWebView _web_superHitTest:]):
     153        (-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
     154        (-[WKWebView _web_prepareForImmediateActionAnimation]):
     155        (-[WKWebView _web_cancelImmediateActionAnimation]):
     156        (-[WKWebView _web_completeImmediateActionAnimation]):
     157        (-[WKWebView _web_didChangeContentSize:]):
     158        (-[WKWebView _web_dismissContentRelativeChildWindows]):
     159        (-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
     160        (-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
     161        (-[WKWebView _setEditable:]):
     162        (-[WKWebView _remoteObjectRegistry]):
     163        (-[WKWebView _layoutMode]):
     164        (-[WKWebView _setLayoutMode:]):
     165        (-[WKWebView _setViewScale:]):
     166        (-[WKWebView _drawsTransparentBackground]):
     167        (-[WKWebView _setDrawsTransparentBackground:]):
     168        (-[WKWebView _inspectorAttachmentView]):
     169        (-[WKWebView _setInspectorAttachmentView:]):
     170        (-[WKWebView _windowOcclusionDetectionEnabled]):
     171        (-[WKWebView _setWindowOcclusionDetectionEnabled:]):
     172        (-[WKWebView _setOverrideDeviceScaleFactor:]):
     173        (-[WKWebView _overrideDeviceScaleFactor]):
     174        (-[WKWebView _setTopContentInset:]):
     175        (-[WKWebView _topContentInset]):
     176        (-[WKWebView _pageExtendedBackgroundColor]):
     177        (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
     178        (-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
     179        (-[WKWebView _automaticallyAdjustsContentInsets]):
     180        (-[WKWebView _setMinimumLayoutWidth:]):
     181        (-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
     182        (-[WKWebView _ignoresNonWheelEvents]): Deleted.
     183        (-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
     184        (-[WKWebView _setIntrinsicContentSize:]): Deleted.
     185        * UIProcess/API/Cocoa/WKWebViewInternal.h:
     186        * UIProcess/API/mac/WKView.mm:
     187        (-[WKView _web_superInputContext]):
     188        (-[WKView _web_superQuickLookWithEvent:]):
     189        (-[WKView _web_superSwipeWithEvent:]):
     190        (-[WKView _web_superMagnifyWithEvent:]):
     191        (-[WKView _web_superSmartMagnifyWithEvent:]):
     192        (-[WKView _web_superRemoveTrackingRect:]):
     193        (-[WKView _web_superAccessibilityAttributeValue:]):
     194        (-[WKView _web_superDoCommandBySelector:]):
     195        (-[WKView _web_superPerformKeyEquivalent:]):
     196        (-[WKView _web_superKeyDown:]):
     197        (-[WKView _web_superHitTest:]):
     198        (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
     199        (-[WKView _web_prepareForImmediateActionAnimation]):
     200        (-[WKView _web_cancelImmediateActionAnimation]):
     201        (-[WKView _web_completeImmediateActionAnimation]):
     202        (-[WKView _web_didChangeContentSize:]):
     203        (-[WKView _web_dismissContentRelativeChildWindows]):
     204        (-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
     205        (-[WKView _web_gestureEventWasNotHandledByWebCore:]):
     206        (-[WKView _superInputContext]): Deleted.
     207        (-[WKView _superQuickLookWithEvent:]): Deleted.
     208        (-[WKView _superSwipeWithEvent:]): Deleted.
     209        (-[WKView _superMagnifyWithEvent:]): Deleted.
     210        (-[WKView _superSmartMagnifyWithEvent:]): Deleted.
     211        (-[WKView _superRemoveTrackingRect:]): Deleted.
     212        (-[WKView _superAccessibilityAttributeValue:]): Deleted.
     213        (-[WKView _superDoCommandBySelector:]): Deleted.
     214        (-[WKView _superPerformKeyEquivalent:]): Deleted.
     215        (-[WKView _superKeyDown:]): Deleted.
     216        (-[WKView _superHitTest:]): Deleted.
     217        (-[WKView _addFontPanelObserver]): Deleted.
     218        * UIProcess/API/mac/WKViewInternal.h:
     219        * UIProcess/Cocoa/WebViewImpl.h:
     220        * UIProcess/Cocoa/WebViewImpl.mm:
     221        (WebKit::WebViewImpl::hitTest):
     222        (WebKit::WebViewImpl::updateSecureInputState):
     223        (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
     224        (WebKit::WebViewImpl::executeSavedCommandBySelector):
     225        (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
     226        (WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
     227        (WebKit::WebViewImpl::quickLookWithEvent):
     228        (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
     229        (WebKit::WebViewImpl::cancelImmediateActionAnimation):
     230        (WebKit::WebViewImpl::completeImmediateActionAnimation):
     231        (WebKit::WebViewImpl::didChangeContentSize):
     232        (WebKit::WebViewImpl::accessibilityAttributeValue):
     233        (WebKit::WebViewImpl::removeTrackingRect):
     234        (WebKit::WebViewImpl::swipeWithEvent):
     235        (WebKit::WebViewImpl::magnifyWithEvent):
     236        (WebKit::WebViewImpl::smartMagnifyWithEvent):
     237        (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
     238        (WebKit::WebViewImpl::doCommandBySelector):
     239        (WebKit::WebViewImpl::inputContext):
     240        (WebKit::WebViewImpl::performKeyEquivalent):
     241        (WebKit::WebViewImpl::keyDown):
     242        * UIProcess/mac/PageClientImpl.mm:
     243        (WebKit::PageClientImpl::setDragImage):
     244        (WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
     245        (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
     246        Plop.
     247
    12482015-11-02  Anders Carlsson  <andersca@apple.com>
    2249
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r191904 r191907  
    7373#import "WebProcessPool.h"
    7474#import "WebProcessProxy.h"
     75#import "WebViewImpl.h"
    7576#import "_WKDiagnosticLoggingDelegate.h"
    7677#import "_WKFindDelegate.h"
    7778#import "_WKFormDelegate.h"
     79#import "_WKHitTestResultInternal.h"
    7880#import "_WKInputDelegate.h"
    7981#import "_WKRemoteObjectRegistryInternal.h"
     
    145147#import "WKViewInternal.h"
    146148#import <WebCore/ColorMac.h>
     149
     150@interface WKWebView () <WebViewImplDelegate>
     151@end
    147152#endif
    148153
     
    162167    std::unique_ptr<WebKit::UIDelegate> _uiDelegate;
    163168
     169    _WKRenderingProgressEvents _observedRenderingProgressEvents;
     170
     171    WebKit::WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate;
     172
     173#if PLATFORM(IOS)
    164174    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
    165     _WKRenderingProgressEvents _observedRenderingProgressEvents;
    166 
    167     WebKit::WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate;
    168 
    169 #if PLATFORM(IOS)
     175
    170176    RetainPtr<WKScrollView> _scrollView;
    171177    RetainPtr<WKContentView> _contentView;
     
    229235#endif
    230236#if PLATFORM(MAC)
    231     RetainPtr<WKView> _wkView;
    232     CGSize _intrinsicContentSize;
     237    std::unique_ptr<WebKit::WebViewImpl> _impl;
    233238#endif
    234239}
     
    309314    [_configuration _validate];
    310315
    311     CGRect bounds = self.bounds;
    312316
    313317    WebKit::WebProcessPool& processPool = *[_configuration processPool]->_processPool;
     
    348352
    349353#if PLATFORM(IOS)
     354    CGRect bounds = self.bounds;
    350355    _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]);
    351356    [_scrollView setInternalDelegate:self];
     
    384389
    385390#if PLATFORM(MAC)
    386     _wkView = adoptNS([[WKView alloc] initWithFrame:bounds processPool:processPool configuration:WTF::move(pageConfiguration) webView:self]);
    387     [self addSubview:_wkView.get()];
    388     _page = WebKit::toImpl([_wkView pageRef]);
    389 
    390     _intrinsicContentSize = CGSizeMake(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric);
     391    _impl = std::make_unique<WebKit::WebViewImpl>(self, self, processPool, WTF::move(pageConfiguration));
     392    _page = &_impl->page();
    391393
    392394#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
    393     [_wkView _setAutomaticallyAdjustsContentInsets:YES];
     395    _impl->setAutomaticallyAdjustsContentInsets(true);
    394396#endif
    395397#endif
     
    418420- (void)dealloc
    419421{
     422#if PLATFORM(IOS)
    420423    if (_remoteObjectRegistry)
    421424        _page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID());
     
    424427
    425428    [_remoteObjectRegistry _invalidate];
    426 #if PLATFORM(IOS)
    427429    [[_configuration _contentProviderRegistry] removePage:*_page];
    428430    [[NSNotificationCenter defaultCenter] removeObserver:self];
     
    698700{
    699701#if PLATFORM(MAC)
    700     return [_wkView allowsLinkPreview];
     702    return _impl->allowsLinkPreview();
    701703#elif PLATFORM(IOS)
    702704    return _allowsLinkPreview;
     
    707709{
    708710#if PLATFORM(MAC)
    709     [_wkView setAllowsLinkPreview:allowsLinkPreview];
     711    _impl->setAllowsLinkPreview(allowsLinkPreview);
    710712    return;
    711713#elif PLATFORM(IOS)
     
    18781880#if PLATFORM(MAC)
    18791881
     1882- (BOOL)acceptsFirstResponder
     1883{
     1884    return _impl->acceptsFirstResponder();
     1885}
     1886
    18801887- (BOOL)becomeFirstResponder
    18811888{
    1882     return [[self window] makeFirstResponder: _wkView.get()];
    1883 }
    1884 
    1885 - (BOOL)acceptsFirstResponder
    1886 {
    1887     return [_wkView acceptsFirstResponder];
    1888 }
    1889 
    1890 - (void)resizeSubviewsWithOldSize:(NSSize)oldSize
    1891 {
    1892     [_wkView setFrame:self.bounds];
     1889    return _impl->becomeFirstResponder();
     1890}
     1891
     1892- (BOOL)resignFirstResponder
     1893{
     1894    return _impl->resignFirstResponder();
     1895}
     1896
     1897- (void)viewWillStartLiveResize
     1898{
     1899    _impl->viewWillStartLiveResize();
     1900}
     1901
     1902- (void)viewDidEndLiveResize
     1903{
     1904    _impl->viewDidEndLiveResize();
     1905}
     1906
     1907- (BOOL)isFlipped
     1908{
     1909    return YES;
     1910}
     1911
     1912- (NSSize)intrinsicContentSize
     1913{
     1914    return NSSizeFromCGSize(_impl->intrinsicContentSize());
     1915}
     1916
     1917- (void)prepareContentInRect:(NSRect)rect
     1918{
     1919    _impl->prepareContentInRect(NSRectToCGRect(rect));
     1920}
     1921
     1922- (void)setFrameSize:(NSSize)size
     1923{
     1924    [super setFrameSize:size];
     1925    _impl->setFrameSize(NSSizeToCGSize(size));
     1926}
     1927
     1928- (void)renewGState
     1929{
     1930    _impl->renewGState();
     1931    [super renewGState];
     1932}
     1933
     1934#define WEBCORE_COMMAND(command) - (void)command:(id)sender { _impl->executeEditCommandForSelector(_cmd); }
     1935
     1936WEBCORE_COMMAND(alignCenter)
     1937WEBCORE_COMMAND(alignJustified)
     1938WEBCORE_COMMAND(alignLeft)
     1939WEBCORE_COMMAND(alignRight)
     1940WEBCORE_COMMAND(copy)
     1941WEBCORE_COMMAND(cut)
     1942WEBCORE_COMMAND(delete)
     1943WEBCORE_COMMAND(deleteBackward)
     1944WEBCORE_COMMAND(deleteBackwardByDecomposingPreviousCharacter)
     1945WEBCORE_COMMAND(deleteForward)
     1946WEBCORE_COMMAND(deleteToBeginningOfLine)
     1947WEBCORE_COMMAND(deleteToBeginningOfParagraph)
     1948WEBCORE_COMMAND(deleteToEndOfLine)
     1949WEBCORE_COMMAND(deleteToEndOfParagraph)
     1950WEBCORE_COMMAND(deleteToMark)
     1951WEBCORE_COMMAND(deleteWordBackward)
     1952WEBCORE_COMMAND(deleteWordForward)
     1953WEBCORE_COMMAND(ignoreSpelling)
     1954WEBCORE_COMMAND(indent)
     1955WEBCORE_COMMAND(insertBacktab)
     1956WEBCORE_COMMAND(insertLineBreak)
     1957WEBCORE_COMMAND(insertNewline)
     1958WEBCORE_COMMAND(insertNewlineIgnoringFieldEditor)
     1959WEBCORE_COMMAND(insertParagraphSeparator)
     1960WEBCORE_COMMAND(insertTab)
     1961WEBCORE_COMMAND(insertTabIgnoringFieldEditor)
     1962WEBCORE_COMMAND(makeTextWritingDirectionLeftToRight)
     1963WEBCORE_COMMAND(makeTextWritingDirectionNatural)
     1964WEBCORE_COMMAND(makeTextWritingDirectionRightToLeft)
     1965WEBCORE_COMMAND(moveBackward)
     1966WEBCORE_COMMAND(moveBackwardAndModifySelection)
     1967WEBCORE_COMMAND(moveDown)
     1968WEBCORE_COMMAND(moveDownAndModifySelection)
     1969WEBCORE_COMMAND(moveForward)
     1970WEBCORE_COMMAND(moveForwardAndModifySelection)
     1971WEBCORE_COMMAND(moveLeft)
     1972WEBCORE_COMMAND(moveLeftAndModifySelection)
     1973WEBCORE_COMMAND(moveParagraphBackwardAndModifySelection)
     1974WEBCORE_COMMAND(moveParagraphForwardAndModifySelection)
     1975WEBCORE_COMMAND(moveRight)
     1976WEBCORE_COMMAND(moveRightAndModifySelection)
     1977WEBCORE_COMMAND(moveToBeginningOfDocument)
     1978WEBCORE_COMMAND(moveToBeginningOfDocumentAndModifySelection)
     1979WEBCORE_COMMAND(moveToBeginningOfLine)
     1980WEBCORE_COMMAND(moveToBeginningOfLineAndModifySelection)
     1981WEBCORE_COMMAND(moveToBeginningOfParagraph)
     1982WEBCORE_COMMAND(moveToBeginningOfParagraphAndModifySelection)
     1983WEBCORE_COMMAND(moveToBeginningOfSentence)
     1984WEBCORE_COMMAND(moveToBeginningOfSentenceAndModifySelection)
     1985WEBCORE_COMMAND(moveToEndOfDocument)
     1986WEBCORE_COMMAND(moveToEndOfDocumentAndModifySelection)
     1987WEBCORE_COMMAND(moveToEndOfLine)
     1988WEBCORE_COMMAND(moveToEndOfLineAndModifySelection)
     1989WEBCORE_COMMAND(moveToEndOfParagraph)
     1990WEBCORE_COMMAND(moveToEndOfParagraphAndModifySelection)
     1991WEBCORE_COMMAND(moveToEndOfSentence)
     1992WEBCORE_COMMAND(moveToEndOfSentenceAndModifySelection)
     1993WEBCORE_COMMAND(moveToLeftEndOfLine)
     1994WEBCORE_COMMAND(moveToLeftEndOfLineAndModifySelection)
     1995WEBCORE_COMMAND(moveToRightEndOfLine)
     1996WEBCORE_COMMAND(moveToRightEndOfLineAndModifySelection)
     1997WEBCORE_COMMAND(moveUp)
     1998WEBCORE_COMMAND(moveUpAndModifySelection)
     1999WEBCORE_COMMAND(moveWordBackward)
     2000WEBCORE_COMMAND(moveWordBackwardAndModifySelection)
     2001WEBCORE_COMMAND(moveWordForward)
     2002WEBCORE_COMMAND(moveWordForwardAndModifySelection)
     2003WEBCORE_COMMAND(moveWordLeft)
     2004WEBCORE_COMMAND(moveWordLeftAndModifySelection)
     2005WEBCORE_COMMAND(moveWordRight)
     2006WEBCORE_COMMAND(moveWordRightAndModifySelection)
     2007WEBCORE_COMMAND(outdent)
     2008WEBCORE_COMMAND(pageDown)
     2009WEBCORE_COMMAND(pageDownAndModifySelection)
     2010WEBCORE_COMMAND(pageUp)
     2011WEBCORE_COMMAND(pageUpAndModifySelection)
     2012WEBCORE_COMMAND(paste)
     2013WEBCORE_COMMAND(pasteAsPlainText)
     2014WEBCORE_COMMAND(scrollPageDown)
     2015WEBCORE_COMMAND(scrollPageUp)
     2016WEBCORE_COMMAND(scrollLineDown)
     2017WEBCORE_COMMAND(scrollLineUp)
     2018WEBCORE_COMMAND(scrollToBeginningOfDocument)
     2019WEBCORE_COMMAND(scrollToEndOfDocument)
     2020WEBCORE_COMMAND(selectAll)
     2021WEBCORE_COMMAND(selectLine)
     2022WEBCORE_COMMAND(selectParagraph)
     2023WEBCORE_COMMAND(selectSentence)
     2024WEBCORE_COMMAND(selectToMark)
     2025WEBCORE_COMMAND(selectWord)
     2026WEBCORE_COMMAND(setMark)
     2027WEBCORE_COMMAND(subscript)
     2028WEBCORE_COMMAND(superscript)
     2029WEBCORE_COMMAND(swapWithMark)
     2030WEBCORE_COMMAND(takeFindStringFromSelection)
     2031WEBCORE_COMMAND(transpose)
     2032WEBCORE_COMMAND(underline)
     2033WEBCORE_COMMAND(unscript)
     2034WEBCORE_COMMAND(yank)
     2035WEBCORE_COMMAND(yankAndSelect)
     2036
     2037#undef WEBCORE_COMMAND
     2038
     2039- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pasteboard types:(NSArray *)types
     2040{
     2041    return _impl->writeSelectionToPasteboard(pasteboard, types);
     2042}
     2043
     2044- (void)centerSelectionInVisibleArea:(id)sender
     2045{
     2046    _impl->centerSelectionInVisibleArea();
     2047}
     2048
     2049- (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType
     2050{
     2051    return _impl->validRequestorForSendAndReturnTypes(sendType, returnType);
     2052}
     2053
     2054- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pasteboard
     2055{
     2056    return _impl->readSelectionFromPasteboard(pasteboard);
     2057}
     2058
     2059- (void)changeFont:(id)sender
     2060{
     2061    _impl->changeFontFromFontPanel();
     2062}
     2063
     2064- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
     2065{
     2066    return _impl->validateUserInterfaceItem(item);
     2067}
     2068
     2069- (IBAction)startSpeaking:(id)sender
     2070{
     2071    _impl->startSpeaking();
     2072}
     2073
     2074- (IBAction)stopSpeaking:(id)sender
     2075{
     2076    _impl->stopSpeaking(sender);
     2077}
     2078
     2079- (IBAction)showGuessPanel:(id)sender
     2080{
     2081    _impl->showGuessPanel(sender);
     2082}
     2083
     2084- (IBAction)checkSpelling:(id)sender
     2085{
     2086    _impl->checkSpelling();
     2087}
     2088
     2089- (void)changeSpelling:(id)sender
     2090{
     2091    _impl->changeSpelling(sender);
     2092}
     2093
     2094- (IBAction)toggleContinuousSpellChecking:(id)sender
     2095{
     2096    _impl->toggleContinuousSpellChecking();
     2097}
     2098
     2099- (BOOL)isGrammarCheckingEnabled
     2100{
     2101    return _impl->isGrammarCheckingEnabled();
     2102}
     2103
     2104- (void)setGrammarCheckingEnabled:(BOOL)flag
     2105{
     2106    _impl->setGrammarCheckingEnabled(flag);
     2107}
     2108
     2109- (IBAction)toggleGrammarChecking:(id)sender
     2110{
     2111    _impl->toggleGrammarChecking();
     2112}
     2113
     2114- (IBAction)toggleAutomaticSpellingCorrection:(id)sender
     2115{
     2116    _impl->toggleAutomaticSpellingCorrection();
     2117}
     2118
     2119- (void)orderFrontSubstitutionsPanel:(id)sender
     2120{
     2121    _impl->orderFrontSubstitutionsPanel(sender);
     2122}
     2123
     2124- (IBAction)toggleSmartInsertDelete:(id)sender
     2125{
     2126    _impl->toggleSmartInsertDelete();
     2127}
     2128
     2129- (BOOL)isAutomaticQuoteSubstitutionEnabled
     2130{
     2131    return _impl->isAutomaticQuoteSubstitutionEnabled();
     2132}
     2133
     2134- (void)setAutomaticQuoteSubstitutionEnabled:(BOOL)flag
     2135{
     2136    _impl->setAutomaticQuoteSubstitutionEnabled(flag);
     2137}
     2138
     2139- (void)toggleAutomaticQuoteSubstitution:(id)sender
     2140{
     2141    _impl->toggleAutomaticQuoteSubstitution();
     2142}
     2143
     2144- (BOOL)isAutomaticDashSubstitutionEnabled
     2145{
     2146    return _impl->isAutomaticDashSubstitutionEnabled();
     2147}
     2148
     2149- (void)setAutomaticDashSubstitutionEnabled:(BOOL)flag
     2150{
     2151    _impl->setAutomaticDashSubstitutionEnabled(flag);
     2152}
     2153
     2154- (void)toggleAutomaticDashSubstitution:(id)sender
     2155{
     2156    _impl->toggleAutomaticDashSubstitution();
     2157}
     2158
     2159- (BOOL)isAutomaticLinkDetectionEnabled
     2160{
     2161    return _impl->isAutomaticLinkDetectionEnabled();
     2162}
     2163
     2164- (void)setAutomaticLinkDetectionEnabled:(BOOL)flag
     2165{
     2166    _impl->setAutomaticLinkDetectionEnabled(flag);
     2167}
     2168
     2169- (void)toggleAutomaticLinkDetection:(id)sender
     2170{
     2171    _impl->toggleAutomaticLinkDetection();
     2172}
     2173
     2174- (BOOL)isAutomaticTextReplacementEnabled
     2175{
     2176    return _impl->isAutomaticTextReplacementEnabled();
     2177}
     2178
     2179- (void)setAutomaticTextReplacementEnabled:(BOOL)flag
     2180{
     2181    _impl->setAutomaticTextReplacementEnabled(flag);
     2182}
     2183
     2184- (void)toggleAutomaticTextReplacement:(id)sender
     2185{
     2186    _impl->toggleAutomaticTextReplacement();
     2187}
     2188
     2189- (void)uppercaseWord:(id)sender
     2190{
     2191    _impl->uppercaseWord();
     2192}
     2193
     2194- (void)lowercaseWord:(id)sender
     2195{
     2196    _impl->lowercaseWord();
     2197}
     2198
     2199- (void)capitalizeWord:(id)sender
     2200{
     2201    _impl->capitalizeWord();
     2202}
     2203
     2204- (BOOL)_wantsKeyDownForEvent:(NSEvent *)event
     2205{
     2206    return _impl->wantsKeyDownForEvent(event);
     2207}
     2208
     2209- (void)scrollWheel:(NSEvent *)event
     2210{
     2211    _impl->scrollWheel(event);
     2212}
     2213
     2214- (void)swipeWithEvent:(NSEvent *)event
     2215{
     2216    _impl->swipeWithEvent(event);
     2217}
     2218
     2219- (void)mouseMoved:(NSEvent *)event
     2220{
     2221    _impl->mouseMoved(event);
     2222}
     2223
     2224- (void)mouseDown:(NSEvent *)event
     2225{
     2226    _impl->mouseDown(event);
     2227}
     2228
     2229- (void)mouseUp:(NSEvent *)event
     2230{
     2231    _impl->mouseUp(event);
     2232}
     2233
     2234- (void)mouseDragged:(NSEvent *)event
     2235{
     2236    _impl->mouseDragged(event);
     2237}
     2238
     2239- (void)mouseEntered:(NSEvent *)event
     2240{
     2241    _impl->mouseEntered(event);
     2242}
     2243
     2244- (void)mouseExited:(NSEvent *)event
     2245{
     2246    _impl->mouseExited(event);
     2247}
     2248
     2249- (void)otherMouseDown:(NSEvent *)event
     2250{
     2251    _impl->otherMouseDown(event);
     2252}
     2253
     2254- (void)otherMouseDragged:(NSEvent *)event
     2255{
     2256    _impl->otherMouseDragged(event);
     2257}
     2258
     2259- (void)otherMouseUp:(NSEvent *)event
     2260{
     2261    _impl->otherMouseUp(event);
     2262}
     2263
     2264- (void)rightMouseDown:(NSEvent *)event
     2265{
     2266    _impl->rightMouseDown(event);
     2267}
     2268
     2269- (void)rightMouseDragged:(NSEvent *)event
     2270{
     2271    _impl->rightMouseDragged(event);
     2272}
     2273
     2274- (void)rightMouseUp:(NSEvent *)event
     2275{
     2276    _impl->rightMouseUp(event);
     2277}
     2278
     2279- (void)pressureChangeWithEvent:(NSEvent *)event
     2280{
     2281    _impl->pressureChangeWithEvent(event);
     2282}
     2283
     2284- (BOOL)acceptsFirstMouse:(NSEvent *)event
     2285{
     2286    return _impl->acceptsFirstMouse(event);
     2287}
     2288
     2289- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)event
     2290{
     2291    return _impl->shouldDelayWindowOrderingForEvent(event);
     2292}
     2293
     2294- (void)doCommandBySelector:(SEL)selector
     2295{
     2296    _impl->doCommandBySelector(selector);
     2297}
     2298
     2299- (void)insertText:(id)string
     2300{
     2301    _impl->insertText(string);
     2302}
     2303
     2304- (void)insertText:(id)string replacementRange:(NSRange)replacementRange
     2305{
     2306    _impl->insertText(string, replacementRange);
     2307}
     2308
     2309- (NSTextInputContext *)inputContext
     2310{
     2311    return _impl->inputContext();
     2312}
     2313
     2314- (BOOL)performKeyEquivalent:(NSEvent *)event
     2315{
     2316    return _impl->performKeyEquivalent(event);
     2317}
     2318
     2319- (void)keyUp:(NSEvent *)theEvent
     2320{
     2321    _impl->keyUp(theEvent);
     2322}
     2323
     2324- (void)keyDown:(NSEvent *)theEvent
     2325{
     2326    _impl->keyDown(theEvent);
     2327}
     2328
     2329- (void)flagsChanged:(NSEvent *)theEvent
     2330{
     2331    _impl->flagsChanged(theEvent);
     2332}
     2333
     2334- (void)setMarkedText:(id)string selectedRange:(NSRange)newSelectedRange replacementRange:(NSRange)replacementRange
     2335{
     2336    _impl->setMarkedText(string, newSelectedRange, replacementRange);
     2337}
     2338
     2339- (void)unmarkText
     2340{
     2341    _impl->unmarkText();
     2342}
     2343
     2344- (NSRange)selectedRange
     2345{
     2346    return _impl->selectedRange();
     2347}
     2348
     2349- (BOOL)hasMarkedText
     2350{
     2351    return _impl->hasMarkedText();
     2352}
     2353
     2354- (NSRange)markedRange
     2355{
     2356    return _impl->markedRange();
     2357}
     2358
     2359- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)nsRange actualRange:(NSRangePointer)actualRange
     2360{
     2361    return _impl->attributedSubstringForProposedRange(nsRange, actualRange);
     2362}
     2363
     2364- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
     2365{
     2366    return _impl->characterIndexForPoint(thePoint);
     2367}
     2368
     2369- (NSRect)firstRectForCharacterRange:(NSRange)theRange actualRange:(NSRangePointer)actualRange
     2370{
     2371    return _impl->firstRectForCharacterRange(theRange, actualRange);
     2372}
     2373
     2374#if USE(ASYNC_NSTEXTINPUTCLIENT)
     2375
     2376- (void)selectedRangeWithCompletionHandler:(void(^)(NSRange selectedRange))completionHandlerPtr
     2377{
     2378    _impl->selectedRangeWithCompletionHandler(completionHandlerPtr);
     2379}
     2380
     2381- (void)markedRangeWithCompletionHandler:(void(^)(NSRange markedRange))completionHandlerPtr
     2382{
     2383    _impl->markedRangeWithCompletionHandler(completionHandlerPtr);
     2384}
     2385
     2386- (void)hasMarkedTextWithCompletionHandler:(void(^)(BOOL hasMarkedText))completionHandlerPtr
     2387{
     2388    _impl->hasMarkedTextWithCompletionHandler(completionHandlerPtr);
     2389}
     2390
     2391- (void)attributedSubstringForProposedRange:(NSRange)nsRange completionHandler:(void(^)(NSAttributedString *attrString, NSRange actualRange))completionHandlerPtr
     2392{
     2393    _impl->attributedSubstringForProposedRange(nsRange, completionHandlerPtr);
     2394}
     2395
     2396- (void)firstRectForCharacterRange:(NSRange)theRange completionHandler:(void(^)(NSRect firstRect, NSRange actualRange))completionHandlerPtr
     2397{
     2398    _impl->firstRectForCharacterRange(theRange, completionHandlerPtr);
     2399}
     2400
     2401- (void)characterIndexForPoint:(NSPoint)thePoint completionHandler:(void(^)(NSUInteger))completionHandlerPtr
     2402{
     2403    _impl->characterIndexForPoint(thePoint, completionHandlerPtr);
     2404}
     2405
     2406#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
     2407
     2408- (NSArray *)validAttributesForMarkedText
     2409{
     2410    return _impl->validAttributesForMarkedText();
     2411}
     2412
     2413#if ENABLE(DRAG_SUPPORT)
     2414- (void)draggedImage:(NSImage *)image endedAt:(NSPoint)endPoint operation:(NSDragOperation)operation
     2415{
     2416    _impl->draggedImage(image, NSPointToCGPoint(endPoint), operation);
     2417}
     2418
     2419- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo
     2420{
     2421    return _impl->draggingEntered(draggingInfo);
     2422}
     2423
     2424- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)draggingInfo
     2425{
     2426    return _impl->draggingUpdated(draggingInfo);
     2427}
     2428
     2429- (void)draggingExited:(id <NSDraggingInfo>)draggingInfo
     2430{
     2431    _impl->draggingExited(draggingInfo);
     2432}
     2433
     2434- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)draggingInfo
     2435{
     2436    return _impl->prepareForDragOperation(draggingInfo);
     2437}
     2438
     2439- (BOOL)performDragOperation:(id <NSDraggingInfo>)draggingInfo
     2440{
     2441    return _impl->performDragOperation(draggingInfo);
     2442}
     2443
     2444- (NSView *)_hitTest:(NSPoint *)point dragTypes:(NSSet *)types
     2445{
     2446    return _impl->hitTestForDragTypes(NSPointToCGPoint(*point), types);
     2447}
     2448#endif // ENABLE(DRAG_SUPPORT)
     2449
     2450- (BOOL)_windowResizeMouseLocationIsInVisibleScrollerThumb:(NSPoint)point
     2451{
     2452    return _impl->windowResizeMouseLocationIsInVisibleScrollerThumb(NSPointToCGPoint(point));
     2453}
     2454
     2455- (void)viewWillMoveToWindow:(NSWindow *)window
     2456{
     2457    _impl->viewWillMoveToWindow(window);
     2458}
     2459
     2460- (void)viewDidMoveToWindow
     2461{
     2462    _impl->viewDidMoveToWindow();
     2463}
     2464
     2465- (void)drawRect:(NSRect)rect
     2466{
     2467    _impl->drawRect(NSRectToCGRect(rect));
     2468}
     2469
     2470- (BOOL)isOpaque
     2471{
     2472    return _impl->isOpaque();
     2473}
     2474
     2475- (BOOL)mouseDownCanMoveWindow
     2476{
     2477    return WebKit::WebViewImpl::mouseDownCanMoveWindow();
     2478}
     2479
     2480- (void)viewDidHide
     2481{
     2482    _impl->viewDidHide();
     2483}
     2484
     2485- (void)viewDidUnhide
     2486{
     2487    _impl->viewDidUnhide();
     2488}
     2489
     2490- (void)viewDidChangeBackingProperties
     2491{
     2492    _impl->viewDidChangeBackingProperties();
     2493}
     2494
     2495- (void)_activeSpaceDidChange:(NSNotification *)notification
     2496{
     2497    _impl->activeSpaceDidChange();
     2498}
     2499
     2500- (id)accessibilityFocusedUIElement
     2501{
     2502    return _impl->accessibilityFocusedUIElement();
     2503}
     2504
     2505- (BOOL)accessibilityIsIgnored
     2506{
     2507    return _impl->accessibilityIsIgnored();
     2508}
     2509
     2510- (id)accessibilityHitTest:(NSPoint)point
     2511{
     2512    return _impl->accessibilityHitTest(NSPointToCGPoint(point));
     2513}
     2514
     2515- (id)accessibilityAttributeValue:(NSString *)attribute
     2516{
     2517    return _impl->accessibilityAttributeValue(attribute);
     2518}
     2519
     2520- (NSView *)hitTest:(NSPoint)point
     2521{
     2522    if (!_impl)
     2523        return [super hitTest:point];
     2524    return _impl->hitTest(NSPointToCGPoint(point));
     2525}
     2526
     2527- (NSInteger)conversationIdentifier
     2528{
     2529    return (NSInteger)self;
     2530}
     2531
     2532- (void)quickLookWithEvent:(NSEvent *)event
     2533{
     2534    _impl->quickLookWithEvent(event);
     2535}
     2536
     2537- (NSTrackingRectTag)addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside
     2538{
     2539    return _impl->addTrackingRect(NSRectToCGRect(rect), owner, data, assumeInside);
     2540}
     2541
     2542- (NSTrackingRectTag)_addTrackingRect:(NSRect)rect owner:(id)owner userData:(void *)data assumeInside:(BOOL)assumeInside useTrackingNum:(int)tag
     2543{
     2544    return _impl->addTrackingRectWithTrackingNum(NSRectToCGRect(rect), owner, data, assumeInside, tag);
     2545}
     2546
     2547- (void)_addTrackingRects:(NSRect *)rects owner:(id)owner userDataList:(void **)userDataList assumeInsideList:(BOOL *)assumeInsideList trackingNums:(NSTrackingRectTag *)trackingNums count:(int)count
     2548{
     2549    CGRect *cgRects = (CGRect *)calloc(1, sizeof(CGRect));
     2550    for (int i = 0; i < count; i++)
     2551        cgRects[i] = NSRectToCGRect(rects[i]);
     2552    _impl->addTrackingRectsWithTrackingNums(cgRects, owner, userDataList, assumeInsideList, trackingNums, count);
     2553    free(cgRects);
     2554}
     2555
     2556- (void)removeTrackingRect:(NSTrackingRectTag)tag
     2557{
     2558    if (!_impl)
     2559        return;
     2560    _impl->removeTrackingRect(tag);
     2561}
     2562
     2563- (void)_removeTrackingRects:(NSTrackingRectTag *)tags count:(int)count
     2564{
     2565    if (!_impl)
     2566        return;
     2567    _impl->removeTrackingRects(tags, count);
     2568}
     2569
     2570- (NSString *)view:(NSView *)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void *)data
     2571{
     2572    return _impl->stringForToolTip(tag);
     2573}
     2574
     2575- (void)pasteboardChangedOwner:(NSPasteboard *)pasteboard
     2576{
     2577    _impl->pasteboardChangedOwner(pasteboard);
     2578}
     2579
     2580- (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)type
     2581{
     2582    _impl->provideDataForPasteboard(pasteboard, type);
     2583}
     2584
     2585- (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
     2586{
     2587    return _impl->namesOfPromisedFilesDroppedAtDestination(dropDestination);
     2588}
     2589
     2590- (BOOL)wantsUpdateLayer
     2591{
     2592    return WebKit::WebViewImpl::wantsUpdateLayer();
     2593}
     2594
     2595- (void)updateLayer
     2596{
     2597    _impl->updateLayer();
    18932598}
    18942599
    18952600- (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
    18962601{
    1897     [_wkView setAllowsBackForwardNavigationGestures:allowsBackForwardNavigationGestures];
     2602    _impl->setAllowsBackForwardNavigationGestures(allowsBackForwardNavigationGestures);
    18982603}
    18992604
    19002605- (BOOL)allowsBackForwardNavigationGestures
    19012606{
    1902     return [_wkView allowsBackForwardNavigationGestures];
     2607    return _impl->allowsBackForwardNavigationGestures();
     2608}
     2609
     2610- (void)smartMagnifyWithEvent:(NSEvent *)event
     2611{
     2612    _impl->smartMagnifyWithEvent(event);
     2613}
     2614
     2615- (void)setMagnification:(double)magnification centeredAtPoint:(NSPoint)point
     2616{
     2617    _impl->setMagnification(magnification, NSPointToCGPoint(point));
     2618}
     2619
     2620- (void)setMagnification:(double)magnification
     2621{
     2622    _impl->setMagnification(magnification);
     2623}
     2624
     2625- (double)magnification
     2626{
     2627    return _impl->magnification();
    19032628}
    19042629
    19052630- (void)setAllowsMagnification:(BOOL)allowsMagnification
    19062631{
    1907     [_wkView setAllowsMagnification:allowsMagnification];
     2632    _impl->setAllowsMagnification(allowsMagnification);
    19082633}
    19092634
    19102635- (BOOL)allowsMagnification
    19112636{
    1912     return [_wkView allowsMagnification];
    1913 }
    1914 
    1915 - (void)setMagnification:(CGFloat)magnification
    1916 {
    1917     [_wkView setMagnification:magnification];
    1918 }
    1919 
    1920 - (CGFloat)magnification
    1921 {
    1922     return [_wkView magnification];
    1923 }
    1924 
    1925 - (void)setMagnification:(CGFloat)magnification centeredAtPoint:(CGPoint)point
    1926 {
    1927     [_wkView setMagnification:magnification centeredAtPoint:NSPointFromCGPoint(point)];
    1928 }
    1929 
    1930 - (BOOL)_ignoresNonWheelEvents
    1931 {
    1932     return [_wkView _ignoresNonWheelEvents];
    1933 }
    1934 
    1935 - (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents
    1936 {
    1937     [_wkView _setIgnoresNonWheelEvents:ignoresNonWheelEvents];
    1938 }
    1939 
    1940 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
    1941 {
    1942     return [_wkView draggingEntered:sender];
    1943 }
    1944 
    1945 - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
    1946 {
    1947     return [_wkView draggingUpdated:sender];
    1948 }
    1949 
    1950 - (void)draggingExited:(id <NSDraggingInfo>)sender
    1951 {
    1952     [_wkView draggingExited:sender];
    1953 }
    1954 
    1955 - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
    1956 {
    1957     return [_wkView prepareForDragOperation:sender];
    1958 }
    1959 
    1960 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
    1961 {
    1962     return [_wkView performDragOperation:sender];
    1963 }
    1964 
    1965 - (CGSize)intrinsicContentSize
    1966 {
    1967     return _intrinsicContentSize;
    1968 }
    1969 
    1970 - (void)_setIntrinsicContentSize:(CGSize)intrinsicContentSize
    1971 {
    1972     // If the intrinsic content size is less than the minimum layout width, the content flowed to fit,
    1973     // so we can report that that dimension is flexible. If not, we need to report our intrinsic width
    1974     // so that autolayout will know to provide space for us.
    1975 
    1976     CGSize intrinsicContentSizeAcknowledgingFlexibleWidth = intrinsicContentSize;
    1977     if (intrinsicContentSize.width < _page->minimumLayoutSize().width())
    1978         intrinsicContentSizeAcknowledgingFlexibleWidth.width = NSViewNoInstrinsicMetric;
    1979 
    1980     _intrinsicContentSize = intrinsicContentSizeAcknowledgingFlexibleWidth;
    1981     [self invalidateIntrinsicContentSize];
     2637    return _impl->allowsMagnification();
     2638}
     2639
     2640- (void)magnifyWithEvent:(NSEvent *)event
     2641{
     2642    _impl->magnifyWithEvent(event);
     2643}
     2644
     2645#if ENABLE(MAC_GESTURE_EVENTS)
     2646- (void)rotateWithEvent:(NSEvent *)event
     2647{
     2648    _impl->rotateWithEvent(event);
     2649}
     2650#endif
     2651
     2652- (NSTextInputContext *)_web_superInputContext
     2653{
     2654    return [super inputContext];
     2655}
     2656
     2657- (void)_web_superQuickLookWithEvent:(NSEvent *)event
     2658{
     2659    [super quickLookWithEvent:event];
     2660}
     2661
     2662- (void)_web_superSwipeWithEvent:(NSEvent *)event
     2663{
     2664    [super swipeWithEvent:event];
     2665}
     2666
     2667- (void)_web_superMagnifyWithEvent:(NSEvent *)event
     2668{
     2669    [super magnifyWithEvent:event];
     2670}
     2671
     2672- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event
     2673{
     2674    [super smartMagnifyWithEvent:event];
     2675}
     2676
     2677- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag
     2678{
     2679    [super removeTrackingRect:tag];
     2680}
     2681
     2682- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute
     2683{
     2684#pragma clang diagnostic push
     2685#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     2686    return [super accessibilityAttributeValue:attribute];
     2687#pragma clang diagnostic pop
     2688}
     2689
     2690- (void)_web_superDoCommandBySelector:(SEL)selector
     2691{
     2692    [super doCommandBySelector:selector];
     2693}
     2694
     2695- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event
     2696{
     2697    return [super performKeyEquivalent:event];
     2698}
     2699
     2700- (void)_web_superKeyDown:(NSEvent *)event
     2701{
     2702    [super keyDown:event];
     2703}
     2704
     2705- (NSView *)_web_superHitTest:(NSPoint)point
     2706{
     2707    return [super hitTest:point];
     2708}
     2709
     2710- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
     2711{
     2712    return [self _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)userData];
     2713}
     2714
     2715// We don't expose these various bits of SPI like WKView does,
     2716// so have these internal methods just do the work (or do nothing):
     2717- (void)_web_prepareForImmediateActionAnimation
     2718{
     2719}
     2720
     2721- (void)_web_cancelImmediateActionAnimation
     2722{
     2723}
     2724
     2725- (void)_web_completeImmediateActionAnimation
     2726{
     2727}
     2728
     2729- (void)_web_didChangeContentSize:(NSSize)newSize
     2730{
     2731}
     2732
     2733- (void)_web_dismissContentRelativeChildWindows
     2734{
     2735    _impl->dismissContentRelativeChildWindowsFromViewOnly();
     2736}
     2737
     2738- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)withAnimation
     2739{
     2740    _impl->dismissContentRelativeChildWindowsWithAnimationFromViewOnly(withAnimation);
     2741}
     2742
     2743- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
     2744{
     2745    _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event);
    19822746}
    19832747
     
    19962760{
    19972761    _page->setEditable(editable);
    1998 #if !PLATFORM(IOS)
    1999     [_wkView _addFontPanelObserver];
     2762#if PLATFORM(MAC)
     2763    _impl->startObservingFontPanel();
    20002764#endif
    20012765}
     
    20032767- (_WKRemoteObjectRegistry *)_remoteObjectRegistry
    20042768{
     2769#if PLATFORM(MAC)
     2770    return _impl->remoteObjectRegistry();
     2771#else
    20052772    if (!_remoteObjectRegistry) {
    20062773        _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
     
    20092776
    20102777    return _remoteObjectRegistry.get();
     2778#endif
    20112779}
    20122780
     
    26193387{
    26203388#if PLATFORM(MAC)
    2621     switch ([_wkView _layoutMode]) {
     3389    switch (_impl->layoutMode()) {
    26223390    case kWKLayoutModeFixedSize:
    26233391        return _WKLayoutModeFixedSize;
     
    26543422        break;
    26553423    }
    2656     [_wkView _setLayoutMode:wkViewLayoutMode];
     3424    _impl->setLayoutMode(wkViewLayoutMode);
    26573425#else
    26583426    _page->setUseFixedLayout(layoutMode == _WKLayoutModeFixedSize || layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale);
     
    26783446{
    26793447#if PLATFORM(MAC)
    2680     [_wkView _setViewScale:viewScale];
     3448    _impl->setViewScale(viewScale);
    26813449#else
    26823450    if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale))
     
    31443912#pragma mark - OS X-specific methods
    31453913
     3914- (BOOL)_drawsTransparentBackground
     3915{
     3916    return _impl->drawsTransparentBackground();
     3917}
     3918
     3919- (void)_setDrawsTransparentBackground:(BOOL)drawsTransparentBackground
     3920{
     3921    _impl->setDrawsTransparentBackground(drawsTransparentBackground);
     3922}
     3923
     3924#if WK_API_ENABLED
     3925- (NSView *)_inspectorAttachmentView
     3926{
     3927    return _impl->inspectorAttachmentView();
     3928}
     3929
     3930- (void)_setInspectorAttachmentView:(NSView *)newView
     3931{
     3932    _impl->setInspectorAttachmentView(newView);
     3933}
     3934#endif
     3935
     3936- (BOOL)_windowOcclusionDetectionEnabled
     3937{
     3938    return _impl->windowOcclusionDetectionEnabled();
     3939}
     3940
     3941- (void)_setWindowOcclusionDetectionEnabled:(BOOL)enabled
     3942{
     3943    _impl->setWindowOcclusionDetectionEnabled(enabled);
     3944}
     3945
     3946- (void)_setOverrideDeviceScaleFactor:(CGFloat)deviceScaleFactor
     3947{
     3948    _impl->setOverrideDeviceScaleFactor(deviceScaleFactor);
     3949}
     3950
     3951- (CGFloat)_overrideDeviceScaleFactor
     3952{
     3953    return _impl->overrideDeviceScaleFactor();
     3954}
     3955
     3956- (void)_setTopContentInset:(CGFloat)contentInset
     3957{
     3958    return _impl->setTopContentInset(contentInset);
     3959}
     3960
     3961- (CGFloat)_topContentInset
     3962{
     3963    return _impl->topContentInset();
     3964}
     3965
    31463966- (NSColor *)_pageExtendedBackgroundColor
    31473967{
    3148     WebCore::Color color = _page->pageExtendedBackgroundColor();
    3149     if (!color.isValid())
    3150         return nil;
    3151 
    3152     return nsColor(color);
    3153 }
    3154 
    3155 - (BOOL)_drawsTransparentBackground
    3156 {
    3157     return _page->drawsTransparentBackground();
    3158 }
    3159 
    3160 - (void)_setDrawsTransparentBackground:(BOOL)drawsTransparentBackground
    3161 {
    3162     _page->setDrawsTransparentBackground(drawsTransparentBackground);
    3163 }
    3164 
    3165 - (void)_setOverrideDeviceScaleFactor:(CGFloat)deviceScaleFactor
    3166 {
    3167     [_wkView _setOverrideDeviceScaleFactor:deviceScaleFactor];
    3168 }
    3169 
    3170 - (CGFloat)_overrideDeviceScaleFactor
    3171 {
    3172     return [_wkView _overrideDeviceScaleFactor];
     3968    return _impl->pageExtendedBackgroundColor();
    31733969}
    31743970
     
    31783974}
    31793975
    3180 - (void)_setTopContentInset:(CGFloat)contentInset
    3181 {
    3182     [_wkView _setTopContentInset:contentInset];
    3183 }
    3184 
    3185 - (CGFloat)_topContentInset
    3186 {
    3187     return [_wkView _topContentInset];
    3188 }
    3189 
    3190 - (BOOL)_windowOcclusionDetectionEnabled
    3191 {
    3192     return [_wkView windowOcclusionDetectionEnabled];
    3193 }
    3194 
    3195 - (void)_setWindowOcclusionDetectionEnabled:(BOOL)flag
    3196 {
    3197     [_wkView setWindowOcclusionDetectionEnabled:flag];
    3198 }
    3199 
    32003976#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
    3201 
    32023977- (void)_setAutomaticallyAdjustsContentInsets:(BOOL)automaticallyAdjustsContentInsets
    32033978{
    3204     [_wkView _setAutomaticallyAdjustsContentInsets:automaticallyAdjustsContentInsets];
     3979    _impl->setAutomaticallyAdjustsContentInsets(automaticallyAdjustsContentInsets);
    32053980}
    32063981
    32073982- (BOOL)_automaticallyAdjustsContentInsets
    32083983{
    3209     return [_wkView _automaticallyAdjustsContentInsets];
    3210 }
    3211 
    3212 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     3984    return _impl->automaticallyAdjustsContentInsets();
     3985}
     3986#endif
    32133987
    32143988- (CGFloat)_minimumLayoutWidth
     
    32243998    _page->setMainFrameIsScrollable(!expandsToFit);
    32253999
    3226     [_wkView setShouldClipToVisibleRect:expandsToFit];
     4000    _impl->setClipsToVisibleRect(expandsToFit);
    32274001}
    32284002
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h

    r191644 r191907  
    112112@property (nonatomic, readonly) BOOL _allowsDoubleTapGestures;
    113113@property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
    114 #else
    115 @property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
    116 - (void)_setIntrinsicContentSize:(CGSize)intrinsicContentSize;
    117114#endif
    118115
  • trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm

    r191824 r191907  
    665665#endif // USE(ASYNC_NSTEXTINPUTCLIENT)
    666666
    667 - (NSTextInputContext *)_superInputContext
    668 {
    669     return [super inputContext];
    670 }
    671 
    672 - (void)_superQuickLookWithEvent:(NSEvent *)event
    673 {
    674     [super quickLookWithEvent:event];
    675 }
    676 
    677 - (void)_superSwipeWithEvent:(NSEvent *)event
    678 {
    679     [super swipeWithEvent:event];
    680 }
    681 
    682 - (void)_superMagnifyWithEvent:(NSEvent *)event
    683 {
    684     [super magnifyWithEvent:event];
    685 }
    686 
    687 - (void)_superSmartMagnifyWithEvent:(NSEvent *)event
    688 {
    689     [super smartMagnifyWithEvent:event];
    690 }
    691 
    692 - (void)_superRemoveTrackingRect:(NSTrackingRectTag)tag
    693 {
    694     [super removeTrackingRect:tag];
    695 }
    696 
    697 - (id)_superAccessibilityAttributeValue:(NSString *)attribute
    698 {
    699 #pragma clang diagnostic push
    700 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
    701     return [super accessibilityAttributeValue:attribute];
    702 #pragma clang diagnostic pop
    703 }
    704 
    705 - (void)_superDoCommandBySelector:(SEL)selector
    706 {
    707     [super doCommandBySelector:selector];
    708 }
    709 
    710 - (BOOL)_superPerformKeyEquivalent:(NSEvent *)event
    711 {
    712     return [super performKeyEquivalent:event];
    713 }
    714 
    715 - (void)_superKeyDown:(NSEvent *)event
    716 {
    717     [super keyDown:event];
    718 }
    719 
    720 - (NSView *)_superHitTest:(NSPoint)point
    721 {
    722     return [super hitTest:point];
    723 }
    724 
    725667- (NSArray *)validAttributesForMarkedText
    726668{
     
    768710{
    769711    return _data->_impl->windowResizeMouseLocationIsInVisibleScrollerThumb(NSPointToCGPoint(point));
    770 }
    771 
    772 - (void)_addFontPanelObserver
    773 {
    774     _data->_impl->startObservingFontPanel();
    775712}
    776713
     
    937874}
    938875#endif // WK_API_ENABLED
     876
     877- (NSTextInputContext *)_web_superInputContext
     878{
     879    return [super inputContext];
     880}
     881
     882- (void)_web_superQuickLookWithEvent:(NSEvent *)event
     883{
     884    [super quickLookWithEvent:event];
     885}
     886
     887- (void)_web_superSwipeWithEvent:(NSEvent *)event
     888{
     889    [super swipeWithEvent:event];
     890}
     891
     892- (void)_web_superMagnifyWithEvent:(NSEvent *)event
     893{
     894    [super magnifyWithEvent:event];
     895}
     896
     897- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event
     898{
     899    [super smartMagnifyWithEvent:event];
     900}
     901
     902- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag
     903{
     904    [super removeTrackingRect:tag];
     905}
     906
     907- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute
     908{
     909#pragma clang diagnostic push
     910#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     911    return [super accessibilityAttributeValue:attribute];
     912#pragma clang diagnostic pop
     913}
     914
     915- (void)_web_superDoCommandBySelector:(SEL)selector
     916{
     917    [super doCommandBySelector:selector];
     918}
     919
     920- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event
     921{
     922    return [super performKeyEquivalent:event];
     923}
     924
     925- (void)_web_superKeyDown:(NSEvent *)event
     926{
     927    [super keyDown:event];
     928}
     929
     930- (NSView *)_web_superHitTest:(NSPoint)point
     931{
     932    return [super hitTest:point];
     933}
     934
     935- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
     936{
     937    return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];
     938}
     939
     940- (void)_web_prepareForImmediateActionAnimation
     941{
     942    [self _prepareForImmediateActionAnimation];
     943}
     944
     945- (void)_web_cancelImmediateActionAnimation
     946{
     947    [self _cancelImmediateActionAnimation];
     948}
     949
     950- (void)_web_completeImmediateActionAnimation
     951{
     952    [self _completeImmediateActionAnimation];
     953}
     954
     955- (void)_web_didChangeContentSize:(NSSize)newSize
     956{
     957    [self _didChangeContentSize:newSize];
     958}
     959
     960- (void)_web_dismissContentRelativeChildWindows
     961{
     962    [self _dismissContentRelativeChildWindows];
     963}
     964
     965- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)withAnimation
     966{
     967    [self _dismissContentRelativeChildWindowsWithAnimation:withAnimation];
     968}
     969
     970- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event
     971{
     972    [self _gestureEventWasNotHandledByWebCore:event];
     973}
    939974
    940975@end
     
    13601395}
    13611396
    1362 - (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
    1363 {
    1364     return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];
    1365 }
    1366 
    13671397- (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(uint32_t)type userData:(WKTypeRef)userData
    13681398{
  • trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h

    r191791 r191907  
    5151#endif
    5252
    53 - (void)_addFontPanelObserver;
    54 
    5553@end
    5654
  • trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h

    r191824 r191907  
    5353@protocol WebViewImplDelegate
    5454
    55 - (NSTextInputContext *)_superInputContext;
    56 - (void)_superQuickLookWithEvent:(NSEvent *)event;
    57 - (void)_superRemoveTrackingRect:(NSTrackingRectTag)tag;
    58 - (void)_superSwipeWithEvent:(NSEvent *)event;
    59 - (void)_superMagnifyWithEvent:(NSEvent *)event;
    60 - (void)_superSmartMagnifyWithEvent:(NSEvent *)event;
    61 - (id)_superAccessibilityAttributeValue:(NSString *)attribute;
    62 - (void)_superDoCommandBySelector:(SEL)selector;
    63 - (BOOL)_superPerformKeyEquivalent:(NSEvent *)event;
    64 - (void)_superKeyDown:(NSEvent *)event;
    65 - (NSView *)_superHitTest:(NSPoint)point;
    66 
    67 // This is a hack; these things live can live on a category (e.g. WKView (Private)) but WKView itself conforms to this protocol.
    68 // They're not actually optional.
    69 @optional
     55- (NSTextInputContext *)_web_superInputContext;
     56- (void)_web_superQuickLookWithEvent:(NSEvent *)event;
     57- (void)_web_superRemoveTrackingRect:(NSTrackingRectTag)tag;
     58- (void)_web_superSwipeWithEvent:(NSEvent *)event;
     59- (void)_web_superMagnifyWithEvent:(NSEvent *)event;
     60- (void)_web_superSmartMagnifyWithEvent:(NSEvent *)event;
     61- (id)_web_superAccessibilityAttributeValue:(NSString *)attribute;
     62- (void)_web_superDoCommandBySelector:(SEL)selector;
     63- (BOOL)_web_superPerformKeyEquivalent:(NSEvent *)event;
     64- (void)_web_superKeyDown:(NSEvent *)event;
     65- (NSView *)_web_superHitTest:(NSPoint)point;
    7066
    7167- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData;
    72 
    73 - (void)_prepareForImmediateActionAnimation;
    74 - (void)_cancelImmediateActionAnimation;
    75 - (void)_completeImmediateActionAnimation;
    76 - (void)_dismissContentRelativeChildWindows;
    77 - (void)_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
    78 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
    79 - (void)_didChangeContentSize:(NSSize)newSize;
     68- (void)_web_prepareForImmediateActionAnimation;
     69- (void)_web_cancelImmediateActionAnimation;
     70- (void)_web_completeImmediateActionAnimation;
     71
     72- (void)_web_dismissContentRelativeChildWindows;
     73- (void)_web_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
     74
     75- (void)_web_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
     76
     77- (void)_web_didChangeContentSize:(NSSize)newSize;
    8078
    8179@end
  • trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm

    r191824 r191907  
    12751275NSView *WebViewImpl::hitTest(CGPoint point)
    12761276{
    1277     NSView *hitView = [m_view _superHitTest:NSPointFromCGPoint(point)];
     1277    NSView *hitView = [m_view _web_superHitTest:NSPointFromCGPoint(point)];
    12781278    if (hitView && hitView == m_layerHostingView)
    12791279        hitView = m_view;
     
    14181418    }
    14191419    // WKView has a single input context for all editable areas (except for plug-ins).
    1420     NSTextInputContext *context = [m_view _superInputContext];
     1420    NSTextInputContext *context = [m_view _web_superInputContext];
    14211421    bool isInPasswordField = m_page->editorState().isInPasswordField;
    14221422
     
    14541454    LOG(TextInput, "-> discardMarkedText");
    14551455
    1456     [[m_view _superInputContext] discardMarkedText]; // Inform the input method that we won't have an inline input area despite having been asked to.
     1456    [[m_view _web_superInputContext] discardMarkedText]; // Inform the input method that we won't have an inline input area despite having been asked to.
    14571457}
    14581458
     
    17011701    // 2) prevents any NSBeep; we don't ever want to beep here.
    17021702    RetainPtr<WKResponderChainSink> sink = adoptNS([[WKResponderChainSink alloc] initWithResponderChain:m_view]);
    1703     [m_view _superDoCommandBySelector:selector];
     1703    [m_view _web_superDoCommandBySelector:selector];
    17041704    [sink detach];
    17051705    return ![sink didReceiveUnhandledCommand];
     
    21822182void WebViewImpl::dismissContentRelativeChildWindowsWithAnimation(bool animate)
    21832183{
    2184     [m_view _dismissContentRelativeChildWindowsWithAnimation:animate];
     2184    [m_view _web_dismissContentRelativeChildWindowsWithAnimation:animate];
    21852185}
    21862186
     
    21912191    // For this same reason, this can't be moved to WebViewImpl without care.
    21922192    clearTextIndicatorWithAnimation(animate ? WebCore::TextIndicatorWindowDismissalAnimation::FadeOut : WebCore::TextIndicatorWindowDismissalAnimation::None);
    2193     [m_view _dismissContentRelativeChildWindows];
     2193    [m_view _web_dismissContentRelativeChildWindows];
    21942194}
    21952195
     
    22332233#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
    22342234    if (m_immediateActionGestureRecognizer) {
    2235         [m_view _superQuickLookWithEvent:event];
     2235        [m_view _web_superQuickLookWithEvent:event];
    22362236        return;
    22372237    }
     
    22812281void WebViewImpl::prepareForImmediateActionAnimation()
    22822282{
    2283     [m_view _prepareForImmediateActionAnimation];
     2283    [m_view _web_prepareForImmediateActionAnimation];
    22842284}
    22852285
    22862286void WebViewImpl::cancelImmediateActionAnimation()
    22872287{
    2288     [m_view _cancelImmediateActionAnimation];
     2288    [m_view _web_cancelImmediateActionAnimation];
    22892289}
    22902290
    22912291void WebViewImpl::completeImmediateActionAnimation()
    22922292{
    2293     [m_view _completeImmediateActionAnimation];
     2293    [m_view _web_completeImmediateActionAnimation];
    22942294}
    22952295
    22962296void WebViewImpl::didChangeContentSize(CGSize newSize)
    22972297{
    2298     [m_view _didChangeContentSize:NSSizeFromCGSize(newSize)];
     2298    [m_view _web_didChangeContentSize:NSSizeFromCGSize(newSize)];
    22992299}
    23002300
     
    24052405                return @YES;
    24062406   
    2407     return [m_view _superAccessibilityAttributeValue:attribute];
     2407    return [m_view _web_superAccessibilityAttributeValue:attribute];
    24082408}
    24092409
     
    24562456
    24572457    if (tag == m_lastToolTipTag) {
    2458         [m_view _superRemoveTrackingRect:tag];
     2458        [m_view _web_superRemoveTrackingRect:tag];
    24592459        m_lastToolTipTag = 0;
    24602460        return;
     
    31403140
    31413141    if (!m_allowsBackForwardNavigationGestures) {
    3142         [m_view _superSwipeWithEvent:event];
     3142        [m_view _web_superSwipeWithEvent:event];
    31433143        return;
    31443144    }
     
    31493149        m_page->goForward();
    31503150    else
    3151         [m_view _superSwipeWithEvent:event];
     3151        [m_view _web_superSwipeWithEvent:event];
    31523152}
    31533153
     
    31593159        m_page->handleGestureEvent(webEvent);
    31603160#endif
    3161         [m_view _superMagnifyWithEvent:event];
     3161        [m_view _web_superMagnifyWithEvent:event];
    31623162        return;
    31633163    }
     
    31833183{
    31843184    if (!m_allowsMagnification) {
    3185         [m_view _superSmartMagnifyWithEvent:event];
     3185        [m_view _web_superSmartMagnifyWithEvent:event];
    31863186        return;
    31873187    }
     
    32123212void WebViewImpl::gestureEventWasNotHandledByWebCore(NSEvent *event)
    32133213{
    3214     [m_view _gestureEventWasNotHandledByWebCore:event];
     3214    [m_view _web_gestureEventWasNotHandledByWebCore:event];
    32153215}
    32163216
     
    33613361        // FIXME: Send the command to Editor synchronously and only send it along the
    33623362        // responder chain if it's a selector that does not correspond to an editing command.
    3363         [m_view _superDoCommandBySelector:selector];
     3363        [m_view _web_superDoCommandBySelector:selector];
    33643364    }
    33653365}
     
    35773577        return nil;
    35783578
    3579     return [m_view _superInputContext];
     3579    return [m_view _web_superInputContext];
    35803580}
    35813581
     
    36723672    // Don't interpret this event again, avoiding re-entrancy and infinite loops.
    36733673    if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask))
    3674         return [m_view _superPerformKeyEquivalent:event];
     3674        return [m_view _web_superPerformKeyEquivalent:event];
    36753675
    36763676    if (m_keyDownEventBeingResent) {
     
    36783678        // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit
    36793679        // first performs the original key equivalent, and if that isn't handled, it dispatches a synthetic Cmd+'+'.
    3680         return [m_view _superPerformKeyEquivalent:event];
     3680        return [m_view _web_superPerformKeyEquivalent:event];
    36813681    }
    36823682
     
    36953695    }
    36963696   
    3697     return [m_view _superPerformKeyEquivalent:event];
     3697    return [m_view _web_superPerformKeyEquivalent:event];
    36983698}
    36993699
     
    37283728    // If this is the case we should ignore the key down.
    37293729    if (m_keyDownEventBeingResent == event) {
    3730         [m_view _superKeyDown:event];
     3730        [m_view _web_superKeyDown:event];
    37313731        return;
    37323732    }
     
    38323832        // FIXME: Send the command to Editor synchronously and only send it along the
    38333833        // responder chain if it's a selector that does not correspond to an editing command.
    3834         [m_view _superDoCommandBySelector:selector];
     3834        [m_view _web_superDoCommandBySelector:selector];
    38353835    }
    38363836}
     
    39093909        return nil;
    39103910
    3911     return [m_view _superInputContext];
     3911    return [m_view _web_superInputContext];
    39123912}
    39133913
     
    41114111    // Don't interpret this event again, avoiding re-entrancy and infinite loops.
    41124112    if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask))
    4113         return [m_view _superPerformKeyEquivalent:event];
     4113        return [m_view _web_superPerformKeyEquivalent:event];
    41144114
    41154115    if (m_keyDownEventBeingResent) {
     
    41174117        // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit
    41184118        // first performs the original key equivalent, and if that isn't handled, it dispatches a synthetic Cmd+'+'.
    4119         return [m_view _superPerformKeyEquivalent:event];
     4119        return [m_view _web_superPerformKeyEquivalent:event];
    41204120    }
    41214121
     
    41344134    }
    41354135   
    4136     return [m_view _superPerformKeyEquivalent:event];
     4136    return [m_view _web_superPerformKeyEquivalent:event];
    41374137}
    41384138
     
    41694169    // If this is the case we should ignore the key down.
    41704170    if (m_keyDownEventBeingResent == event) {
    4171         [m_view _superKeyDown:event];
     4171        [m_view _web_superKeyDown:event];
    41724172        return;
    41734173    }
  • trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm

    r191824 r191907  
    359359    [dragNSImage setSize:size];
    360360
    361 #if WK_API_ENABLED
    362     if (m_webView) {
    363         NSPoint webViewPosition = [m_view convertPoint:clientPosition toView:m_webView];
    364         m_impl->dragImageForView(m_webView, dragNSImage.get(), webViewPosition, isLinkDrag);
    365     } else
    366 #endif
    367         m_impl->dragImageForView(m_view, dragNSImage.get(), clientPosition, isLinkDrag);
     361    m_impl->dragImageForView(m_view, dragNSImage.get(), clientPosition, isLinkDrag);
    368362}
    369363
     
    606600void PageClientImpl::intrinsicContentSizeDidChange(const IntSize& intrinsicContentSize)
    607601{
    608 #if WK_API_ENABLED
    609     if (m_webView) {
    610         [m_webView _setIntrinsicContentSize:intrinsicContentSize];
    611         return;
    612     }
    613 #endif
    614 
    615602    m_impl->setIntrinsicContentSize(intrinsicContentSize);
    616603}
     
    799786void* PageClientImpl::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData)
    800787{
    801 #if WK_API_ENABLED
    802     if (m_webView)
    803         return [m_webView _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)(userData.get())];
    804 #endif
    805788    return m_impl->immediateActionAnimationControllerForHitTestResult(hitTestResult.get(), type, userData.get());
    806789}
  • trunk/Tools/ChangeLog

    r191900 r191907  
     12015-11-02  Tim Horton  <timothy_horton@apple.com>
     2
     3        Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
     4        https://bugs.webkit.org/show_bug.cgi?id=150174
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebKitTestRunner/mac/EventSenderProxy.mm:
     9        (WTR::EventSenderProxy::mouseUp):
     10        (WTR::EventSenderProxy::mouseMoveTo):
     11        Revert some parts of r188828 which no longer apply.
     12
    1132015-10-30  Dana Burkart  <dburkart@apple.com>
    214
  • trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm

    r190065 r191907  
    349349    // The right solution is just to use NSApplication's built-in event sending methods,
    350350    // instead of rolling our own algorithm for selecting an event target.
    351     // FIXME: This is even worse now, because we need to hit the WKWebView's inner WKView
    352     // when using the modern API, so the level of fakery and horror increases.
    353     if (!targetView) {
     351    if (!targetView)
    354352        targetView = m_testController->mainWebView()->platformView();
    355         for (NSView *wkWebViewChild in targetView.subviews) {
    356             if ([wkWebViewChild isKindOfClass:[WKView class]]) {
    357                 targetView = wkWebViewChild;
    358                 break;
    359             }
    360         }
    361     }
     353
    362354    ASSERT(targetView);
    363355    [NSApp _setCurrentEvent:event];
     
    623615{
    624616    NSView *view = m_testController->mainWebView()->platformView();
    625     NSPoint position = [view convertPoint:NSMakePoint(x, view.frame.size.height - y) toView:nil];
     617    NSPoint position = [view convertPoint:NSMakePoint(x, y) toView:nil];
    626618    m_position.x = position.x;
    627619    m_position.y = position.y;
Note: See TracChangeset for help on using the changeset viewer.