Changeset 191907 in webkit
- Timestamp:
- Nov 2, 2015, 1:15:06 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
Source/WebKit2/ChangeLog (modified) (1 diff)
-
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (modified) (21 diffs)
-
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (modified) (1 diff)
-
Source/WebKit2/UIProcess/API/mac/WKView.mm (modified) (4 diffs)
-
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (modified) (1 diff)
-
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (modified) (1 diff)
-
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (modified) (27 diffs)
-
Source/WebKit2/UIProcess/mac/PageClientImpl.mm (modified) (3 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/mac/EventSenderProxy.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r191906 r191907 1 2015-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 1 248 2015-11-02 Anders Carlsson <andersca@apple.com> 2 249 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r191904 r191907 73 73 #import "WebProcessPool.h" 74 74 #import "WebProcessProxy.h" 75 #import "WebViewImpl.h" 75 76 #import "_WKDiagnosticLoggingDelegate.h" 76 77 #import "_WKFindDelegate.h" 77 78 #import "_WKFormDelegate.h" 79 #import "_WKHitTestResultInternal.h" 78 80 #import "_WKInputDelegate.h" 79 81 #import "_WKRemoteObjectRegistryInternal.h" … … 145 147 #import "WKViewInternal.h" 146 148 #import <WebCore/ColorMac.h> 149 150 @interface WKWebView () <WebViewImplDelegate> 151 @end 147 152 #endif 148 153 … … 162 167 std::unique_ptr<WebKit::UIDelegate> _uiDelegate; 163 168 169 _WKRenderingProgressEvents _observedRenderingProgressEvents; 170 171 WebKit::WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate; 172 173 #if PLATFORM(IOS) 164 174 RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry; 165 _WKRenderingProgressEvents _observedRenderingProgressEvents; 166 167 WebKit::WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate; 168 169 #if PLATFORM(IOS) 175 170 176 RetainPtr<WKScrollView> _scrollView; 171 177 RetainPtr<WKContentView> _contentView; … … 229 235 #endif 230 236 #if PLATFORM(MAC) 231 RetainPtr<WKView> _wkView; 232 CGSize _intrinsicContentSize; 237 std::unique_ptr<WebKit::WebViewImpl> _impl; 233 238 #endif 234 239 } … … 309 314 [_configuration _validate]; 310 315 311 CGRect bounds = self.bounds;312 316 313 317 WebKit::WebProcessPool& processPool = *[_configuration processPool]->_processPool; … … 348 352 349 353 #if PLATFORM(IOS) 354 CGRect bounds = self.bounds; 350 355 _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]); 351 356 [_scrollView setInternalDelegate:self]; … … 384 389 385 390 #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(); 391 393 392 394 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 393 [_wkView _setAutomaticallyAdjustsContentInsets:YES];395 _impl->setAutomaticallyAdjustsContentInsets(true); 394 396 #endif 395 397 #endif … … 418 420 - (void)dealloc 419 421 { 422 #if PLATFORM(IOS) 420 423 if (_remoteObjectRegistry) 421 424 _page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID()); … … 424 427 425 428 [_remoteObjectRegistry _invalidate]; 426 #if PLATFORM(IOS)427 429 [[_configuration _contentProviderRegistry] removePage:*_page]; 428 430 [[NSNotificationCenter defaultCenter] removeObserver:self]; … … 698 700 { 699 701 #if PLATFORM(MAC) 700 return [_wkView allowsLinkPreview];702 return _impl->allowsLinkPreview(); 701 703 #elif PLATFORM(IOS) 702 704 return _allowsLinkPreview; … … 707 709 { 708 710 #if PLATFORM(MAC) 709 [_wkView setAllowsLinkPreview:allowsLinkPreview];711 _impl->setAllowsLinkPreview(allowsLinkPreview); 710 712 return; 711 713 #elif PLATFORM(IOS) … … 1878 1880 #if PLATFORM(MAC) 1879 1881 1882 - (BOOL)acceptsFirstResponder 1883 { 1884 return _impl->acceptsFirstResponder(); 1885 } 1886 1880 1887 - (BOOL)becomeFirstResponder 1881 1888 { 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 1936 WEBCORE_COMMAND(alignCenter) 1937 WEBCORE_COMMAND(alignJustified) 1938 WEBCORE_COMMAND(alignLeft) 1939 WEBCORE_COMMAND(alignRight) 1940 WEBCORE_COMMAND(copy) 1941 WEBCORE_COMMAND(cut) 1942 WEBCORE_COMMAND(delete) 1943 WEBCORE_COMMAND(deleteBackward) 1944 WEBCORE_COMMAND(deleteBackwardByDecomposingPreviousCharacter) 1945 WEBCORE_COMMAND(deleteForward) 1946 WEBCORE_COMMAND(deleteToBeginningOfLine) 1947 WEBCORE_COMMAND(deleteToBeginningOfParagraph) 1948 WEBCORE_COMMAND(deleteToEndOfLine) 1949 WEBCORE_COMMAND(deleteToEndOfParagraph) 1950 WEBCORE_COMMAND(deleteToMark) 1951 WEBCORE_COMMAND(deleteWordBackward) 1952 WEBCORE_COMMAND(deleteWordForward) 1953 WEBCORE_COMMAND(ignoreSpelling) 1954 WEBCORE_COMMAND(indent) 1955 WEBCORE_COMMAND(insertBacktab) 1956 WEBCORE_COMMAND(insertLineBreak) 1957 WEBCORE_COMMAND(insertNewline) 1958 WEBCORE_COMMAND(insertNewlineIgnoringFieldEditor) 1959 WEBCORE_COMMAND(insertParagraphSeparator) 1960 WEBCORE_COMMAND(insertTab) 1961 WEBCORE_COMMAND(insertTabIgnoringFieldEditor) 1962 WEBCORE_COMMAND(makeTextWritingDirectionLeftToRight) 1963 WEBCORE_COMMAND(makeTextWritingDirectionNatural) 1964 WEBCORE_COMMAND(makeTextWritingDirectionRightToLeft) 1965 WEBCORE_COMMAND(moveBackward) 1966 WEBCORE_COMMAND(moveBackwardAndModifySelection) 1967 WEBCORE_COMMAND(moveDown) 1968 WEBCORE_COMMAND(moveDownAndModifySelection) 1969 WEBCORE_COMMAND(moveForward) 1970 WEBCORE_COMMAND(moveForwardAndModifySelection) 1971 WEBCORE_COMMAND(moveLeft) 1972 WEBCORE_COMMAND(moveLeftAndModifySelection) 1973 WEBCORE_COMMAND(moveParagraphBackwardAndModifySelection) 1974 WEBCORE_COMMAND(moveParagraphForwardAndModifySelection) 1975 WEBCORE_COMMAND(moveRight) 1976 WEBCORE_COMMAND(moveRightAndModifySelection) 1977 WEBCORE_COMMAND(moveToBeginningOfDocument) 1978 WEBCORE_COMMAND(moveToBeginningOfDocumentAndModifySelection) 1979 WEBCORE_COMMAND(moveToBeginningOfLine) 1980 WEBCORE_COMMAND(moveToBeginningOfLineAndModifySelection) 1981 WEBCORE_COMMAND(moveToBeginningOfParagraph) 1982 WEBCORE_COMMAND(moveToBeginningOfParagraphAndModifySelection) 1983 WEBCORE_COMMAND(moveToBeginningOfSentence) 1984 WEBCORE_COMMAND(moveToBeginningOfSentenceAndModifySelection) 1985 WEBCORE_COMMAND(moveToEndOfDocument) 1986 WEBCORE_COMMAND(moveToEndOfDocumentAndModifySelection) 1987 WEBCORE_COMMAND(moveToEndOfLine) 1988 WEBCORE_COMMAND(moveToEndOfLineAndModifySelection) 1989 WEBCORE_COMMAND(moveToEndOfParagraph) 1990 WEBCORE_COMMAND(moveToEndOfParagraphAndModifySelection) 1991 WEBCORE_COMMAND(moveToEndOfSentence) 1992 WEBCORE_COMMAND(moveToEndOfSentenceAndModifySelection) 1993 WEBCORE_COMMAND(moveToLeftEndOfLine) 1994 WEBCORE_COMMAND(moveToLeftEndOfLineAndModifySelection) 1995 WEBCORE_COMMAND(moveToRightEndOfLine) 1996 WEBCORE_COMMAND(moveToRightEndOfLineAndModifySelection) 1997 WEBCORE_COMMAND(moveUp) 1998 WEBCORE_COMMAND(moveUpAndModifySelection) 1999 WEBCORE_COMMAND(moveWordBackward) 2000 WEBCORE_COMMAND(moveWordBackwardAndModifySelection) 2001 WEBCORE_COMMAND(moveWordForward) 2002 WEBCORE_COMMAND(moveWordForwardAndModifySelection) 2003 WEBCORE_COMMAND(moveWordLeft) 2004 WEBCORE_COMMAND(moveWordLeftAndModifySelection) 2005 WEBCORE_COMMAND(moveWordRight) 2006 WEBCORE_COMMAND(moveWordRightAndModifySelection) 2007 WEBCORE_COMMAND(outdent) 2008 WEBCORE_COMMAND(pageDown) 2009 WEBCORE_COMMAND(pageDownAndModifySelection) 2010 WEBCORE_COMMAND(pageUp) 2011 WEBCORE_COMMAND(pageUpAndModifySelection) 2012 WEBCORE_COMMAND(paste) 2013 WEBCORE_COMMAND(pasteAsPlainText) 2014 WEBCORE_COMMAND(scrollPageDown) 2015 WEBCORE_COMMAND(scrollPageUp) 2016 WEBCORE_COMMAND(scrollLineDown) 2017 WEBCORE_COMMAND(scrollLineUp) 2018 WEBCORE_COMMAND(scrollToBeginningOfDocument) 2019 WEBCORE_COMMAND(scrollToEndOfDocument) 2020 WEBCORE_COMMAND(selectAll) 2021 WEBCORE_COMMAND(selectLine) 2022 WEBCORE_COMMAND(selectParagraph) 2023 WEBCORE_COMMAND(selectSentence) 2024 WEBCORE_COMMAND(selectToMark) 2025 WEBCORE_COMMAND(selectWord) 2026 WEBCORE_COMMAND(setMark) 2027 WEBCORE_COMMAND(subscript) 2028 WEBCORE_COMMAND(superscript) 2029 WEBCORE_COMMAND(swapWithMark) 2030 WEBCORE_COMMAND(takeFindStringFromSelection) 2031 WEBCORE_COMMAND(transpose) 2032 WEBCORE_COMMAND(underline) 2033 WEBCORE_COMMAND(unscript) 2034 WEBCORE_COMMAND(yank) 2035 WEBCORE_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(); 1893 2598 } 1894 2599 1895 2600 - (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures 1896 2601 { 1897 [_wkView setAllowsBackForwardNavigationGestures:allowsBackForwardNavigationGestures];2602 _impl->setAllowsBackForwardNavigationGestures(allowsBackForwardNavigationGestures); 1898 2603 } 1899 2604 1900 2605 - (BOOL)allowsBackForwardNavigationGestures 1901 2606 { 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(); 1903 2628 } 1904 2629 1905 2630 - (void)setAllowsMagnification:(BOOL)allowsMagnification 1906 2631 { 1907 [_wkView setAllowsMagnification:allowsMagnification];2632 _impl->setAllowsMagnification(allowsMagnification); 1908 2633 } 1909 2634 1910 2635 - (BOOL)allowsMagnification 1911 2636 { 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); 1982 2746 } 1983 2747 … … 1996 2760 { 1997 2761 _page->setEditable(editable); 1998 #if !PLATFORM(IOS)1999 [_wkView _addFontPanelObserver];2762 #if PLATFORM(MAC) 2763 _impl->startObservingFontPanel(); 2000 2764 #endif 2001 2765 } … … 2003 2767 - (_WKRemoteObjectRegistry *)_remoteObjectRegistry 2004 2768 { 2769 #if PLATFORM(MAC) 2770 return _impl->remoteObjectRegistry(); 2771 #else 2005 2772 if (!_remoteObjectRegistry) { 2006 2773 _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]); … … 2009 2776 2010 2777 return _remoteObjectRegistry.get(); 2778 #endif 2011 2779 } 2012 2780 … … 2619 3387 { 2620 3388 #if PLATFORM(MAC) 2621 switch ( [_wkView _layoutMode]) {3389 switch (_impl->layoutMode()) { 2622 3390 case kWKLayoutModeFixedSize: 2623 3391 return _WKLayoutModeFixedSize; … … 2654 3422 break; 2655 3423 } 2656 [_wkView _setLayoutMode:wkViewLayoutMode];3424 _impl->setLayoutMode(wkViewLayoutMode); 2657 3425 #else 2658 3426 _page->setUseFixedLayout(layoutMode == _WKLayoutModeFixedSize || layoutMode == _WKLayoutModeDynamicSizeComputedFromViewScale); … … 2678 3446 { 2679 3447 #if PLATFORM(MAC) 2680 [_wkView _setViewScale:viewScale];3448 _impl->setViewScale(viewScale); 2681 3449 #else 2682 3450 if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale)) … … 3144 3912 #pragma mark - OS X-specific methods 3145 3913 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 3146 3966 - (NSColor *)_pageExtendedBackgroundColor 3147 3967 { 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(); 3173 3969 } 3174 3970 … … 3178 3974 } 3179 3975 3180 - (void)_setTopContentInset:(CGFloat)contentInset3181 {3182 [_wkView _setTopContentInset:contentInset];3183 }3184 3185 - (CGFloat)_topContentInset3186 {3187 return [_wkView _topContentInset];3188 }3189 3190 - (BOOL)_windowOcclusionDetectionEnabled3191 {3192 return [_wkView windowOcclusionDetectionEnabled];3193 }3194 3195 - (void)_setWindowOcclusionDetectionEnabled:(BOOL)flag3196 {3197 [_wkView setWindowOcclusionDetectionEnabled:flag];3198 }3199 3200 3976 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 3201 3202 3977 - (void)_setAutomaticallyAdjustsContentInsets:(BOOL)automaticallyAdjustsContentInsets 3203 3978 { 3204 [_wkView _setAutomaticallyAdjustsContentInsets:automaticallyAdjustsContentInsets];3979 _impl->setAutomaticallyAdjustsContentInsets(automaticallyAdjustsContentInsets); 3205 3980 } 3206 3981 3207 3982 - (BOOL)_automaticallyAdjustsContentInsets 3208 3983 { 3209 return [_wkView _automaticallyAdjustsContentInsets]; 3210 } 3211 3212 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 3984 return _impl->automaticallyAdjustsContentInsets(); 3985 } 3986 #endif 3213 3987 3214 3988 - (CGFloat)_minimumLayoutWidth … … 3224 3998 _page->setMainFrameIsScrollable(!expandsToFit); 3225 3999 3226 [_wkView setShouldClipToVisibleRect:expandsToFit];4000 _impl->setClipsToVisibleRect(expandsToFit); 3227 4001 } 3228 4002 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
r191644 r191907 112 112 @property (nonatomic, readonly) BOOL _allowsDoubleTapGestures; 113 113 @property (nonatomic, readonly) UIEdgeInsets _computedContentInset; 114 #else115 @property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;116 - (void)_setIntrinsicContentSize:(CGSize)intrinsicContentSize;117 114 #endif 118 115 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r191824 r191907 665 665 #endif // USE(ASYNC_NSTEXTINPUTCLIENT) 666 666 667 - (NSTextInputContext *)_superInputContext668 {669 return [super inputContext];670 }671 672 - (void)_superQuickLookWithEvent:(NSEvent *)event673 {674 [super quickLookWithEvent:event];675 }676 677 - (void)_superSwipeWithEvent:(NSEvent *)event678 {679 [super swipeWithEvent:event];680 }681 682 - (void)_superMagnifyWithEvent:(NSEvent *)event683 {684 [super magnifyWithEvent:event];685 }686 687 - (void)_superSmartMagnifyWithEvent:(NSEvent *)event688 {689 [super smartMagnifyWithEvent:event];690 }691 692 - (void)_superRemoveTrackingRect:(NSTrackingRectTag)tag693 {694 [super removeTrackingRect:tag];695 }696 697 - (id)_superAccessibilityAttributeValue:(NSString *)attribute698 {699 #pragma clang diagnostic push700 #pragma clang diagnostic ignored "-Wdeprecated-declarations"701 return [super accessibilityAttributeValue:attribute];702 #pragma clang diagnostic pop703 }704 705 - (void)_superDoCommandBySelector:(SEL)selector706 {707 [super doCommandBySelector:selector];708 }709 710 - (BOOL)_superPerformKeyEquivalent:(NSEvent *)event711 {712 return [super performKeyEquivalent:event];713 }714 715 - (void)_superKeyDown:(NSEvent *)event716 {717 [super keyDown:event];718 }719 720 - (NSView *)_superHitTest:(NSPoint)point721 {722 return [super hitTest:point];723 }724 725 667 - (NSArray *)validAttributesForMarkedText 726 668 { … … 768 710 { 769 711 return _data->_impl->windowResizeMouseLocationIsInVisibleScrollerThumb(NSPointToCGPoint(point)); 770 }771 772 - (void)_addFontPanelObserver773 {774 _data->_impl->startObservingFontPanel();775 712 } 776 713 … … 937 874 } 938 875 #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 } 939 974 940 975 @end … … 1360 1395 } 1361 1396 1362 - (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData1363 {1364 return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];1365 }1366 1367 1397 - (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(uint32_t)type userData:(WKTypeRef)userData 1368 1398 { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r191791 r191907 51 51 #endif 52 52 53 - (void)_addFontPanelObserver;54 55 53 @end 56 54 -
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
r191824 r191907 53 53 @protocol WebViewImplDelegate 54 54 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; 70 66 71 67 - (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; 80 78 81 79 @end -
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
r191824 r191907 1275 1275 NSView *WebViewImpl::hitTest(CGPoint point) 1276 1276 { 1277 NSView *hitView = [m_view _ superHitTest:NSPointFromCGPoint(point)];1277 NSView *hitView = [m_view _web_superHitTest:NSPointFromCGPoint(point)]; 1278 1278 if (hitView && hitView == m_layerHostingView) 1279 1279 hitView = m_view; … … 1418 1418 } 1419 1419 // 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]; 1421 1421 bool isInPasswordField = m_page->editorState().isInPasswordField; 1422 1422 … … 1454 1454 LOG(TextInput, "-> discardMarkedText"); 1455 1455 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. 1457 1457 } 1458 1458 … … 1701 1701 // 2) prevents any NSBeep; we don't ever want to beep here. 1702 1702 RetainPtr<WKResponderChainSink> sink = adoptNS([[WKResponderChainSink alloc] initWithResponderChain:m_view]); 1703 [m_view _ superDoCommandBySelector:selector];1703 [m_view _web_superDoCommandBySelector:selector]; 1704 1704 [sink detach]; 1705 1705 return ![sink didReceiveUnhandledCommand]; … … 2182 2182 void WebViewImpl::dismissContentRelativeChildWindowsWithAnimation(bool animate) 2183 2183 { 2184 [m_view _ dismissContentRelativeChildWindowsWithAnimation:animate];2184 [m_view _web_dismissContentRelativeChildWindowsWithAnimation:animate]; 2185 2185 } 2186 2186 … … 2191 2191 // For this same reason, this can't be moved to WebViewImpl without care. 2192 2192 clearTextIndicatorWithAnimation(animate ? WebCore::TextIndicatorWindowDismissalAnimation::FadeOut : WebCore::TextIndicatorWindowDismissalAnimation::None); 2193 [m_view _ dismissContentRelativeChildWindows];2193 [m_view _web_dismissContentRelativeChildWindows]; 2194 2194 } 2195 2195 … … 2233 2233 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 2234 2234 if (m_immediateActionGestureRecognizer) { 2235 [m_view _ superQuickLookWithEvent:event];2235 [m_view _web_superQuickLookWithEvent:event]; 2236 2236 return; 2237 2237 } … … 2281 2281 void WebViewImpl::prepareForImmediateActionAnimation() 2282 2282 { 2283 [m_view _ prepareForImmediateActionAnimation];2283 [m_view _web_prepareForImmediateActionAnimation]; 2284 2284 } 2285 2285 2286 2286 void WebViewImpl::cancelImmediateActionAnimation() 2287 2287 { 2288 [m_view _ cancelImmediateActionAnimation];2288 [m_view _web_cancelImmediateActionAnimation]; 2289 2289 } 2290 2290 2291 2291 void WebViewImpl::completeImmediateActionAnimation() 2292 2292 { 2293 [m_view _ completeImmediateActionAnimation];2293 [m_view _web_completeImmediateActionAnimation]; 2294 2294 } 2295 2295 2296 2296 void WebViewImpl::didChangeContentSize(CGSize newSize) 2297 2297 { 2298 [m_view _ didChangeContentSize:NSSizeFromCGSize(newSize)];2298 [m_view _web_didChangeContentSize:NSSizeFromCGSize(newSize)]; 2299 2299 } 2300 2300 … … 2405 2405 return @YES; 2406 2406 2407 return [m_view _ superAccessibilityAttributeValue:attribute];2407 return [m_view _web_superAccessibilityAttributeValue:attribute]; 2408 2408 } 2409 2409 … … 2456 2456 2457 2457 if (tag == m_lastToolTipTag) { 2458 [m_view _ superRemoveTrackingRect:tag];2458 [m_view _web_superRemoveTrackingRect:tag]; 2459 2459 m_lastToolTipTag = 0; 2460 2460 return; … … 3140 3140 3141 3141 if (!m_allowsBackForwardNavigationGestures) { 3142 [m_view _ superSwipeWithEvent:event];3142 [m_view _web_superSwipeWithEvent:event]; 3143 3143 return; 3144 3144 } … … 3149 3149 m_page->goForward(); 3150 3150 else 3151 [m_view _ superSwipeWithEvent:event];3151 [m_view _web_superSwipeWithEvent:event]; 3152 3152 } 3153 3153 … … 3159 3159 m_page->handleGestureEvent(webEvent); 3160 3160 #endif 3161 [m_view _ superMagnifyWithEvent:event];3161 [m_view _web_superMagnifyWithEvent:event]; 3162 3162 return; 3163 3163 } … … 3183 3183 { 3184 3184 if (!m_allowsMagnification) { 3185 [m_view _ superSmartMagnifyWithEvent:event];3185 [m_view _web_superSmartMagnifyWithEvent:event]; 3186 3186 return; 3187 3187 } … … 3212 3212 void WebViewImpl::gestureEventWasNotHandledByWebCore(NSEvent *event) 3213 3213 { 3214 [m_view _ gestureEventWasNotHandledByWebCore:event];3214 [m_view _web_gestureEventWasNotHandledByWebCore:event]; 3215 3215 } 3216 3216 … … 3361 3361 // FIXME: Send the command to Editor synchronously and only send it along the 3362 3362 // 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]; 3364 3364 } 3365 3365 } … … 3577 3577 return nil; 3578 3578 3579 return [m_view _ superInputContext];3579 return [m_view _web_superInputContext]; 3580 3580 } 3581 3581 … … 3672 3672 // Don't interpret this event again, avoiding re-entrancy and infinite loops. 3673 3673 if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask)) 3674 return [m_view _ superPerformKeyEquivalent:event];3674 return [m_view _web_superPerformKeyEquivalent:event]; 3675 3675 3676 3676 if (m_keyDownEventBeingResent) { … … 3678 3678 // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit 3679 3679 // 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]; 3681 3681 } 3682 3682 … … 3695 3695 } 3696 3696 3697 return [m_view _ superPerformKeyEquivalent:event];3697 return [m_view _web_superPerformKeyEquivalent:event]; 3698 3698 } 3699 3699 … … 3728 3728 // If this is the case we should ignore the key down. 3729 3729 if (m_keyDownEventBeingResent == event) { 3730 [m_view _ superKeyDown:event];3730 [m_view _web_superKeyDown:event]; 3731 3731 return; 3732 3732 } … … 3832 3832 // FIXME: Send the command to Editor synchronously and only send it along the 3833 3833 // 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]; 3835 3835 } 3836 3836 } … … 3909 3909 return nil; 3910 3910 3911 return [m_view _ superInputContext];3911 return [m_view _web_superInputContext]; 3912 3912 } 3913 3913 … … 4111 4111 // Don't interpret this event again, avoiding re-entrancy and infinite loops. 4112 4112 if ([[event charactersIgnoringModifiers] isEqualToString:@"\e"] && !([event modifierFlags] & NSDeviceIndependentModifierFlagsMask)) 4113 return [m_view _ superPerformKeyEquivalent:event];4113 return [m_view _web_superPerformKeyEquivalent:event]; 4114 4114 4115 4115 if (m_keyDownEventBeingResent) { … … 4117 4117 // Note that we can get multiple events for each event being re-sent. For example, for Cmd+'=' AppKit 4118 4118 // 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]; 4120 4120 } 4121 4121 … … 4134 4134 } 4135 4135 4136 return [m_view _ superPerformKeyEquivalent:event];4136 return [m_view _web_superPerformKeyEquivalent:event]; 4137 4137 } 4138 4138 … … 4169 4169 // If this is the case we should ignore the key down. 4170 4170 if (m_keyDownEventBeingResent == event) { 4171 [m_view _ superKeyDown:event];4171 [m_view _web_superKeyDown:event]; 4172 4172 return; 4173 4173 } -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r191824 r191907 359 359 [dragNSImage setSize:size]; 360 360 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); 368 362 } 369 363 … … 606 600 void PageClientImpl::intrinsicContentSizeDidChange(const IntSize& intrinsicContentSize) 607 601 { 608 #if WK_API_ENABLED609 if (m_webView) {610 [m_webView _setIntrinsicContentSize:intrinsicContentSize];611 return;612 }613 #endif614 615 602 m_impl->setIntrinsicContentSize(intrinsicContentSize); 616 603 } … … 799 786 void* PageClientImpl::immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult> hitTestResult, uint64_t type, RefPtr<API::Object> userData) 800 787 { 801 #if WK_API_ENABLED802 if (m_webView)803 return [m_webView _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)(userData.get())];804 #endif805 788 return m_impl->immediateActionAnimationControllerForHitTestResult(hitTestResult.get(), type, userData.get()); 806 789 } -
trunk/Tools/ChangeLog
r191900 r191907 1 2015-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 1 13 2015-10-30 Dana Burkart <dburkart@apple.com> 2 14 -
trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
r190065 r191907 349 349 // The right solution is just to use NSApplication's built-in event sending methods, 350 350 // 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) 354 352 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 362 354 ASSERT(targetView); 363 355 [NSApp _setCurrentEvent:event]; … … 623 615 { 624 616 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]; 626 618 m_position.x = position.x; 627 619 m_position.y = position.y;
Note:
See TracChangeset
for help on using the changeset viewer.