Changeset 253465 in webkit
- Timestamp:
- Dec 12, 2019 10:06:08 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 51 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r253454 r253465 1 2019-12-12 Simon Fraser <simon.fraser@apple.com> 2 3 Move WKWebView code related to testing to new files, with new private "for testing" headers. 4 https://bugs.webkit.org/show_bug.cgi?id=205021 5 6 Reviewed by Tim Horton. 7 8 Move testing-only SPI to new private headers to discourage first parties from using 9 them by mistake. Move test-only code to new files to reduce the size of WKWebView.mm. 10 11 * SourcesCocoa.txt: 12 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 13 * UIProcess/API/Cocoa/WKWebView.mm: 14 (-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]): 15 (-[WKWebView _prepareForImmediateActionAnimation]): 16 (-[WKWebView _cancelImmediateActionAnimation]): 17 (-[WKWebView _completeImmediateActionAnimation]): 18 (-[WKWebView _useSystemAppearance]): 19 (-[WKWebView _setUseSystemAppearance:]): 20 (-[WKWebView _pageRefForTransitionToWKWebView]): 21 (-[WKWebView _canChangeFrameLayout:]): 22 (-[WKWebView _tryToSwipeWithEvent:ignoringPinnedState:]): 23 (-[WKWebView _ignoresNonWheelEvents]): 24 (-[WKWebView _setIgnoresNonWheelEvents:]): 25 (-[WKWebView _hasActiveVideoForControlsManager]): 26 (-[WKWebView _dismissContentRelativeChildWindows]): 27 (-[WKWebView _gestureEventWasNotHandledByWebCore:]): 28 (-[WKWebView _disableFrameSizeUpdates]): 29 (-[WKWebView _enableFrameSizeUpdates]): 30 (-[WKWebView _beginDeferringViewInWindowChanges]): 31 (-[WKWebView _endDeferringViewInWindowChanges]): 32 (-[WKWebView _endDeferringViewInWindowChangesSync]): 33 (-[WKWebView _fullScreenPlaceholderView]): 34 (-[WKWebView _fullScreenWindow]): 35 (-[WKWebView _underlayColor]): 36 (-[WKWebView _setUnderlayColor:]): 37 (-[WKWebView _setCustomSwipeViews:]): 38 (-[WKWebView _setCustomSwipeViewsTopContentInset:]): 39 (-[WKWebView _setDidMoveSwipeSnapshotCallback:]): 40 (-[WKWebView _setFrame:andScrollBy:]): 41 (-[WKWebView _setTotalHeightOfBanners:]): 42 (-[WKWebView _totalHeightOfBanners]): 43 (-[WKWebView _setFont:sender:]): 44 (-[WKWebView _setFontSize:sender:]): 45 (-[WKWebView _setTextColor:sender:]): 46 (-[WKWebView inputAccessoryView]): 47 (-[WKWebView inputView]): 48 (-[WKWebView _requestActivatedElementAtPosition:completionBlock:]): 49 (-[WKWebView _contentVisibleRect]): 50 (-[WKWebView _convertPointFromContentsToView:]): 51 (-[WKWebView _convertPointFromViewToContents:]): 52 (-[WKWebView didStartFormControlInteraction]): 53 (-[WKWebView didEndFormControlInteraction]): 54 (-[WKWebView _uiTextCaretRect]): 55 (-[WKWebView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]): 56 (-[WKWebView _accessibilityStoreSelection]): 57 (-[WKWebView _accessibilityClearSelection]): 58 (-[WKWebView _contentViewIsFirstResponder]): 59 (-[WKWebView _inspector]): 60 (-[WKWebView _mainFrame]): 61 (-[WKWebView _isEditable]): 62 (-[WKWebView _setEditable:]): 63 (-[WKWebView _executeEditCommand:argument:completion:]): 64 (-[WKWebView _textManipulationDelegate]): 65 (-[WKWebView _setTextManipulationDelegate:]): 66 (-[WKWebView _startTextManipulationsWithConfiguration:completion:]): 67 (-[WKWebView _completeTextManipulation:completion:]): 68 (-[WKWebView _takeFindStringFromSelection:]): 69 (+[WKWebView _stringForFind]): 70 (+[WKWebView _setStringForFind:]): 71 (-[WKWebView _remoteObjectRegistry]): 72 (-[WKWebView _handle]): 73 (-[WKWebView _observedRenderingProgressEvents]): 74 (-[WKWebView _historyDelegate]): 75 (-[WKWebView _setHistoryDelegate:]): 76 (-[WKWebView _updateMediaPlaybackControlsManager]): 77 (-[WKWebView _canTogglePictureInPicture]): 78 (-[WKWebView _isPictureInPictureActive]): 79 (-[WKWebView _togglePictureInPicture]): 80 (-[WKWebView _closeAllMediaPresentations]): 81 (-[WKWebView _stopMediaCapture]): 82 (-[WKWebView _stopAllMediaPlayback]): 83 (-[WKWebView _suspendAllMediaPlayback]): 84 (-[WKWebView _resumeAllMediaPlayback]): 85 (-[WKWebView _unreachableURL]): 86 (-[WKWebView _mainFrameURL]): 87 (-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]): 88 (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]): 89 (-[WKWebView _loadRequest:shouldOpenExternalURLs:]): 90 (-[WKWebView _certificateChain]): 91 (-[WKWebView _committedURL]): 92 (-[WKWebView _MIMEType]): 93 (-[WKWebView _userAgent]): 94 (-[WKWebView _applicationNameForUserAgent]): 95 (-[WKWebView _setApplicationNameForUserAgent:]): 96 (-[WKWebView _customUserAgent]): 97 (-[WKWebView _setCustomUserAgent:]): 98 (-[WKWebView _setUserContentExtensionsEnabled:]): 99 (-[WKWebView _userContentExtensionsEnabled]): 100 (-[WKWebView _webProcessIdentifier]): 101 (-[WKWebView _provisionalWebProcessIdentifier]): 102 (-[WKWebView _killWebContentProcess]): 103 (-[WKWebView _safeBrowsingWarning]): 104 (-[WKWebView _reloadWithoutContentBlockers]): 105 (-[WKWebView _reloadExpiredOnly]): 106 (-[WKWebView _killWebContentProcessAndResetState]): 107 (-[WKWebView _convertRectFromRootViewCoordinates:]): 108 (-[WKWebView _convertRectToRootViewCoordinates:]): 109 (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): 110 (-[WKWebView _focusTextInputContext:completionHandler:]): 111 (-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]): 112 (-[WKWebView _setShouldSuppressFirstResponderChanges:]): 113 (-[WKWebView _retainActiveFocusedState]): 114 (-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): 115 (-[WKWebView _snapshotLayerContentsForBackForwardListItem:]): 116 (-[WKWebView _dataDetectionResults]): 117 (-[WKWebView _accessibilityRetrieveSpeakSelectionContent]): 118 (-[WKWebView _accessibilityDidGetSpeakSelectionContent:]): 119 (-[WKWebView inputAssistantItem]): 120 (-[WKWebView _sessionStateData]): 121 (-[WKWebView _sessionState]): 122 (-[WKWebView _sessionStateWithFilter:]): 123 (-[WKWebView _restoreFromSessionStateData:]): 124 (-[WKWebView _restoreSessionState:andNavigate:]): 125 (-[WKWebView _close]): 126 (-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]): 127 (-[WKWebView _insertAttachmentWithFileWrapper:contentType:options:completion:]): 128 (-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]): 129 (-[WKWebView _attachmentForIdentifier:]): 130 (-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]): 131 (+[WKWebView _handlesSafeBrowsing]): 132 (-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]): 133 (-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]): 134 (+[WKWebView _confirmMalwareSentinel]): 135 (+[WKWebView _visitUnsafeWebsiteSentinel]): 136 (-[WKWebView _isJITEnabled:]): 137 (-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]): 138 (-[WKWebView _updateWebsitePolicies:]): 139 (-[WKWebView _allowsRemoteInspection]): 140 (-[WKWebView _setAllowsRemoteInspection:]): 141 (-[WKWebView _remoteInspectionNameOverride]): 142 (-[WKWebView _setRemoteInspectionNameOverride:]): 143 (-[WKWebView _addsVisitedLinks]): 144 (-[WKWebView _setAddsVisitedLinks:]): 145 (-[WKWebView _networkRequestsInProgress]): 146 (layoutMilestones): 147 (-[WKWebView _setObservedRenderingProgressEvents:]): 148 (-[WKWebView _getMainResourceDataWithCompletionHandler:]): 149 (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): 150 (-[WKWebView _getContentsAsStringWithCompletionHandler:]): 151 (-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]): 152 (-[WKWebView _getApplicationManifestWithCompletionHandler:]): 153 (-[WKWebView _paginationMode]): 154 (-[WKWebView _setPaginationMode:]): 155 (-[WKWebView _paginationBehavesLikeColumns]): 156 (-[WKWebView _setPaginationBehavesLikeColumns:]): 157 (-[WKWebView _pageLength]): 158 (-[WKWebView _setPageLength:]): 159 (-[WKWebView _gapBetweenPages]): 160 (-[WKWebView _setGapBetweenPages:]): 161 (-[WKWebView _paginationLineGridEnabled]): 162 (-[WKWebView _setPaginationLineGridEnabled:]): 163 (-[WKWebView _pageCount]): 164 (-[WKWebView _supportsTextZoom]): 165 (-[WKWebView _textZoomFactor]): 166 (-[WKWebView _setTextZoomFactor:]): 167 (-[WKWebView setPageZoom:]): 168 (-[WKWebView pageZoom]): 169 (-[WKWebView _pageZoomFactor]): 170 (-[WKWebView _setPageZoomFactor:]): 171 (-[WKWebView _diagnosticLoggingDelegate]): 172 (-[WKWebView _setDiagnosticLoggingDelegate:]): 173 (-[WKWebView _findDelegate]): 174 (-[WKWebView _setFindDelegate:]): 175 (toFindOptions): 176 (-[WKWebView _countStringMatches:options:maxCount:]): 177 (-[WKWebView _findString:options:maxCount:]): 178 (-[WKWebView _hideFindUI]): 179 (-[WKWebView _saveBackForwardSnapshotForItem:]): 180 (-[WKWebView _inputDelegate]): 181 (-[WKWebView _setInputDelegate:]): 182 (-[WKWebView _isDisplayingStandaloneImageDocument]): 183 (-[WKWebView _isDisplayingStandaloneMediaDocument]): 184 (-[WKWebView _isPlayingAudio]): 185 (-[WKWebView _isShowingNavigationGestureSnapshot]): 186 (-[WKWebView _layoutMode]): 187 (-[WKWebView _setLayoutMode:]): 188 (-[WKWebView _fixedLayoutSize]): 189 (-[WKWebView _setFixedLayoutSize:]): 190 (-[WKWebView _setBackgroundExtendsBeyondPage:]): 191 (-[WKWebView _backgroundExtendsBeyondPage]): 192 (-[WKWebView _viewScale]): 193 (-[WKWebView _setViewScale:]): 194 (-[WKWebView _setMinimumEffectiveDeviceWidth:]): 195 (-[WKWebView _minimumEffectiveDeviceWidth]): 196 (-[WKWebView _setScrollPerformanceDataCollectionEnabled:]): 197 (-[WKWebView _scrollPerformanceDataCollectionEnabled]): 198 (-[WKWebView _scrollPerformanceData]): 199 (-[WKWebView _allowsMediaDocumentInlinePlayback]): 200 (-[WKWebView _setAllowsMediaDocumentInlinePlayback:]): 201 (-[WKWebView _webProcessIsResponsive]): 202 (-[WKWebView _setFullscreenDelegate:]): 203 (-[WKWebView _fullscreenDelegate]): 204 (-[WKWebView _isInFullscreen]): 205 (-[WKWebView _mediaCaptureState]): 206 (-[WKWebView _setMediaCaptureEnabled:]): 207 (-[WKWebView _mediaCaptureEnabled]): 208 (-[WKWebView _setPageMuted:]): 209 (-[WKWebView _removeDataDetectedLinks:]): 210 (-[WKWebView _doAfterNextPresentationUpdate:]): 211 (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]): 212 (-[WKWebView _doAfterNextStablePresentationUpdate:]): 213 (-[WKWebView _detectDataWithTypes:completionHandler:]): 214 (-[WKWebView removeFromSuperview]): 215 (-[WKWebView _minimumLayoutSizeOverride]): 216 (-[WKWebView _setViewLayoutSizeOverride:]): 217 (-[WKWebView _obscuredInsets]): 218 (-[WKWebView _setObscuredInsets:]): 219 (-[WKWebView _obscuredInsetEdgesAffectedBySafeArea]): 220 (-[WKWebView _setObscuredInsetEdgesAffectedBySafeArea:]): 221 (-[WKWebView _unobscuredSafeAreaInsets]): 222 (-[WKWebView _setUnobscuredSafeAreaInsets:]): 223 (-[WKWebView _safeAreaShouldAffectObscuredInsets]): 224 (-[WKWebView _setInterfaceOrientationOverride:]): 225 (-[WKWebView _interfaceOrientationOverride]): 226 (-[WKWebView _clearInterfaceOrientationOverride]): 227 (-[WKWebView _maximumUnobscuredSizeOverride]): 228 (-[WKWebView _setMaximumUnobscuredSizeOverride:]): 229 (-[WKWebView _setAllowsViewportShrinkToFit:]): 230 (-[WKWebView _allowsViewportShrinkToFit]): 231 (-[WKWebView _beginInteractiveObscuredInsetsChange]): 232 (-[WKWebView _endInteractiveObscuredInsetsChange]): 233 (-[WKWebView _hideContentUntilNextUpdate]): 234 (-[WKWebView _beginAnimatedResizeWithUpdates:]): 235 (-[WKWebView _endAnimatedResize]): 236 (-[WKWebView _resizeWhileHidingContentWithUpdates:]): 237 (-[WKWebView _setOverlaidAccessoryViewsInset:]): 238 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): 239 (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]): 240 (-[WKWebView _clearOverrideLayoutParameters]): 241 (viewportArgumentsFromDictionary): 242 (-[WKWebView _overrideViewportWithArguments:]): 243 (-[WKWebView _viewForFindUI]): 244 (-[WKWebView _isDisplayingPDF]): 245 (-[WKWebView _dataForDisplayedPDF]): 246 (-[WKWebView _suggestedFilenameForDisplayedPDF]): 247 (-[WKWebView _webViewPrintFormatter]): 248 (toUserInterfaceLayoutDirection): 249 (-[WKWebView setSemanticContentAttribute:]): 250 (-[WKWebView _drawsBackground]): 251 (-[WKWebView _setDrawsBackground:]): 252 (-[WKWebView _backgroundColor]): 253 (-[WKWebView _setBackgroundColor:]): 254 (-[WKWebView _setDrawsTransparentBackground:]): 255 (-[WKWebView _inspectorAttachmentView]): 256 (-[WKWebView _setInspectorAttachmentView:]): 257 (-[WKWebView _setOverlayScrollbarStyle:]): 258 (-[WKWebView _overlayScrollbarStyle]): 259 (-[WKWebView _windowOcclusionDetectionEnabled]): 260 (-[WKWebView _setWindowOcclusionDetectionEnabled:]): 261 (-[WKWebView shareSheetDidDismiss:]): 262 (-[WKWebView _setOverrideDeviceScaleFactor:]): 263 (-[WKWebView _overrideDeviceScaleFactor]): 264 (-[WKWebView _setTopContentInset:]): 265 (-[WKWebView _topContentInset]): 266 (-[WKWebView _pageExtendedBackgroundColor]): 267 (-[WKWebView _pinnedState]): 268 (-[WKWebView _rubberBandingEnabled]): 269 (-[WKWebView _setRubberBandingEnabled:]): 270 (-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]): 271 (-[WKWebView _setAutomaticallyAdjustsContentInsets:]): 272 (-[WKWebView _automaticallyAdjustsContentInsets]): 273 (-[WKWebView _minimumLayoutWidth]): 274 (-[WKWebView _setMinimumLayoutWidth:]): 275 (-[WKWebView _shouldExpandContentToViewHeightForAutoLayout]): 276 (-[WKWebView _setShouldExpandContentToViewHeightForAutoLayout:]): 277 (-[WKWebView _alwaysShowsHorizontalScroller]): 278 (-[WKWebView _setAlwaysShowsHorizontalScroller:]): 279 (-[WKWebView _alwaysShowsVerticalScroller]): 280 (-[WKWebView _setAlwaysShowsVerticalScroller:]): 281 (-[WKWebView _printOperationWithPrintInfo:]): 282 (-[WKWebView _printOperationWithPrintInfo:forFrame:]): 283 (-[WKWebView setUserInterfaceLayoutDirection:]): 284 (-[WKWebView _wantsMediaPlaybackControlsView]): 285 (-[WKWebView _setWantsMediaPlaybackControlsView:]): 286 (-[WKWebView _mediaPlaybackControlsView]): 287 (-[WKWebView _addMediaPlaybackControlsView:]): 288 (-[WKWebView _removeMediaPlaybackControlsView]): 289 (-[WKWebView _prepareForMoveToWindow:completionHandler:]): 290 (-[WKWebView _setThumbnailView:]): 291 (-[WKWebView _thumbnailView]): 292 (-[WKWebView _setIgnoresAllEvents:]): 293 (-[WKWebView _ignoresAllEvents]): 294 (-[WKWebView _spellCheckerDocumentTag]): 295 (-[WKWebView _setContinuousSpellCheckingEnabledForTesting:]): Deleted. 296 (-[WKWebView _contentsOfUserInterfaceItem:]): Deleted. 297 (-[WKWebView _setDeviceOrientationUserPermissionHandlerForTesting:]): Deleted. 298 (-[WKWebView keyboardAccessoryBarNext]): Deleted. 299 (-[WKWebView keyboardAccessoryBarPrevious]): Deleted. 300 (-[WKWebView applyAutocorrection:toString:withCompletionHandler:]): Deleted. 301 (-[WKWebView dismissFormAccessoryView]): Deleted. 302 (-[WKWebView _dismissFilePicker]): Deleted. 303 (-[WKWebView setTimePickerValueToHour:minute:]): Deleted. 304 (-[WKWebView selectFormAccessoryPickerRow:]): Deleted. 305 (-[WKWebView selectFormPopoverTitle]): Deleted. 306 (-[WKWebView textContentTypeForTesting]): Deleted. 307 (-[WKWebView formInputLabel]): Deleted. 308 (-[WKWebView _didShowContextMenu]): Deleted. 309 (-[WKWebView _didDismissContextMenu]): Deleted. 310 (-[WKWebView _inputViewBounds]): Deleted. 311 (-[WKWebView _uiTextSelectionRects]): Deleted. 312 (-[WKWebView _scrollingTreeAsText]): Deleted. 313 (-[WKWebView _stableStateOverride]): Deleted. 314 (-[WKWebView _propertiesOfLayerWithID:]): Deleted. 315 (-[WKWebView _doAfterResettingSingleTapGesture:]): Deleted. 316 (-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]): Deleted. 317 (-[WKWebView _requestControlledElementID]): Deleted. 318 (-[WKWebView _handleControlledElementIDResponse:]): Deleted. 319 (-[WKWebView _handleAcceptedCandidate:]): Deleted. 320 (-[WKWebView _didHandleAcceptedCandidate]): Deleted. 321 (-[WKWebView _didUpdateCandidateListVisibility:]): Deleted. 322 (-[WKWebView _forceRequestCandidates]): Deleted. 323 (-[WKWebView _shouldRequestCandidates]): Deleted. 324 (-[WKWebView _insertText:replacementRange:]): Deleted. 325 (-[WKWebView _candidateRect]): Deleted. 326 (-[WKWebView viewDidChangeEffectiveAppearance]): Deleted. 327 (-[WKWebView _setHeaderBannerHeight:]): Deleted. 328 (-[WKWebView _setFooterBannerHeight:]): Deleted. 329 (-[WKWebView _doAfterProcessingAllPendingMouseEvents:]): Deleted. 330 (-[WKWebView _activeMenu]): Deleted. 331 (-[WKWebView _requestActiveNowPlayingSessionInfo:]): Deleted. 332 (-[WKWebView _setPageScale:withOrigin:]): Deleted. 333 (-[WKWebView _pageScale]): Deleted. 334 (-[WKWebView _scrollingUpdatesDisabledForTesting]): Deleted. 335 (-[WKWebView _setScrollingUpdatesDisabledForTesting:]): Deleted. 336 (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:]): Deleted. 337 (-[WKWebView _doAfterNextVisibleContentRectUpdate:]): Deleted. 338 (-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]): Deleted. 339 (-[WKWebView _dragCaretRect]): Deleted. 340 (-[WKWebView _simulateLongPressActionAtLocation:]): Deleted. 341 (-[WKWebView _simulateTextEntered:]): Deleted. 342 (-[WKWebView _dynamicUserInterfaceTraitDidChange]): Deleted. 343 (-[WKWebView _beginBackSwipeForTesting]): Deleted. 344 (-[WKWebView _completeBackSwipeForTesting]): Deleted. 345 (-[WKWebView _setDefersLoadingForTesting:]): Deleted. 346 (-[WKWebView _setShareSheetCompletesImmediatelyWithResolutionForTesting:]): Deleted. 347 (-[WKWebView _hasInspectorFrontend]): Deleted. 348 (-[WKWebView _processWillSuspendImminentlyForTesting]): Deleted. 349 (-[WKWebView _processDidResumeForTesting]): Deleted. 350 (-[WKWebView _setAssertionStateForTesting:]): Deleted. 351 (-[WKWebView _hasServiceWorkerBackgroundActivityForTesting]): Deleted. 352 (-[WKWebView _hasServiceWorkerForegroundActivityForTesting]): Deleted. 353 (-[WKWebView _denyNextUserMediaRequest]): Deleted. 354 (-[WKWebView _triggerSystemPreviewActionOnElement:document:page:]): Deleted. 355 * UIProcess/API/Cocoa/WKWebViewInternal.h: 356 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 357 * UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: Added. 358 * UIProcess/API/Cocoa/WKWebViewTesting.mm: Added. 359 (-[WKWebView _setPageScale:withOrigin:]): 360 (-[WKWebView _pageScale]): 361 (-[WKWebView _setContinuousSpellCheckingEnabledForTesting:]): 362 (-[WKWebView _contentsOfUserInterfaceItem:]): 363 (-[WKWebView _requestActiveNowPlayingSessionInfo:]): 364 (-[WKWebView _scrollingUpdatesDisabledForTesting]): 365 (-[WKWebView _setScrollingUpdatesDisabledForTesting:]): 366 (-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:]): 367 (-[WKWebView _doAfterNextVisibleContentRectUpdate:]): 368 (-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]): 369 (-[WKWebView _beginBackSwipeForTesting]): 370 (-[WKWebView _completeBackSwipeForTesting]): 371 (-[WKWebView _setDefersLoadingForTesting:]): 372 (-[WKWebView _setShareSheetCompletesImmediatelyWithResolutionForTesting:]): 373 (-[WKWebView _hasInspectorFrontend]): 374 (-[WKWebView _processWillSuspendImminentlyForTesting]): 375 (-[WKWebView _processDidResumeForTesting]): 376 (-[WKWebView _setAssertionStateForTesting:]): 377 (-[WKWebView _hasServiceWorkerBackgroundActivityForTesting]): 378 (-[WKWebView _hasServiceWorkerForegroundActivityForTesting]): 379 (-[WKWebView _denyNextUserMediaRequest]): 380 * UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: Added. 381 * UIProcess/API/ios/WKWebViewTestingIOS.mm: Added. 382 (-[WKWebView keyboardAccessoryBarNext]): 383 (-[WKWebView keyboardAccessoryBarPrevious]): 384 (-[WKWebView applyAutocorrection:toString:withCompletionHandler:]): 385 (-[WKWebView dismissFormAccessoryView]): 386 (-[WKWebView _dismissFilePicker]): 387 (-[WKWebView setTimePickerValueToHour:minute:]): 388 (-[WKWebView selectFormAccessoryPickerRow:]): 389 (-[WKWebView selectFormPopoverTitle]): 390 (-[WKWebView textContentTypeForTesting]): 391 (-[WKWebView formInputLabel]): 392 (-[WKWebView _didShowContextMenu]): 393 (-[WKWebView _didDismissContextMenu]): 394 (-[WKWebView _inputViewBounds]): 395 (-[WKWebView _uiTextSelectionRects]): 396 (-[WKWebView _scrollingTreeAsText]): 397 (-[WKWebView _stableStateOverride]): 398 (-[WKWebView _propertiesOfLayerWithID:]): 399 (-[WKWebView _doAfterResettingSingleTapGesture:]): 400 (-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]): 401 (-[WKWebView _dragCaretRect]): 402 (-[WKWebView _simulateLongPressActionAtLocation:]): 403 (-[WKWebView _simulateTextEntered:]): 404 (-[WKWebView _dynamicUserInterfaceTraitDidChange]): 405 (-[WKWebView _triggerSystemPreviewActionOnElement:document:page:]): 406 (-[WKWebView _setDeviceOrientationUserPermissionHandlerForTesting:]): 407 * UIProcess/API/mac/WKWebViewPrivateForTestingMac.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm. 408 * UIProcess/API/mac/WKWebViewTestingMac.mm: Added. 409 (-[WKWebView _requestControlledElementID]): 410 (-[WKWebView _handleControlledElementIDResponse:]): 411 (-[WKWebView _handleAcceptedCandidate:]): 412 (-[WKWebView _didHandleAcceptedCandidate]): 413 (-[WKWebView _didUpdateCandidateListVisibility:]): 414 (-[WKWebView _forceRequestCandidates]): 415 (-[WKWebView _shouldRequestCandidates]): 416 (-[WKWebView _insertText:replacementRange:]): 417 (-[WKWebView _candidateRect]): 418 (-[WKWebView viewDidChangeEffectiveAppearance]): 419 (-[WKWebView _setHeaderBannerHeight:]): 420 (-[WKWebView _setFooterBannerHeight:]): 421 (-[WKWebView _doAfterProcessingAllPendingMouseEvents:]): 422 (-[WKWebView _activeMenu]): 423 * UIProcess/Cocoa/PageClientImplCocoa.mm: 424 * UIProcess/ios/PageClientImplIOS.mm: 425 * UIProcess/ios/WKContentViewInteraction.mm: 426 * UIProcess/ios/WKMouseGestureRecognizer.h: 427 * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: 428 * UIProcess/mac/PageClientImplMac.mm: 429 * UIProcess/mac/WKFullScreenWindowController.h: 430 * WebKit.xcodeproj/project.pbxproj: 431 1 432 2019-12-12 Per Arne Vollan <pvollan@apple.com> 2 433 -
trunk/Source/WebKit/SourcesCocoa.txt
r253396 r253465 323 323 UIProcess/API/Cocoa/WKWebsiteDataStore.mm 324 324 UIProcess/API/Cocoa/WKWebView.mm 325 UIProcess/API/Cocoa/WKWebViewTesting.mm 325 326 UIProcess/API/Cocoa/WKWebViewConfiguration.mm 326 327 UIProcess/API/Cocoa/WKWebpagePreferences.mm 327 328 UIProcess/API/Cocoa/WKWindowFeatures.mm 328 329 330 UIProcess/API/ios/WKWebViewTestingIOS.mm 331 329 332 UIProcess/API/mac/WKView.mm 333 UIProcess/API/mac/WKWebViewTestingMac.mm 330 334 331 335 UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r253396 r253465 40 40 @class _WKElementAction; 41 41 @class _WKFrameHandle; 42 @class _WKInspector; 42 43 43 44 #if TARGET_OS_IOS … … 183 184 - (void)_webView:(WKWebView *)webView dataInteractionOperationWasHandled:(BOOL)handled forSession:(id)session itemProviders:(NSArray *)itemProviders WK_API_AVAILABLE(ios(11.0)); 184 185 - (NSUInteger)_webView:(WKWebView *)webView willUpdateDataInteractionOperationToOperation:(NSUInteger)operation forSession:(id)session WK_API_AVAILABLE(ios(11.0)); 186 185 187 #if TARGET_OS_IOS 186 188 - (UIDropProposal *)_webView:(WKWebView *)webView willUpdateDropProposalToProposal:(UIDropProposal *)proposal forSession:(id <UIDropSession>)session WK_API_AVAILABLE(ios(12.2)); … … 191 193 - (NSInteger)_webView:(WKWebView *)webView dataOwnerForDragSession:(id <UIDragSession>)session WK_API_AVAILABLE(ios(11.0)); 192 194 #endif 195 193 196 - (void)_webView:(WKWebView *)webView didChangeSafeAreaShouldAffectObscuredInsets:(BOOL)safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(11.0)); 194 197 - (void)_webView:(WKWebView *)webView didPresentFocusedElementViewController:(UIViewController *)controller WK_API_AVAILABLE(ios(12.0)); … … 205 208 206 209 #else // !TARGET_OS_IPHONE 210 207 211 - (void)_prepareForImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macos(10.13.4)); 208 212 - (void)_cancelImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macos(10.13.4)); … … 238 242 */ 239 243 - (void)_webView:(WKWebView *)webView didAttachInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA)); 244 240 245 #endif // !TARGET_OS_IPHONE 241 246 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r253396 r253465 53 53 #import "TextCheckerState.h" 54 54 #import "UIDelegate.h" 55 #import "UserMediaProcessManager.h"56 55 #import "VersionChecks.h" 57 56 #import "VideoFullscreenManagerProxy.h" … … 81 80 #import "WKWebViewConfigurationInternal.h" 82 81 #import "WKWebViewContentProvider.h" 82 #import "WKWebViewPrivateForTestingIOS.h" 83 83 #import "WKWebpagePreferencesInternal.h" 84 84 #import "WKWebsiteDataStoreInternal.h" … … 125 125 #import <WebCore/StringUtilities.h> 126 126 #import <WebCore/TextManipulationController.h> 127 #import <WebCore/ValidationBubble.h>128 127 #import <WebCore/ViewportArguments.h> 129 128 #import <WebCore/WritingMode.h> … … 283 282 WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate; 284 283 285 Optional<BOOL> _resolutionForShareSheetImmediateCompletionForTesting;286 284 RetainPtr<WKSafeBrowsingWarning> _safeBrowsingWarning; 287 285 288 286 BOOL _usePlatformFindUI; 289 290 WeakObjCPtr<id <_WKTextManipulationDelegate>> _textManipulationDelegate;291 287 292 288 #if PLATFORM(IOS_FAMILY) 293 289 RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry; 294 295 RetainPtr<WKScrollView> _scrollView;296 RetainPtr<WKContentView> _contentView;297 298 #if ENABLE(FULLSCREEN_API)299 RetainPtr<WKFullScreenWindowController> _fullScreenWindowController;300 #endif301 290 302 291 Optional<CGSize> _viewLayoutSizeOverride; … … 305 294 Optional<WebCore::FloatSize> _lastSentMaximumUnobscuredSize; 306 295 307 CGRect _inputViewBounds;308 296 CGFloat _viewportMetaTagWidth; 309 297 BOOL _viewportMetaTagWidthWasExplicit; … … 350 338 double _scaleToRestore; 351 339 352 std::unique_ptr<WebKit::ViewGestureController> _gestureController;353 340 BOOL _allowsBackForwardNavigationGestures; 354 341 … … 382 369 BOOL _hasScheduledVisibleRectUpdate; 383 370 BOOL _visibleContentRectUpdateScheduledFromScrollViewInStableState; 384 Vector<BlockPtr<void ()>> _visibleContentRectUpdateCallbacks;385 371 386 372 _WKDragInteractionPolicy _dragInteractionPolicy; … … 398 384 #endif 399 385 #if PLATFORM(MAC) 400 std::unique_ptr<WebKit::WebViewImpl> _impl;401 386 RetainPtr<WKTextFinderClient> _textFinderClient; 402 387 #endif … … 1431 1416 } 1432 1417 1418 - (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize 1419 { 1420 #if PLATFORM(IOS_FAMILY) 1421 if (![self usesStandardContentView]) { 1422 dispatch_async(dispatch_get_main_queue(), updateBlock); 1423 return; 1424 } 1425 #endif 1426 1427 if (withoutWaitingForPainting) 1428 _page->setShouldSkipWaitingForPaintAfterNextViewDidMoveToWindow(true); 1429 1430 auto updateBlockCopy = makeBlockPtr(updateBlock); 1431 1432 RetainPtr<WKWebView> strongSelf = self; 1433 _page->callAfterNextPresentationUpdate([updateBlockCopy, withoutWaitingForAnimatedResize, strongSelf](WebKit::CallbackBase::Error error) { 1434 if (!updateBlockCopy) 1435 return; 1436 1437 #if PLATFORM(IOS_FAMILY) 1438 if (!withoutWaitingForAnimatedResize && strongSelf->_dynamicViewportUpdateMode != WebKit::DynamicViewportUpdateMode::NotResizing) { 1439 strongSelf->_callbacksDeferredDuringResize.append([updateBlockCopy] { 1440 updateBlockCopy(); 1441 }); 1442 1443 return; 1444 } 1445 #else 1446 UNUSED_PARAM(withoutWaitingForAnimatedResize); 1447 #endif 1448 1449 updateBlockCopy(); 1450 }); 1451 } 1452 1433 1453 #if ENABLE(ATTACHMENT_ELEMENT) 1434 1454 … … 1459 1479 1460 1480 #if PLATFORM(IOS_FAMILY) 1461 1462 - (BOOL)_contentViewIsFirstResponder1463 {1464 return self._currentContentView.isFirstResponder;1465 }1466 1481 1467 1482 - (BOOL)_shouldAvoidResizingWhenInputViewBoundsChange … … 3674 3689 { 3675 3690 _impl->handleDOMPasteRequestWithResult(WebCore::DOMPasteAccessResponse::GrantedForGesture); 3691 } 3692 3693 - (void)_prepareForImmediateActionAnimation 3694 { 3695 } 3696 3697 - (void)_cancelImmediateActionAnimation 3698 { 3699 } 3700 3701 - (void)_completeImmediateActionAnimation 3702 { 3676 3703 } 3677 3704 … … 4831 4858 } 4832 4859 4860 - (BOOL)_useSystemAppearance 4861 { 4862 return _impl->useSystemAppearance(); 4863 } 4864 4865 - (void)_setUseSystemAppearance:(BOOL)useSystemAppearance 4866 { 4867 _impl->setUseSystemAppearance(useSystemAppearance); 4868 } 4869 4870 - (WKPageRef)_pageRefForTransitionToWKWebView 4871 { 4872 return toAPI(_page.get()); 4873 } 4874 4875 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle 4876 { 4877 if (auto* webFrameProxy = _page->process().webFrame(WebCore::frameIdentifierFromID(frameHandle._frameID))) 4878 return _impl->canChangeFrameLayout(*webFrameProxy); 4879 return false; 4880 } 4881 4882 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState 4883 { 4884 return _impl->tryToSwipeWithEvent(event, ignoringPinnedState); 4885 } 4886 4887 - (BOOL)_ignoresNonWheelEvents 4888 { 4889 return _impl->ignoresNonWheelEvents(); 4890 } 4891 4892 - (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents 4893 { 4894 _impl->setIgnoresNonWheelEvents(ignoresNonWheelEvents); 4895 } 4896 4897 - (BOOL)_hasActiveVideoForControlsManager 4898 { 4899 return _page && _page->hasActiveVideoForControlsManager(); 4900 } 4901 4902 - (void)_dismissContentRelativeChildWindows 4903 { 4904 _impl->dismissContentRelativeChildWindowsFromViewOnly(); 4905 } 4906 4907 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event 4908 { 4909 _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event); 4910 } 4911 4912 - (void)_disableFrameSizeUpdates 4913 { 4914 _impl->disableFrameSizeUpdates(); 4915 } 4916 4917 - (void)_enableFrameSizeUpdates 4918 { 4919 _impl->enableFrameSizeUpdates(); 4920 } 4921 4922 - (void)_beginDeferringViewInWindowChanges 4923 { 4924 _impl->beginDeferringViewInWindowChanges(); 4925 } 4926 4927 - (void)_endDeferringViewInWindowChanges 4928 { 4929 _impl->endDeferringViewInWindowChanges(); 4930 } 4931 4932 - (void)_endDeferringViewInWindowChangesSync 4933 { 4934 _impl->endDeferringViewInWindowChangesSync(); 4935 } 4936 4937 - (NSView *)_fullScreenPlaceholderView 4938 { 4939 return _impl->fullScreenPlaceholderView(); 4940 } 4941 4942 - (NSWindow *)_fullScreenWindow 4943 { 4944 return _impl->fullScreenWindow(); 4945 } 4946 4947 - (NSColor *)_underlayColor 4948 { 4949 return _impl->underlayColor(); 4950 } 4951 4952 - (void)_setUnderlayColor:(NSColor *)underlayColor 4953 { 4954 _impl->setUnderlayColor(underlayColor); 4955 } 4956 4957 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews 4958 { 4959 _impl->setCustomSwipeViews(customSwipeViews); 4960 } 4961 4962 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset 4963 { 4964 _impl->setCustomSwipeViewsTopContentInset(topContentInset); 4965 } 4966 4967 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback 4968 { 4969 _impl->setDidMoveSwipeSnapshotCallback(callback); 4970 } 4971 4972 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset 4973 { 4974 _impl->setFrameAndScrollBy(NSRectToCGRect(rect), NSSizeToCGSize(offset)); 4975 } 4976 4977 - (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners 4978 { 4979 _impl->setTotalHeightOfBanners(totalHeightOfBanners); 4980 } 4981 4982 - (CGFloat)_totalHeightOfBanners 4983 { 4984 return _impl->totalHeightOfBanners(); 4985 } 4986 4833 4987 #endif // PLATFORM(MAC) 4834 4988 … … 4865 5019 } 4866 5020 5021 - (UIView *)_fullScreenPlaceholderView 5022 { 5023 #if ENABLE(FULLSCREEN_API) 5024 if ([_fullScreenWindowController isFullScreen]) 5025 return [_fullScreenWindowController webViewPlaceholder]; 5026 #endif // ENABLE(FULLSCREEN_API) 5027 return nil; 5028 } 5029 5030 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block 5031 { 5032 auto infoRequest = WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(position)); 5033 infoRequest.includeSnapshot = true; 5034 5035 [_contentView doAfterPositionInformationUpdate:[capturedBlock = makeBlockPtr(block)] (WebKit::InteractionInformationAtPosition information) { 5036 capturedBlock([_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:information userInfo:nil]); 5037 } forRequest:infoRequest]; 5038 } 5039 5040 - (CGRect)_contentVisibleRect 5041 { 5042 return [self convertRect:[self bounds] toView:self._currentContentView]; 5043 } 5044 5045 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point 5046 { 5047 return [self convertPoint:point fromView:self._currentContentView]; 5048 } 5049 5050 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point 5051 { 5052 return [self convertPoint:point toView:self._currentContentView]; 5053 } 5054 5055 - (void)didStartFormControlInteraction 5056 { 5057 // For subclasses to override. 5058 } 5059 5060 - (void)didEndFormControlInteraction 5061 { 5062 // For subclasses to override. 5063 } 5064 5065 - (CGRect)_uiTextCaretRect 5066 { 5067 // Force the selection view to update if needed. 5068 [_contentView _updateChangedSelection]; 5069 5070 return [[_contentView valueForKeyPath:@"interactionAssistant.selectionView.selection.caretRect"] CGRectValue]; 5071 } 5072 5073 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(NSArray<NSValue *> *rects))completionHandler 5074 { 5075 [_contentView _accessibilityRetrieveRectsAtSelectionOffset:offset withText:text completionHandler:[capturedCompletionHandler = makeBlockPtr(completionHandler)] (const Vector<WebCore::SelectionRect>& selectionRects) { 5076 if (!capturedCompletionHandler) 5077 return; 5078 auto rectValues = adoptNS([[NSMutableArray alloc] initWithCapacity:selectionRects.size()]); 5079 for (auto& selectionRect : selectionRects) 5080 [rectValues addObject:[NSValue valueWithCGRect:selectionRect.rect()]]; 5081 capturedCompletionHandler(rectValues.get()); 5082 }]; 5083 } 5084 5085 - (void)_accessibilityStoreSelection 5086 { 5087 [_contentView _accessibilityStoreSelection]; 5088 } 5089 5090 - (void)_accessibilityClearSelection 5091 { 5092 [_contentView _accessibilityClearSelection]; 5093 } 5094 5095 - (BOOL)_contentViewIsFirstResponder 5096 { 5097 return self._currentContentView.isFirstResponder; 5098 } 5099 4867 5100 #endif // PLATFORM(IOS_FAMILY) 5101 5102 - (_WKInspector *)_inspector 5103 { 5104 if (auto* inspector = _page->inspector()) 5105 return wrapper(*inspector); 5106 return nil; 5107 } 5108 5109 - (_WKFrameHandle *)_mainFrame 5110 { 5111 if (auto* frame = _page->mainFrame()) 5112 return wrapper(API::FrameHandle::create(frame->frameID())); 5113 return nil; 5114 } 4868 5115 4869 5116 - (BOOL)_isEditable … … 4889 5136 } 4890 5137 5138 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion 5139 { 5140 _page->executeEditCommand(command, argument, [capturedCompletionBlock = makeBlockPtr(completion)](WebKit::CallbackBase::Error error) { 5141 if (capturedCompletionBlock) 5142 capturedCompletionBlock(error == WebKit::CallbackBase::Error::None); 5143 }); 5144 } 5145 5146 - (id <_WKTextManipulationDelegate>)_textManipulationDelegate 5147 { 5148 return _textManipulationDelegate.getAutoreleased(); 5149 } 5150 5151 - (void)_setTextManipulationDelegate:(id <_WKTextManipulationDelegate>)delegate 5152 { 5153 _textManipulationDelegate = delegate; 5154 } 5155 5156 - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)configuration completion:(void(^)())completionHandler 5157 { 5158 using ExclusionRule = WebCore::TextManipulationController::ExclusionRule; 5159 5160 if (!_textManipulationDelegate || !_page) { 5161 completionHandler(); 5162 return; 5163 } 5164 5165 Vector<WebCore::TextManipulationController::ExclusionRule> exclusionRules; 5166 if (configuration) { 5167 for (_WKTextManipulationExclusionRule *wkRule in configuration.exclusionRules) { 5168 auto type = wkRule.isExclusion ? ExclusionRule::Type::Exclude : ExclusionRule::Type::Include; 5169 if (wkRule.attributeName) 5170 exclusionRules.append({type, ExclusionRule::AttributeRule { wkRule.attributeName, wkRule.attributeValue } }); 5171 else if (wkRule.className) 5172 exclusionRules.append({type, ExclusionRule::ClassRule { wkRule.className } }); 5173 else 5174 exclusionRules.append({type, ExclusionRule::ElementRule { wkRule.elementName } }); 5175 } 5176 } 5177 5178 _page->startTextManipulations(exclusionRules, [weakSelf = WeakObjCPtr<WKWebView>(self)] (WebCore::TextManipulationController::ItemIdentifier itemID, 5179 const Vector<WebCore::TextManipulationController::ManipulationToken>& tokens) { 5180 if (!weakSelf) 5181 return; 5182 5183 auto retainedSelf = weakSelf.get(); 5184 auto delegate = [retainedSelf _textManipulationDelegate]; 5185 if (!delegate) 5186 return; 5187 5188 NSMutableArray *wkTokens = [NSMutableArray arrayWithCapacity:tokens.size()]; 5189 for (auto& token : tokens) { 5190 auto wkToken = adoptNS([[_WKTextManipulationToken alloc] init]); 5191 [wkToken setIdentifier:String::number(token.identifier.toUInt64())]; 5192 [wkToken setContent:token.content]; 5193 [wkToken setExcluded:token.isExcluded]; 5194 [wkTokens addObject:wkToken.get()]; 5195 } 5196 5197 auto item = adoptNS([[_WKTextManipulationItem alloc] initWithIdentifier:String::number(itemID.toUInt64()) tokens:wkTokens]); 5198 [delegate _webView:retainedSelf.get() didFindTextManipulationItem:item.get()]; 5199 }, [capturedCompletionBlock = makeBlockPtr(completionHandler)] () { 5200 capturedCompletionBlock(); 5201 }); 5202 } 5203 5204 - (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler 5205 { 5206 using ManipulationResult = WebCore::TextManipulationController::ManipulationResult; 5207 5208 if (!_page) 5209 return; 5210 5211 auto itemID = makeObjectIdentifier<WebCore::TextManipulationController::ItemIdentifierType>(String(item.identifier).toUInt64()); 5212 5213 Vector<WebCore::TextManipulationController::ManipulationToken> tokens; 5214 for (_WKTextManipulationToken *wkToken in item.tokens) { 5215 auto tokenID = makeObjectIdentifier<WebCore::TextManipulationController::TokenIdentifierType>(String(wkToken.identifier).toUInt64()); 5216 tokens.append(WebCore::TextManipulationController::ManipulationToken { tokenID, wkToken.content }); 5217 } 5218 5219 _page->completeTextManipulation(itemID, tokens, [capturedCompletionBlock = makeBlockPtr(completionHandler)] (ManipulationResult result) { 5220 capturedCompletionBlock(result == ManipulationResult::Success); 5221 }); 5222 } 4891 5223 - (void)_takeFindStringFromSelection:(id)sender 4892 5224 { … … 6144 6476 } 6145 6477 6478 // Execute the supplied block after the next transaction from the WebProcess. 6479 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock 6480 { 6481 [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:NO]; 6482 } 6483 6484 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock 6485 { 6486 [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:YES withoutWaitingForAnimatedResize:NO]; 6487 } 6488 6489 #if PLATFORM(IOS_FAMILY) 6490 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock 6491 { 6492 if (![self usesStandardContentView]) { 6493 dispatch_async(dispatch_get_main_queue(), updateBlock); 6494 return; 6495 } 6496 6497 auto updateBlockCopy = makeBlockPtr(updateBlock); 6498 6499 if (_stableStatePresentationUpdateCallbacks) 6500 [_stableStatePresentationUpdateCallbacks addObject:updateBlockCopy.get()]; 6501 else { 6502 _stableStatePresentationUpdateCallbacks = adoptNS([[NSMutableArray alloc] initWithObjects:updateBlockCopy.get(), nil]); 6503 [self _firePresentationUpdateForPendingStableStatePresentationCallbacks]; 6504 } 6505 } 6506 #endif 6507 6146 6508 #pragma mark iOS-specific methods 6147 6509 … … 6469 6831 _waitingForEndAnimatedResize = NO; 6470 6832 } 6833 } 6834 6835 - (void)_firePresentationUpdateForPendingStableStatePresentationCallbacks 6836 { 6837 RetainPtr<WKWebView> strongSelf = self; 6838 [self _doAfterNextPresentationUpdate:[strongSelf] { 6839 dispatch_async(dispatch_get_main_queue(), [strongSelf] { 6840 if ([strongSelf->_stableStatePresentationUpdateCallbacks count]) 6841 [strongSelf _firePresentationUpdateForPendingStableStatePresentationCallbacks]; 6842 }); 6843 }]; 6471 6844 } 6472 6845 … … 6924 7297 #undef FORWARD_ACTION_TO_WKCONTENTVIEW 6925 7298 6926 @implementation WKWebView (WKTesting)6927 6928 - (void)_setContinuousSpellCheckingEnabledForTesting:(BOOL)enabled6929 {6930 #if PLATFORM(IOS_FAMILY)6931 [_contentView setContinuousSpellCheckingEnabled:enabled];6932 #else6933 _impl->setContinuousSpellCheckingEnabled(enabled);6934 #endif6935 }6936 6937 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem6938 {6939 if ([userInterfaceItem isEqualToString:@"validationBubble"]) {6940 auto* validationBubble = _page->validationBubble();6941 String message = validationBubble ? validationBubble->message() : emptyString();6942 double fontSize = validationBubble ? validationBubble->fontSize() : 0;6943 return @{ userInterfaceItem: @{ @"message": (NSString *)message, @"fontSize": [NSNumber numberWithDouble:fontSize] } };6944 }6945 6946 #if PLATFORM(IOS_FAMILY)6947 return [_contentView _contentsOfUserInterfaceItem:(NSString *)userInterfaceItem];6948 #else6949 return nil;6950 #endif6951 }6952 6953 #if PLATFORM(IOS_FAMILY)6954 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block6955 {6956 auto infoRequest = WebKit::InteractionInformationRequest(WebCore::roundedIntPoint(position));6957 infoRequest.includeSnapshot = true;6958 6959 [_contentView doAfterPositionInformationUpdate:[capturedBlock = makeBlockPtr(block)] (WebKit::InteractionInformationAtPosition information) {6960 capturedBlock([_WKActivatedElementInfo activatedElementInfoWithInteractionInformationAtPosition:information userInfo:nil]);6961 } forRequest:infoRequest];6962 }6963 6964 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(NSArray<NSValue *> *rects))completionHandler6965 {6966 [_contentView _accessibilityRetrieveRectsAtSelectionOffset:offset withText:text completionHandler:[capturedCompletionHandler = makeBlockPtr(completionHandler)] (const Vector<WebCore::SelectionRect>& selectionRects) {6967 if (!capturedCompletionHandler)6968 return;6969 auto rectValues = adoptNS([[NSMutableArray alloc] initWithCapacity:selectionRects.size()]);6970 for (auto& selectionRect : selectionRects)6971 [rectValues addObject:[NSValue valueWithCGRect:selectionRect.rect()]];6972 capturedCompletionHandler(rectValues.get());6973 }];6974 }6975 6976 - (void)_setDeviceOrientationUserPermissionHandlerForTesting:(BOOL (^)())handler6977 {6978 Function<bool()> handlerWrapper;6979 if (handler)6980 handlerWrapper = [handler = makeBlockPtr(handler)] { return handler(); };6981 _page->setDeviceOrientationUserPermissionHandlerForTesting(WTFMove(handlerWrapper));6982 }6983 6984 - (void)_accessibilityStoreSelection6985 {6986 [_contentView _accessibilityStoreSelection];6987 }6988 6989 - (void)_accessibilityClearSelection6990 {6991 [_contentView _accessibilityClearSelection];6992 }6993 6994 - (UIView *)_fullScreenPlaceholderView6995 {6996 #if ENABLE(FULLSCREEN_API)6997 if ([_fullScreenWindowController isFullScreen])6998 return [_fullScreenWindowController webViewPlaceholder];6999 #endif // ENABLE(FULLSCREEN_API)7000 return nil;7001 }7002 7003 - (CGRect)_contentVisibleRect7004 {7005 return [self convertRect:[self bounds] toView:self._currentContentView];7006 }7007 7008 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point7009 {7010 return [self convertPoint:point fromView:self._currentContentView];7011 }7012 7013 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point7014 {7015 return [self convertPoint:point toView:self._currentContentView];7016 }7017 7018 - (void)keyboardAccessoryBarNext7019 {7020 [_contentView accessoryTab:YES];7021 }7022 7023 - (void)keyboardAccessoryBarPrevious7024 {7025 [_contentView accessoryTab:NO];7026 }7027 7028 - (void)applyAutocorrection:(NSString *)newString toString:(NSString *)oldString withCompletionHandler:(void (^)(void))completionHandler7029 {7030 [_contentView applyAutocorrection:newString toString:oldString withCompletionHandler:[capturedCompletionHandler = makeBlockPtr(completionHandler)] (UIWKAutocorrectionRects *rects) {7031 capturedCompletionHandler();7032 }];7033 }7034 7035 - (void)dismissFormAccessoryView7036 {7037 [_contentView accessoryDone];7038 }7039 7040 - (void)_dismissFilePicker7041 {7042 [_contentView dismissFilePicker];7043 }7044 7045 - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute7046 {7047 [_contentView setTimePickerValueToHour:hour minute:minute];7048 }7049 7050 - (void)selectFormAccessoryPickerRow:(int)rowIndex7051 {7052 [_contentView selectFormAccessoryPickerRow:rowIndex];7053 }7054 7055 - (NSString *)selectFormPopoverTitle7056 {7057 return [_contentView selectFormPopoverTitle];7058 }7059 7060 - (NSString *)textContentTypeForTesting7061 {7062 return [_contentView textContentTypeForTesting];7063 }7064 7065 - (NSString *)formInputLabel7066 {7067 return [_contentView formInputLabel];7068 }7069 7070 - (void)didStartFormControlInteraction7071 {7072 // For subclasses to override.7073 }7074 7075 - (void)didEndFormControlInteraction7076 {7077 // For subclasses to override.7078 }7079 7080 - (void)_didShowContextMenu7081 {7082 // For subclasses to override.7083 }7084 7085 - (void)_didDismissContextMenu7086 {7087 // For subclasses to override.7088 }7089 7090 - (CGRect)_uiTextCaretRect7091 {7092 // Force the selection view to update if needed.7093 [_contentView _updateChangedSelection];7094 7095 return [[_contentView valueForKeyPath:@"interactionAssistant.selectionView.selection.caretRect"] CGRectValue];7096 }7097 7098 - (CGRect)_inputViewBounds7099 {7100 return _inputViewBounds;7101 }7102 7103 - (NSArray<NSValue *> *)_uiTextSelectionRects7104 {7105 // Force the selection view to update if needed.7106 [_contentView _updateChangedSelection];7107 7108 return [_contentView _uiTextSelectionRects];7109 }7110 7111 - (NSString *)_scrollingTreeAsText7112 {7113 WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy();7114 if (!coordinator)7115 return @"";7116 7117 return coordinator->scrollingTreeAsText();7118 }7119 7120 - (NSNumber *)_stableStateOverride7121 {7122 // For subclasses to override.7123 return nil;7124 }7125 7126 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock7127 {7128 if (![self usesStandardContentView]) {7129 dispatch_async(dispatch_get_main_queue(), updateBlock);7130 return;7131 }7132 7133 auto updateBlockCopy = makeBlockPtr(updateBlock);7134 7135 if (_stableStatePresentationUpdateCallbacks)7136 [_stableStatePresentationUpdateCallbacks addObject:updateBlockCopy.get()];7137 else {7138 _stableStatePresentationUpdateCallbacks = adoptNS([[NSMutableArray alloc] initWithObjects:updateBlockCopy.get(), nil]);7139 [self _firePresentationUpdateForPendingStableStatePresentationCallbacks];7140 }7141 }7142 7143 - (void)_firePresentationUpdateForPendingStableStatePresentationCallbacks7144 {7145 RetainPtr<WKWebView> strongSelf = self;7146 [self _doAfterNextPresentationUpdate:[strongSelf] {7147 dispatch_async(dispatch_get_main_queue(), [strongSelf] {7148 if ([strongSelf->_stableStatePresentationUpdateCallbacks count])7149 [strongSelf _firePresentationUpdateForPendingStableStatePresentationCallbacks];7150 });7151 }];7152 }7153 7154 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID7155 {7156 CALayer* layer = downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).layerWithIDForTesting(layerID);7157 if (!layer)7158 return nil;7159 7160 return @{7161 @"bounds" : @{7162 @"x" : @(layer.bounds.origin.x),7163 @"y" : @(layer.bounds.origin.x),7164 @"width" : @(layer.bounds.size.width),7165 @"height" : @(layer.bounds.size.height),7166 7167 },7168 @"position" : @{7169 @"x" : @(layer.position.x),7170 @"y" : @(layer.position.y),7171 },7172 @"zPosition" : @(layer.zPosition),7173 @"anchorPoint" : @{7174 @"x" : @(layer.anchorPoint.x),7175 @"y" : @(layer.anchorPoint.y),7176 },7177 @"anchorPointZ" : @(layer.anchorPointZ),7178 @"transform" : @{7179 @"m11" : @(layer.transform.m11),7180 @"m12" : @(layer.transform.m12),7181 @"m13" : @(layer.transform.m13),7182 @"m14" : @(layer.transform.m14),7183 7184 @"m21" : @(layer.transform.m21),7185 @"m22" : @(layer.transform.m22),7186 @"m23" : @(layer.transform.m23),7187 @"m24" : @(layer.transform.m24),7188 7189 @"m31" : @(layer.transform.m31),7190 @"m32" : @(layer.transform.m32),7191 @"m33" : @(layer.transform.m33),7192 @"m34" : @(layer.transform.m34),7193 7194 @"m41" : @(layer.transform.m41),7195 @"m42" : @(layer.transform.m42),7196 @"m43" : @(layer.transform.m43),7197 @"m44" : @(layer.transform.m44),7198 },7199 @"sublayerTransform" : @{7200 @"m11" : @(layer.sublayerTransform.m11),7201 @"m12" : @(layer.sublayerTransform.m12),7202 @"m13" : @(layer.sublayerTransform.m13),7203 @"m14" : @(layer.sublayerTransform.m14),7204 7205 @"m21" : @(layer.sublayerTransform.m21),7206 @"m22" : @(layer.sublayerTransform.m22),7207 @"m23" : @(layer.sublayerTransform.m23),7208 @"m24" : @(layer.sublayerTransform.m24),7209 7210 @"m31" : @(layer.sublayerTransform.m31),7211 @"m32" : @(layer.sublayerTransform.m32),7212 @"m33" : @(layer.sublayerTransform.m33),7213 @"m34" : @(layer.sublayerTransform.m34),7214 7215 @"m41" : @(layer.sublayerTransform.m41),7216 @"m42" : @(layer.sublayerTransform.m42),7217 @"m43" : @(layer.sublayerTransform.m43),7218 @"m44" : @(layer.sublayerTransform.m44),7219 },7220 7221 @"hidden" : @(layer.hidden),7222 @"doubleSided" : @(layer.doubleSided),7223 @"masksToBounds" : @(layer.masksToBounds),7224 @"contentsScale" : @(layer.contentsScale),7225 @"rasterizationScale" : @(layer.rasterizationScale),7226 @"opaque" : @(layer.opaque),7227 @"opacity" : @(layer.opacity),7228 };7229 }7230 7231 - (void)_doAfterResettingSingleTapGesture:(dispatch_block_t)action7232 {7233 [_contentView _doAfterResettingSingleTapGesture:action];7234 }7235 7236 - (void)_doAfterReceivingEditDragSnapshotForTesting:(dispatch_block_t)action7237 {7238 [_contentView _doAfterReceivingEditDragSnapshotForTesting:action];7239 }7240 7241 #endif // PLATFORM(IOS_FAMILY)7242 7243 #if PLATFORM(MAC)7244 - (WKPageRef)_pageRefForTransitionToWKWebView7245 {7246 return toAPI(_page.get());7247 }7248 7249 - (void)_dismissContentRelativeChildWindows7250 {7251 _impl->dismissContentRelativeChildWindowsFromViewOnly();7252 }7253 7254 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset7255 {7256 _impl->setFrameAndScrollBy(NSRectToCGRect(rect), NSSizeToCGSize(offset));7257 }7258 7259 - (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners7260 {7261 _impl->setTotalHeightOfBanners(totalHeightOfBanners);7262 }7263 7264 - (CGFloat)_totalHeightOfBanners7265 {7266 return _impl->totalHeightOfBanners();7267 }7268 7269 - (void)_beginDeferringViewInWindowChanges7270 {7271 _impl->beginDeferringViewInWindowChanges();7272 }7273 7274 - (void)_endDeferringViewInWindowChanges7275 {7276 _impl->endDeferringViewInWindowChanges();7277 }7278 7279 - (void)_endDeferringViewInWindowChangesSync7280 {7281 _impl->endDeferringViewInWindowChangesSync();7282 }7283 7284 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event7285 {7286 _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event);7287 }7288 7289 - (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents7290 {7291 _impl->setIgnoresNonWheelEvents(ignoresNonWheelEvents);7292 }7293 7294 - (BOOL)_ignoresNonWheelEvents7295 {7296 return _impl->ignoresNonWheelEvents();7297 }7298 7299 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews7300 {7301 _impl->setCustomSwipeViews(customSwipeViews);7302 }7303 7304 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset7305 {7306 _impl->setCustomSwipeViewsTopContentInset(topContentInset);7307 }7308 7309 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState7310 {7311 return _impl->tryToSwipeWithEvent(event, ignoringPinnedState);7312 }7313 7314 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback7315 {7316 _impl->setDidMoveSwipeSnapshotCallback(callback);7317 }7318 7319 - (NSView *)_fullScreenPlaceholderView7320 {7321 return _impl->fullScreenPlaceholderView();7322 }7323 7324 - (NSWindow *)_fullScreenWindow7325 {7326 return _impl->fullScreenWindow();7327 }7328 7329 - (void)_disableFrameSizeUpdates7330 {7331 _impl->disableFrameSizeUpdates();7332 }7333 7334 - (void)_enableFrameSizeUpdates7335 {7336 _impl->enableFrameSizeUpdates();7337 }7338 7339 - (void)_prepareForImmediateActionAnimation7340 {7341 }7342 7343 - (void)_cancelImmediateActionAnimation7344 {7345 }7346 7347 - (void)_completeImmediateActionAnimation7348 {7349 }7350 7351 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle7352 {7353 if (auto* webFrameProxy = _page->process().webFrame(WebCore::frameIdentifierFromID(frameHandle._frameID)))7354 return _impl->canChangeFrameLayout(*webFrameProxy);7355 return false;7356 }7357 7358 - (NSColor *)_underlayColor7359 {7360 return _impl->underlayColor();7361 }7362 7363 - (void)_setUnderlayColor:(NSColor *)underlayColor7364 {7365 _impl->setUnderlayColor(underlayColor);7366 }7367 7368 - (BOOL)_hasActiveVideoForControlsManager7369 {7370 return _page && _page->hasActiveVideoForControlsManager();7371 }7372 7373 - (void)_requestControlledElementID7374 {7375 if (_page)7376 _page->requestControlledElementID();7377 }7378 7379 - (void)_handleControlledElementIDResponse:(NSString *)identifier7380 {7381 // Overridden by subclasses.7382 }7383 7384 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate7385 {7386 _impl->handleAcceptedCandidate(candidate);7387 }7388 7389 - (void)_didHandleAcceptedCandidate7390 {7391 // Overridden by subclasses.7392 }7393 7394 - (void)_didUpdateCandidateListVisibility:(BOOL)visible7395 {7396 // Overridden by subclasses.7397 }7398 7399 - (void)_forceRequestCandidates7400 {7401 _impl->forceRequestCandidatesForTesting();7402 }7403 7404 - (BOOL)_shouldRequestCandidates7405 {7406 return _impl->shouldRequestCandidates();7407 }7408 7409 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange7410 {7411 [self insertText:string replacementRange:replacementRange];7412 }7413 7414 - (NSRect)_candidateRect7415 {7416 return _page->editorState().postLayoutData().focusedElementRect;7417 }7418 7419 - (BOOL)_useSystemAppearance7420 {7421 return _impl->useSystemAppearance();7422 }7423 7424 - (void)_setUseSystemAppearance:(BOOL)useSystemAppearance7425 {7426 _impl->setUseSystemAppearance(useSystemAppearance);7427 }7428 7429 - (void)viewDidChangeEffectiveAppearance7430 {7431 // This can be called during [super initWithCoder:] and [super initWithFrame:].7432 // That is before _impl is ready to be used, so check. <rdar://problem/39611236>7433 if (!_impl)7434 return;7435 7436 _impl->effectiveAppearanceDidChange();7437 }7438 7439 - (void)_setHeaderBannerHeight:(int)height7440 {7441 _page->setHeaderBannerHeightForTesting(height);7442 }7443 7444 - (void)_setFooterBannerHeight:(int)height7445 {7446 _page->setFooterBannerHeightForTesting(height);7447 }7448 7449 - (void)_doAfterProcessingAllPendingMouseEvents:(dispatch_block_t)action7450 {7451 _impl->doAfterProcessingAllPendingMouseEvents(action);7452 }7453 7454 - (NSMenu *)_activeMenu7455 {7456 // FIXME: Only the DOM paste access menu is supported for now. In the future, it could be7457 // extended to recognize the regular context menu as well.7458 return _impl->domPasteMenu();7459 }7460 7461 #endif // PLATFORM(MAC)7462 7463 - (void)_requestActiveNowPlayingSessionInfo:(void(^)(BOOL, BOOL, NSString*, double, double, NSInteger))callback7464 {7465 if (!_page) {7466 callback(NO, NO, @"", std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN(), 0);7467 return;7468 }7469 7470 auto handler = makeBlockPtr(callback);7471 auto localCallback = WebKit::NowPlayingInfoCallback::create([handler](bool active, bool registeredAsNowPlayingApplication, String title, double duration, double elapsedTime, uint64_t uniqueIdentifier, WebKit::CallbackBase::Error) {7472 handler(active, registeredAsNowPlayingApplication, title, duration, elapsedTime, uniqueIdentifier);7473 });7474 7475 _page->requestActiveNowPlayingSessionInfo(WTFMove(localCallback));7476 }7477 7478 - (void)_setPageScale:(CGFloat)scale withOrigin:(CGPoint)origin7479 {7480 _page->scalePage(scale, WebCore::roundedIntPoint(origin));7481 }7482 7483 - (CGFloat)_pageScale7484 {7485 return _page->pageScaleFactor();7486 }7487 7488 - (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize7489 {7490 #if PLATFORM(IOS_FAMILY)7491 if (![self usesStandardContentView]) {7492 dispatch_async(dispatch_get_main_queue(), updateBlock);7493 return;7494 }7495 #endif7496 7497 if (withoutWaitingForPainting)7498 _page->setShouldSkipWaitingForPaintAfterNextViewDidMoveToWindow(true);7499 7500 auto updateBlockCopy = makeBlockPtr(updateBlock);7501 7502 RetainPtr<WKWebView> strongSelf = self;7503 _page->callAfterNextPresentationUpdate([updateBlockCopy, withoutWaitingForAnimatedResize, strongSelf](WebKit::CallbackBase::Error error) {7504 if (!updateBlockCopy)7505 return;7506 7507 #if PLATFORM(IOS_FAMILY)7508 if (!withoutWaitingForAnimatedResize && strongSelf->_dynamicViewportUpdateMode != WebKit::DynamicViewportUpdateMode::NotResizing) {7509 strongSelf->_callbacksDeferredDuringResize.append([updateBlockCopy] {7510 updateBlockCopy();7511 });7512 7513 return;7514 }7515 #else7516 UNUSED_PARAM(withoutWaitingForAnimatedResize);7517 #endif7518 7519 updateBlockCopy();7520 });7521 }7522 7523 - (BOOL)_scrollingUpdatesDisabledForTesting7524 {7525 // For subclasses to override;7526 return NO;7527 }7528 7529 - (void)_setScrollingUpdatesDisabledForTesting:(BOOL)disabled7530 {7531 }7532 7533 // Execute the supplied block after the next transaction from the WebProcess.7534 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock7535 {7536 [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:NO];7537 }7538 7539 - (void)_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:(void (^)(void))updateBlock7540 {7541 [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:YES];7542 }7543 7544 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock7545 {7546 [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:YES withoutWaitingForAnimatedResize:NO];7547 }7548 7549 - (void)_doAfterNextVisibleContentRectUpdate:(void (^)(void))updateBlock7550 {7551 #if PLATFORM(IOS_FAMILY)7552 _visibleContentRectUpdateCallbacks.append(makeBlockPtr(updateBlock));7553 [self _scheduleVisibleContentRectUpdate];7554 #else7555 dispatch_async(dispatch_get_main_queue(), updateBlock);7556 #endif7557 }7558 7559 - (void)_disableBackForwardSnapshotVolatilityForTesting7560 {7561 WebKit::ViewSnapshotStore::singleton().setDisableSnapshotVolatilityForTesting(true);7562 }7563 7564 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion7565 {7566 _page->executeEditCommand(command, argument, [capturedCompletionBlock = makeBlockPtr(completion)](WebKit::CallbackBase::Error error) {7567 if (capturedCompletionBlock)7568 capturedCompletionBlock(error == WebKit::CallbackBase::Error::None);7569 });7570 }7571 7572 - (id <_WKTextManipulationDelegate>)_textManipulationDelegate7573 {7574 return _textManipulationDelegate.getAutoreleased();7575 }7576 7577 - (void)_setTextManipulationDelegate:(id <_WKTextManipulationDelegate>)delegate7578 {7579 _textManipulationDelegate = delegate;7580 }7581 7582 - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)configuration completion:(void(^)())completionHandler7583 {7584 using ExclusionRule = WebCore::TextManipulationController::ExclusionRule;7585 7586 if (!_textManipulationDelegate || !_page) {7587 completionHandler();7588 return;7589 }7590 7591 Vector<WebCore::TextManipulationController::ExclusionRule> exclusionRules;7592 if (configuration) {7593 for (_WKTextManipulationExclusionRule *wkRule in configuration.exclusionRules) {7594 auto type = wkRule.isExclusion ? ExclusionRule::Type::Exclude : ExclusionRule::Type::Include;7595 if (wkRule.attributeName)7596 exclusionRules.append({type, ExclusionRule::AttributeRule { wkRule.attributeName, wkRule.attributeValue } });7597 else if (wkRule.className)7598 exclusionRules.append({type, ExclusionRule::ClassRule { wkRule.className } });7599 else7600 exclusionRules.append({type, ExclusionRule::ElementRule { wkRule.elementName } });7601 }7602 }7603 7604 _page->startTextManipulations(exclusionRules, [weakSelf = WeakObjCPtr<WKWebView>(self)] (WebCore::TextManipulationController::ItemIdentifier itemID,7605 const Vector<WebCore::TextManipulationController::ManipulationToken>& tokens) {7606 if (!weakSelf)7607 return;7608 7609 auto retainedSelf = weakSelf.get();7610 auto delegate = [retainedSelf _textManipulationDelegate];7611 if (!delegate)7612 return;7613 7614 NSMutableArray *wkTokens = [NSMutableArray arrayWithCapacity:tokens.size()];7615 for (auto& token : tokens) {7616 auto wkToken = adoptNS([[_WKTextManipulationToken alloc] init]);7617 [wkToken setIdentifier:String::number(token.identifier.toUInt64())];7618 [wkToken setContent:token.content];7619 [wkToken setExcluded:token.isExcluded];7620 [wkTokens addObject:wkToken.get()];7621 }7622 7623 auto item = adoptNS([[_WKTextManipulationItem alloc] initWithIdentifier:String::number(itemID.toUInt64()) tokens:wkTokens]);7624 [delegate _webView:retainedSelf.get() didFindTextManipulationItem:item.get()];7625 }, [capturedCompletionBlock = makeBlockPtr(completionHandler)] () {7626 capturedCompletionBlock();7627 });7628 }7629 7630 - (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler7631 {7632 using ManipulationResult = WebCore::TextManipulationController::ManipulationResult;7633 7634 if (!_page)7635 return;7636 7637 auto itemID = makeObjectIdentifier<WebCore::TextManipulationController::ItemIdentifierType>(String(item.identifier).toUInt64());7638 7639 Vector<WebCore::TextManipulationController::ManipulationToken> tokens;7640 for (_WKTextManipulationToken *wkToken in item.tokens) {7641 auto tokenID = makeObjectIdentifier<WebCore::TextManipulationController::TokenIdentifierType>(String(wkToken.identifier).toUInt64());7642 tokens.append(WebCore::TextManipulationController::ManipulationToken { tokenID, wkToken.content });7643 }7644 7645 _page->completeTextManipulation(itemID, tokens, [capturedCompletionBlock = makeBlockPtr(completionHandler)] (ManipulationResult result) {7646 capturedCompletionBlock(result == ManipulationResult::Success);7647 });7648 }7649 7650 #if PLATFORM(IOS_FAMILY)7651 7652 - (CGRect)_dragCaretRect7653 {7654 #if ENABLE(DRAG_SUPPORT)7655 return _page->currentDragCaretRect();7656 #else7657 return CGRectZero;7658 #endif7659 }7660 7661 - (void)_simulateLongPressActionAtLocation:(CGPoint)location7662 {7663 [_contentView _simulateLongPressActionAtLocation:location];7664 }7665 7666 - (void)_simulateTextEntered:(NSString *)text7667 {7668 [_contentView _simulateTextEntered:text];7669 }7670 7671 - (void)_dynamicUserInterfaceTraitDidChange7672 {7673 if (!_page)7674 return;7675 _page->effectiveAppearanceDidChange();7676 [self _updateScrollViewBackground];7677 }7678 7679 #endif // PLATFORM(IOS_FAMILY)7680 7681 - (BOOL)_beginBackSwipeForTesting7682 {7683 #if PLATFORM(MAC)7684 return _impl->beginBackSwipeForTesting();7685 #else7686 if (!_gestureController)7687 return NO;7688 return _gestureController->beginSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);7689 #endif7690 }7691 7692 - (BOOL)_completeBackSwipeForTesting7693 {7694 #if PLATFORM(MAC)7695 return _impl->completeBackSwipeForTesting();7696 #else7697 if (!_gestureController)7698 return NO;7699 return _gestureController->completeSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);7700 #endif7701 }7702 7703 - (void)_setDefersLoadingForTesting:(BOOL)defersLoading7704 {7705 _page->setDefersLoadingForTesting(defersLoading);7706 }7707 7708 - (void)_setShareSheetCompletesImmediatelyWithResolutionForTesting:(BOOL)resolved7709 {7710 _resolutionForShareSheetImmediateCompletionForTesting = resolved;7711 }7712 7713 - (BOOL)_hasInspectorFrontend7714 {7715 return _page && _page->hasInspectorFrontend();7716 }7717 7718 - (_WKInspector *)_inspector7719 {7720 if (auto* inspector = _page->inspector())7721 return wrapper(*inspector);7722 return nil;7723 }7724 7725 - (_WKFrameHandle *)_mainFrame7726 {7727 if (auto* frame = _page->mainFrame())7728 return wrapper(API::FrameHandle::create(frame->frameID()));7729 return nil;7730 }7731 7732 - (void)_processWillSuspendImminentlyForTesting7733 {7734 if (_page)7735 _page->process().sendPrepareToSuspend(WebKit::IsSuspensionImminent::Yes, [] { });7736 }7737 7738 - (void)_processDidResumeForTesting7739 {7740 if (_page)7741 _page->process().sendProcessDidResume();7742 }7743 7744 - (void)_setAssertionStateForTesting:(int)value7745 {7746 if (!_page)7747 return;7748 7749 _page->process().setAssertionStateForTesting(static_cast<WebKit::AssertionState>(value));7750 }7751 7752 - (BOOL)_hasServiceWorkerBackgroundActivityForTesting7753 {7754 #if ENABLE(SERVICE_WORKER)7755 return _page ? _page->process().processPool().hasServiceWorkerBackgroundActivityForTesting() : false;7756 #else7757 return false;7758 #endif7759 }7760 7761 - (BOOL)_hasServiceWorkerForegroundActivityForTesting7762 {7763 #if ENABLE(SERVICE_WORKER)7764 return _page ? _page->process().processPool().hasServiceWorkerForegroundActivityForTesting() : false;7765 #else7766 return false;7767 #endif7768 }7769 7770 - (void)_denyNextUserMediaRequest7771 {7772 #if ENABLE(MEDIA_STREAM)7773 WebKit::UserMediaProcessManager::singleton().denyNextUserMediaRequest();7774 #endif7775 }7776 7777 #if PLATFORM(IOS_FAMILY)7778 - (void)_triggerSystemPreviewActionOnElement:(uint64_t)elementID document:(uint64_t)documentID page:(uint64_t)pageID7779 {7780 #if USE(SYSTEM_PREVIEW)7781 if (_page) {7782 if (auto* previewController = _page->systemPreviewController())7783 previewController->triggerSystemPreviewActionWithTargetForTesting(elementID, documentID, pageID);7784 }7785 #endif7786 }7787 #endif7788 7789 @end7790 7791 7299 #if ENABLE(FULLSCREEN_API) && PLATFORM(IOS_FAMILY) 7792 7300 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
r253396 r253465 35 35 #import <wtf/RetainPtr.h> 36 36 #import <wtf/Variant.h> 37 #include <wtf/WeakObjCPtr.h> 37 38 38 39 #if PLATFORM(IOS_FAMILY) … … 69 70 class WebPageProxy; 70 71 struct PrintInfo; 72 #if PLATFORM(MAC) 73 class WebViewImpl; 74 #endif 75 #if PLATFORM(IOS_FAMILY) 76 class ViewGestureController; 77 #endif 71 78 } 72 79 … … 74 81 @class WKPasswordView; 75 82 @class _WKFrameHandle; 83 #if PLATFORM(IOS_FAMILY) 84 @class WKScrollView; 85 @class WKFullScreenWindowController; 86 #endif 87 @protocol _WKTextManipulationDelegate; 76 88 77 89 @interface WKWebView () WK_WEB_VIEW_PROTOCOLS { … … 79 91 @package 80 92 RetainPtr<WKWebViewConfiguration> _configuration; 81 82 93 RefPtr<WebKit::WebPageProxy> _page; 94 WeakObjCPtr<id <_WKTextManipulationDelegate>> _textManipulationDelegate; 95 Optional<BOOL> _resolutionForShareSheetImmediateCompletionForTesting; 96 97 #if PLATFORM(MAC) 98 std::unique_ptr<WebKit::WebViewImpl> _impl; 99 #endif 100 101 #if PLATFORM(IOS_FAMILY) 102 RetainPtr<WKScrollView> _scrollView; 103 RetainPtr<WKContentView> _contentView; 104 std::unique_ptr<WebKit::ViewGestureController> _gestureController; 105 Vector<BlockPtr<void ()>> _visibleContentRectUpdateCallbacks; 106 107 #if ENABLE(FULLSCREEN_API) 108 RetainPtr<WKFullScreenWindowController> _fullScreenWindowController; 109 #endif 110 111 CGRect _inputViewBounds; 112 #endif 83 113 } 84 114 … … 88 118 - (void)_didRelaunchProcess; 89 119 120 - (UIView *)_currentContentView; 121 90 122 - (void)_didCommitLoadForMainFrame; 91 123 - (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction; … … 100 132 - (void)_scrollToContentScrollPosition:(WebCore::FloatPoint)scrollPosition scrollOrigin:(WebCore::IntPoint)scrollOrigin; 101 133 - (BOOL)_scrollToRect:(WebCore::FloatRect)targetRect origin:(WebCore::FloatPoint)origin minimumScrollDistance:(float)minimumScrollDistance; 134 102 135 - (double)_initialScaleFactor; 103 136 - (double)_contentZoomScale; 137 104 138 - (double)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale; 105 139 - (void)_zoomToFocusRect:(const WebCore::FloatRect&)focusedElementRect selectionRect:(const WebCore::FloatRect&)selectionRectInDocumentCoordinates insideFixed:(BOOL)insideFixed fontSize:(float)fontSize minimumScale:(double)minimumScale maximumScale:(double)maximumScale allowScaling:(BOOL)allowScaling forceScroll:(BOOL)forceScroll; … … 157 191 158 192 @property (nonatomic, readonly) WKPasswordView *_passwordView; 193 @property (nonatomic, readonly) WKWebViewContentProviderRegistry *_contentProviderRegistry; 194 @property (nonatomic, readonly) WKSelectionGranularity _selectionGranularity; 159 195 160 196 @property (nonatomic, readonly) BOOL _isBackground; 161 162 @property (nonatomic, readonly) WKWebViewContentProviderRegistry *_contentProviderRegistry;163 164 @property (nonatomic, readonly) WKSelectionGranularity _selectionGranularity;165 166 197 @property (nonatomic, readonly) BOOL _allowsDoubleTapGestures; 167 198 @property (nonatomic, readonly) BOOL _stylusTapGestureShouldCreateEditableImage; … … 173 204 - (BOOL)_effectiveAppearanceIsDark; 174 205 - (BOOL)_effectiveUserInterfaceLevelIsElevated; 206 175 207 #endif // PLATFORM(IOS_FAMILY) 176 208 … … 181 213 #endif 182 214 215 - (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize; 216 183 217 - (void)_showSafeBrowsingWarning:(const WebKit::SafeBrowsingWarning&)warning completionHandler:(CompletionHandler<void(Variant<WebKit::ContinueUnsafeLoad, URL>&&)>&&)completionHandler; 184 218 - (void)_clearSafeBrowsingWarning; … … 191 225 192 226 #if PLATFORM(MAC) 227 228 - (void)_prepareForImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 229 - (void)_cancelImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 230 - (void)_completeImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 231 232 - (void)insertText:(id)string replacementRange:(NSRange)replacementRange; 193 233 - (void)_web_grantDOMPasteAccess; 234 194 235 #endif 195 236 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
r253396 r253465 173 173 @property (nonatomic, setter=_setAllowsRemoteInspection:) BOOL _allowsRemoteInspection; 174 174 @property (nonatomic, copy, setter=_setRemoteInspectionNameOverride:) NSString *_remoteInspectionNameOverride WK_API_AVAILABLE(macos(10.12), ios(10.0)); 175 @property (nonatomic, readonly) _WKInspector *_inspector WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 176 @property (nonatomic, readonly) _WKFrameHandle *_mainFrame WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 177 178 @property (nonatomic, weak, setter=_setTextManipulationDelegate:) id <_WKTextManipulationDelegate> _textManipulationDelegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 179 - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)snapshotConfiguration completion:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 180 - (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 175 181 176 182 @property (nonatomic, setter=_setAddsVisitedLinks:) BOOL _addsVisitedLinks; … … 212 218 - (void)_showSafeBrowsingWarningWithTitle:(NSString *)title warning:(NSString *)warning details:(NSAttributedString *)details completionHandler:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 213 219 - (void)_showSafeBrowsingWarningWithURL:(NSURL *)url title:(NSString *)title warning:(NSString *)warning details:(NSAttributedString *)details completionHandler:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 220 221 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.12), ios(10.0)); 222 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.12.3), ios(10.3)); 223 #if TARGET_OS_IPHONE 224 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock WK_API_AVAILABLE(ios(10.3)); 225 #endif 226 227 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 214 228 215 229 - (void)_isJITEnabled:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); … … 239 253 #if TARGET_OS_IPHONE 240 254 255 @property (nonatomic, readonly) CGRect _contentVisibleRect WK_API_AVAILABLE(ios(10.0)); 256 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point WK_API_AVAILABLE(ios(10.0)); 257 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point WK_API_AVAILABLE(ios(10.0)); 258 241 259 - (void)_setFont:(UIFont *)font sender:(id)sender WK_API_AVAILABLE(ios(12.2)); 242 260 - (void)_setFontSize:(CGFloat)fontSize sender:(id)sender WK_API_AVAILABLE(ios(12.2)); … … 277 295 @property (nonatomic, setter=_setDragInteractionPolicy:) _WKDragInteractionPolicy _dragInteractionPolicy WK_API_AVAILABLE(ios(11.0)); 278 296 @property (nonatomic, readonly) BOOL _shouldAvoidResizingWhenInputViewBoundsChange WK_API_AVAILABLE(ios(13.0)); 297 @property (nonatomic, readonly) BOOL _contentViewIsFirstResponder WK_API_AVAILABLE(ios(12.2)); 298 299 @property (nonatomic, readonly) CGRect _uiTextCaretRect WK_API_AVAILABLE(ios(10.3)); 300 301 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block WK_API_AVAILABLE(ios(11.0)); 302 303 - (void)didStartFormControlInteraction WK_API_AVAILABLE(ios(10.3)); 304 - (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3)); 279 305 280 306 - (void)_beginInteractiveObscuredInsetsChange; … … 307 333 - (NSArray *)_dataDetectionResults; 308 334 335 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(NSArray<NSValue *> *rects))completionHandler WK_API_AVAILABLE(ios(11.3)); 336 - (void)_accessibilityStoreSelection WK_API_AVAILABLE(ios(11.3)); 337 - (void)_accessibilityClearSelection WK_API_AVAILABLE(ios(11.3)); 338 309 339 - (void)_accessibilityRetrieveSpeakSelectionContent WK_API_AVAILABLE(ios(11.0)); 310 340 - (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(11.0)); 311 341 312 342 @property (nonatomic, readonly) UIView *_safeBrowsingWarning WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 343 344 - (UIView *)_fullScreenPlaceholderView WK_API_AVAILABLE(ios(12.0)); 345 313 346 #else 314 @property (nonatomic, readonly) NSView *_safeBrowsingWarning WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 347 348 @property (nonatomic, readonly) WKPageRef _pageRefForTransitionToWKWebView WK_API_AVAILABLE(macos(10.13.4)); 349 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macos(10.12)); 350 @property (nonatomic, readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents WK_API_AVAILABLE(macos(10.13.4)); 351 352 @property (nonatomic, readonly) NSView *_safeBrowsingWarning WK_API_AVAILABLE(macos(10.14.4)); 315 353 316 354 @property (nonatomic, readonly) _WKRectEdge _pinnedState WK_API_AVAILABLE(macos(10.13.4)); … … 319 357 @property (readonly) NSColor *_pageExtendedBackgroundColor; 320 358 @property (nonatomic, setter=_setBackgroundColor:) NSColor *_backgroundColor WK_API_AVAILABLE(macos(10.14)); 359 @property (nonatomic, copy, setter=_setUnderlayColor:) NSColor *_underlayColor WK_API_AVAILABLE(macos(10.13.4)); 360 361 @property (nonatomic, setter=_setTotalHeightOfBanners:) CGFloat _totalHeightOfBanners WK_API_AVAILABLE(macos(10.13.4)); 321 362 @property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground; 322 363 @property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset; … … 332 373 333 374 - (void)_setShouldSuppressFirstResponderChanges:(BOOL)shouldSuppress; 375 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macos(10.13.4)); 376 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState WK_API_AVAILABLE(macos(10.13.4)); 377 378 - (void)_dismissContentRelativeChildWindows WK_API_AVAILABLE(macos(10.13.4)); 379 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset WK_API_AVAILABLE(macos(10.13.4)); 380 381 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event WK_API_AVAILABLE(macos(10.13.4)); 382 383 - (void)_disableFrameSizeUpdates WK_API_AVAILABLE(macos(10.13.4)); 384 - (void)_enableFrameSizeUpdates WK_API_AVAILABLE(macos(10.13.4)); 385 386 - (void)_beginDeferringViewInWindowChanges WK_API_AVAILABLE(macos(10.13.4)); 387 - (void)_endDeferringViewInWindowChanges WK_API_AVAILABLE(macos(10.13.4)); 388 - (void)_endDeferringViewInWindowChangesSync WK_API_AVAILABLE(macos(10.13.4)); 389 390 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews WK_API_AVAILABLE(macos(10.13.4)); 391 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback WK_API_AVAILABLE(macos(10.13.4)); 392 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset WK_API_AVAILABLE(macos(10.13.4)); 393 394 - (NSView *)_fullScreenPlaceholderView WK_API_AVAILABLE(macos(10.13.4)); 395 - (NSWindow *)_fullScreenWindow WK_API_AVAILABLE(macos(10.13.4)); 334 396 335 397 // Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to … … 347 409 348 410 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo; 349 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macos(10.12) , ios(10.0));411 - (NSPrintOperation *)_printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macos(10.12)); 350 412 351 413 // FIXME: This SPI should become a part of the WKUIDelegate. rdar://problem/26561537 … … 357 419 - (void)_prepareForMoveToWindow:(NSWindow *)targetWindow completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(10.13)); 358 420 421 @property (nonatomic, readwrite, setter=_setUseSystemAppearance:) BOOL _useSystemAppearance WK_API_AVAILABLE(macos(10.14)); 359 422 @property (nonatomic, setter=_setOverlayScrollbarStyle:) _WKOverlayScrollbarStyle _overlayScrollbarStyle WK_API_AVAILABLE(macos(10.13.4)); 360 423 @property (strong, nonatomic, setter=_setInspectorAttachmentView:) NSView *_inspectorAttachmentView WK_API_AVAILABLE(macos(10.13.4)); … … 452 515 @end 453 516 454 #endif 455 456 @interface WKWebView (WKTesting) 457 458 - (void)_setContinuousSpellCheckingEnabledForTesting:(BOOL)enabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 459 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem WK_API_AVAILABLE(macos(10.12.3), ios(10.3)); 460 461 #if TARGET_OS_IPHONE 462 463 @property (nonatomic, readonly) CGRect _contentVisibleRect WK_API_AVAILABLE(ios(10.0)); 464 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point WK_API_AVAILABLE(ios(10.0)); 465 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point WK_API_AVAILABLE(ios(10.0)); 466 467 - (void)keyboardAccessoryBarNext WK_API_AVAILABLE(ios(10.0)); 468 - (void)keyboardAccessoryBarPrevious WK_API_AVAILABLE(ios(10.0)); 469 - (void)dismissFormAccessoryView WK_API_AVAILABLE(ios(10.3)); 470 - (void)_dismissFilePicker WK_API_AVAILABLE(ios(13.0)); 471 - (void)selectFormAccessoryPickerRow:(int)rowIndex WK_API_AVAILABLE(ios(10.3)); 472 @property (nonatomic, readonly) NSString *textContentTypeForTesting WK_API_AVAILABLE(ios(12.0)); 473 @property (nonatomic, readonly) NSString *selectFormPopoverTitle WK_API_AVAILABLE(ios(12.0)); 474 @property (nonatomic, readonly) NSString *formInputLabel WK_API_AVAILABLE(ios(12.0)); 475 - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute WK_API_AVAILABLE(ios(12.0)); 476 477 - (void)applyAutocorrection:(NSString *)newString toString:(NSString *)oldString withCompletionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(ios(11.0)); 478 479 - (void)didStartFormControlInteraction WK_API_AVAILABLE(ios(10.3)); 480 - (void)didEndFormControlInteraction WK_API_AVAILABLE(ios(10.3)); 481 482 - (void)_didShowContextMenu WK_API_AVAILABLE(ios(10.3)); 483 - (void)_didDismissContextMenu WK_API_AVAILABLE(ios(10.3)); 484 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock WK_API_AVAILABLE(ios(10.3)); 485 - (void)_doAfterResettingSingleTapGesture:(dispatch_block_t)action WK_API_AVAILABLE(ios(WK_IOS_TBA)); 486 487 @property (nonatomic, readonly) NSArray<NSValue *> *_uiTextSelectionRects WK_API_AVAILABLE(ios(10.3)); 488 @property (nonatomic, readonly) CGRect _uiTextCaretRect WK_API_AVAILABLE(ios(10.3)); 489 @property (nonatomic, readonly) CGRect _inputViewBounds WK_API_AVAILABLE(ios(10.3)); 490 491 @property (nonatomic, readonly) NSString *_scrollingTreeAsText WK_API_AVAILABLE(ios(10.3)); 492 493 @property (nonatomic, readonly) NSNumber *_stableStateOverride WK_API_AVAILABLE(ios(10.3)); 494 495 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID WK_API_AVAILABLE(ios(11.0)); 496 - (void)_simulateLongPressActionAtLocation:(CGPoint)location WK_API_AVAILABLE(ios(11.0)); 497 - (void)_simulateTextEntered:(NSString *)text WK_API_AVAILABLE(ios(12.0)); 498 499 @property (nonatomic, readonly) CGRect _dragCaretRect WK_API_AVAILABLE(ios(11.0)); 500 501 - (void)_doAfterReceivingEditDragSnapshotForTesting:(dispatch_block_t)action WK_API_AVAILABLE(ios(13.0)); 502 503 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block WK_API_AVAILABLE(ios(11.0)); 504 - (void)_accessibilityRetrieveRectsAtSelectionOffset:(NSInteger)offset withText:(NSString *)text completionHandler:(void (^)(NSArray<NSValue *> *rects))completionHandler WK_API_AVAILABLE(ios(11.3)); 505 - (void)_accessibilityStoreSelection WK_API_AVAILABLE(ios(11.3)); 506 - (void)_accessibilityClearSelection WK_API_AVAILABLE(ios(11.3)); 507 - (UIView *)_fullScreenPlaceholderView WK_API_AVAILABLE(ios(12.0)); 508 509 - (void)_triggerSystemPreviewActionOnElement:(uint64_t)elementID document:(uint64_t)documentID page:(uint64_t)pageID WK_API_AVAILABLE(ios(WK_IOS_TBA)); 510 511 - (void)_setDeviceOrientationUserPermissionHandlerForTesting:(BOOL (^)(void))handler WK_API_AVAILABLE(ios(WK_IOS_TBA)); 512 513 @property (nonatomic, readonly) BOOL _contentViewIsFirstResponder WK_API_AVAILABLE(ios(12.2)); 514 #else 515 - (void)_dismissContentRelativeChildWindows WK_API_AVAILABLE(macos(10.13.4)); 516 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset WK_API_AVAILABLE(macos(10.13.4)); 517 - (void)_beginDeferringViewInWindowChanges WK_API_AVAILABLE(macos(10.13.4)); 518 - (void)_endDeferringViewInWindowChanges WK_API_AVAILABLE(macos(10.13.4)); 519 - (void)_endDeferringViewInWindowChangesSync WK_API_AVAILABLE(macos(10.13.4)); 520 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event WK_API_AVAILABLE(macos(10.13.4)); 521 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews WK_API_AVAILABLE(macos(10.13.4)); 522 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset WK_API_AVAILABLE(macos(10.13.4)); 523 - (NSView *)_fullScreenPlaceholderView WK_API_AVAILABLE(macos(10.13.4)); 524 - (NSWindow *)_fullScreenWindow WK_API_AVAILABLE(macos(10.13.4)); 525 - (void)_disableFrameSizeUpdates WK_API_AVAILABLE(macos(10.13.4)); 526 - (void)_enableFrameSizeUpdates WK_API_AVAILABLE(macos(10.13.4)); 527 - (void)_prepareForImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 528 - (void)_cancelImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 529 - (void)_completeImmediateActionAnimation WK_API_AVAILABLE(macos(10.13.4)); 530 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle WK_API_AVAILABLE(macos(10.13.4)); 531 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState WK_API_AVAILABLE(macos(10.13.4)); 532 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback WK_API_AVAILABLE(macos(10.13.4)); 533 @property (nonatomic, setter=_setTotalHeightOfBanners:) CGFloat _totalHeightOfBanners WK_API_AVAILABLE(macos(10.13.4)); 534 @property (nonatomic, copy, setter=_setUnderlayColor:) NSColor *_underlayColor WK_API_AVAILABLE(macos(10.13.4)); 535 @property (nonatomic, readwrite, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents WK_API_AVAILABLE(macos(10.13.4)); 536 @property (nonatomic, readonly) WKPageRef _pageRefForTransitionToWKWebView WK_API_AVAILABLE(macos(10.13.4)); 537 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager WK_API_AVAILABLE(macos(10.12)); 538 - (void)_requestControlledElementID WK_API_AVAILABLE(macos(10.12.3)); 539 - (void)_handleControlledElementIDResponse:(NSString *)identifier WK_API_AVAILABLE(macos(10.12.3)); 540 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate WK_API_AVAILABLE(macos(10.12.3)); 541 - (void)_didHandleAcceptedCandidate WK_API_AVAILABLE(macos(10.12.3)); 542 - (void)_forceRequestCandidates WK_API_AVAILABLE(macos(10.12.3)); 543 - (void)_didUpdateCandidateListVisibility:(BOOL)visible WK_API_AVAILABLE(macos(10.12.3)); 544 @property (nonatomic, readonly) BOOL _shouldRequestCandidates WK_API_AVAILABLE(macos(10.12.3)); 545 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange WK_API_AVAILABLE(macos(10.12.3)); 546 - (NSRect)_candidateRect WK_API_AVAILABLE(macos(10.13)); 547 @property (nonatomic, readwrite, setter=_setUseSystemAppearance:) BOOL _useSystemAppearance WK_API_AVAILABLE(macos(10.14)); 548 @property (nonatomic, readonly) NSMenu *_activeMenu WK_API_AVAILABLE(macos(WK_MAC_TBA)); 549 550 - (void)_setHeaderBannerHeight:(int)height WK_API_AVAILABLE(macos(10.12.3)); 551 - (void)_setFooterBannerHeight:(int)height WK_API_AVAILABLE(macos(10.12.3)); 552 - (void)_doAfterProcessingAllPendingMouseEvents:(dispatch_block_t)action WK_API_AVAILABLE(macos(10.14.4)); 553 #endif 554 555 - (void)_requestActiveNowPlayingSessionInfo:(void(^)(BOOL, BOOL, NSString*, double, double, NSInteger))callback WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 556 557 - (void)_setPageScale:(CGFloat)scale withOrigin:(CGPoint)origin WK_API_AVAILABLE(ios(10.3)); 558 - (CGFloat)_pageScale WK_API_AVAILABLE(ios(10.3)); 559 560 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.12), ios(10.0)); 561 - (void)_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.14), ios(12.0)); 562 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.12.3), ios(10.3)); 563 - (void)_doAfterNextVisibleContentRectUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macos(10.13), ios(11.0)); 564 565 - (void)_disableBackForwardSnapshotVolatilityForTesting WK_API_AVAILABLE(macos(10.12.3), ios(10.3)); 566 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 567 568 - (void)_denyNextUserMediaRequest WK_API_AVAILABLE(macos(10.14), ios(12.0)); 569 570 - (BOOL)_beginBackSwipeForTesting; 571 - (BOOL)_completeBackSwipeForTesting; 572 - (void)_setDefersLoadingForTesting:(BOOL)defersLoading; 573 574 - (void)_setShareSheetCompletesImmediatelyWithResolutionForTesting:(BOOL)resolved WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 575 576 @property (nonatomic, readonly) BOOL _hasInspectorFrontend WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 577 @property (nonatomic, readonly) _WKInspector *_inspector WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 578 @property (nonatomic, readonly) _WKFrameHandle *_mainFrame WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 579 580 @property (nonatomic, weak, setter=_setTextManipulationDelegate:) id <_WKTextManipulationDelegate> _textManipulationDelegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 581 - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)snapshotConfiguration completion:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 582 - (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 583 584 @property (nonatomic, setter=_setScrollingUpdatesDisabledForTesting:) BOOL _scrollingUpdatesDisabledForTesting WK_API_AVAILABLE(macos(10.15), ios(13.0)); 585 586 - (void)_processWillSuspendImminentlyForTesting; 587 - (void)_processDidResumeForTesting; 588 @property (nonatomic, readonly) BOOL _hasServiceWorkerBackgroundActivityForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 589 @property (nonatomic, readonly) BOOL _hasServiceWorkerForegroundActivityForTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 590 - (void)_setAssertionStateForTesting:(int)state WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 591 592 @end 517 #endif // TARGET_OS_IPHONE -
trunk/Source/WebKit/UIProcess/API/mac/WKWebViewPrivateForTestingMac.h
r253464 r253465 1 1 /* 2 * Copyright (C) 201 7Apple Inc. All rights reserved.2 * Copyright (C) 2014-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #include "config.h" 26 #import <WebKit/WKBase.h> 27 #import <WebKit/WKWebView.h> 27 28 28 #import "PlatformUtilities.h" 29 #import "Test.h" 30 #import "TestNavigationDelegate.h" 31 #import "TestWKWebView.h" 32 #import <WebKit/WKWebViewConfigurationPrivate.h> 33 #import <WebKit/WKWebViewPrivate.h> 34 #import <wtf/RetainPtr.h> 29 #if !TARGET_OS_IPHONE 35 30 36 #if PLATFORM(IOS_FAMILY) 31 @class _WKFrameHandle; 37 32 38 @interface WKContentView () 39 - (BOOL)hasSelectablePositionAtPoint:(CGPoint)point; 33 @interface WKWebView (WKTestingMac) 34 35 @property (nonatomic, readonly) BOOL _hasActiveVideoForControlsManager; 36 @property (nonatomic, readonly) BOOL _shouldRequestCandidates; 37 @property (nonatomic, readonly) NSMenu *_activeMenu; 38 39 - (void)_requestControlledElementID; 40 - (void)_handleControlledElementIDResponse:(NSString *)identifier; 41 42 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate; 43 - (void)_didHandleAcceptedCandidate; 44 45 - (void)_forceRequestCandidates; 46 - (void)_didUpdateCandidateListVisibility:(BOOL)visible; 47 48 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange; 49 - (NSRect)_candidateRect; 50 51 - (void)_setHeaderBannerHeight:(int)height; 52 - (void)_setFooterBannerHeight:(int)height; 53 - (void)_doAfterProcessingAllPendingMouseEvents:(dispatch_block_t)action; 54 40 55 @end 41 56 42 TEST(WebKit, InteractionDeadlockAfterCrash) 43 { 44 RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]); 45 46 RetainPtr<TestWKWebView> webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration.get()]); 47 48 [webView loadHTMLString:@"test" baseURL:nil]; 49 [webView _test_waitForDidFinishNavigation]; 50 51 // This will start an asynchronous interaction information update. 52 [webView _simulateLongPressActionAtLocation:CGPointMake(50, 50)]; 53 54 [webView _killWebContentProcessAndResetState]; 55 56 [webView loadHTMLString:@"test" baseURL:nil]; 57 [webView _test_waitForDidFinishNavigation]; 58 59 // This will synchronously ensure we have up-to-date interaction information. 60 [[webView wkContentView] hasSelectablePositionAtPoint:CGPointZero]; 61 } 62 63 #endif 57 #endif // !TARGET_OS_IPHONE -
trunk/Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
r253396 r253465 29 29 #import "WKWebViewConfigurationPrivate.h" 30 30 #import "WKWebViewInternal.h" 31 #import "WKWebViewPrivateForTesting.h" 31 32 32 33 namespace WebKit { -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r253396 r253465 50 50 #import "WKWebViewContentProviderRegistry.h" 51 51 #import "WKWebViewInternal.h" 52 #import "WKWebViewPrivateForTesting.h" 52 53 #import "WebContextMenuProxy.h" 53 54 #import "WebDataListSuggestionsDropdownIOS.h" -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r253396 r253465 72 72 #import "WKWebViewInternal.h" 73 73 #import "WKWebViewPrivate.h" 74 #import "WKWebViewPrivateForTestingIOS.h" 74 75 #import "WebAutocorrectionContext.h" 75 76 #import "WebAutocorrectionData.h" -
trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.h
r253396 r253465 26 26 #if HAVE(HOVER_GESTURE_RECOGNIZER) 27 27 28 #import <UIKit/UIGestureRecognizer.h> 28 29 #import "NativeWebMouseEvent.h" 29 30 -
trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
r253396 r253465 34 34 #import "WKWebView.h" 35 35 #import "WKWebViewInternal.h" 36 #import "WKWebViewPrivate .h"36 #import "WKWebViewPrivateForTesting.h" 37 37 #import "WebFullScreenManagerProxy.h" 38 38 #import "WebPageProxy.h" -
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
r253396 r253465 49 49 #import "WKViewInternal.h" 50 50 #import "WKWebViewInternal.h" 51 #import "WKWebViewPrivateForTestingMac.h" 51 52 #import "WebColorPickerMac.h" 52 53 #import "WebContextMenuProxyMac.h" -
trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h
r253396 r253465 24 24 */ 25 25 26 #if ENABLE(FULLSCREEN_API) 26 #if ENABLE(FULLSCREEN_API) && PLATFORM(MAC) 27 27 28 #import <AppKit/AppKit.h> 28 29 #import "GenericCallback.h" 29 30 #import <wtf/RetainPtr.h> -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r253452 r253465 99 99 0F174AA3142A4CB70039250F /* APIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F174AA2142A4CB60039250F /* APIGeometry.h */; }; 100 100 0F3C725B196F604E00AEDD0C /* WKInspectorHighlightView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F3C7259196F5F6800AEDD0C /* WKInspectorHighlightView.h */; }; 101 0F45A331239D89A100294ABF /* WKWebViewPrivateForTestingIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */; settings = {ATTRIBUTES = (Private, ); }; }; 102 0F45A335239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 103 0F45A33D239D8CC400294ABF /* WKWebViewPrivateForTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F45A33B239D8CC400294ABF /* WKWebViewPrivateForTesting.h */; settings = {ATTRIBUTES = (Private, ); }; }; 101 104 0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */; }; 102 105 0F59479B187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */; }; … … 110 113 0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h */; }; 111 114 0FB659231208B4DB0044816C /* DrawingAreaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */; }; 115 0FB94837239F31D100926A8F /* WKWebViewPrivateForTesting.h in Copy Testing Headers */ = {isa = PBXBuildFile; fileRef = 0F45A33B239D8CC400294ABF /* WKWebViewPrivateForTesting.h */; }; 116 0FB94838239F323800926A8F /* WKWebViewPrivateForTestingIOS.h in Copy Testing Headers */ = {isa = PBXBuildFile; fileRef = 0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */; }; 117 0FB94839239F323800926A8F /* WKWebViewPrivateForTestingMac.h in Copy Testing Headers */ = {isa = PBXBuildFile; fileRef = 0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */; }; 112 118 0FCB4E4618BBE044000FCFC9 /* PageClientImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB4E3618BBE044000FCFC9 /* PageClientImplIOS.h */; }; 113 119 0FCB4E4818BBE044000FCFC9 /* WKActionSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB4E3818BBE044000FCFC9 /* WKActionSheet.h */; }; … … 1925 1931 1926 1932 /* Begin PBXCopyFilesBuildPhase section */ 1933 0FB94836239F31B700926A8F /* Copy Testing Headers */ = { 1934 isa = PBXCopyFilesBuildPhase; 1935 buildActionMask = 2147483647; 1936 dstPath = WebKitTestSupport; 1937 dstSubfolderSpec = 16; 1938 files = ( 1939 0FB94837239F31D100926A8F /* WKWebViewPrivateForTesting.h in Copy Testing Headers */, 1940 0FB94838239F323800926A8F /* WKWebViewPrivateForTestingIOS.h in Copy Testing Headers */, 1941 0FB94839239F323800926A8F /* WKWebViewPrivateForTestingMac.h in Copy Testing Headers */, 1942 ); 1943 name = "Copy Testing Headers"; 1944 runOnlyForDeploymentPostprocessing = 0; 1945 }; 1927 1946 1A07D2F71919B36500ECDA16 /* Copy Message Generation Scripts */ = { 1928 1947 isa = PBXCopyFilesBuildPhase; … … 2027 2046 0F3C7257196F5F5000AEDD0C /* WKInspectorHighlightView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKInspectorHighlightView.mm; sourceTree = "<group>"; }; 2028 2047 0F3C7259196F5F6800AEDD0C /* WKInspectorHighlightView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKInspectorHighlightView.h; sourceTree = "<group>"; }; 2048 0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivateForTestingIOS.h; sourceTree = "<group>"; }; 2049 0F45A330239D89A100294ABF /* WKWebViewTestingIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTestingIOS.mm; sourceTree = "<group>"; }; 2050 0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivateForTestingMac.h; sourceTree = "<group>"; }; 2051 0F45A334239D89AF00294ABF /* WKWebViewTestingMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTestingMac.mm; sourceTree = "<group>"; }; 2052 0F45A33B239D8CC400294ABF /* WKWebViewPrivateForTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivateForTesting.h; sourceTree = "<group>"; }; 2053 0F45A33C239D8CC400294ABF /* WKWebViewTesting.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewTesting.mm; sourceTree = "<group>"; }; 2029 2054 0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteScrollingCoordinator.h; sourceTree = "<group>"; }; 2030 2055 0F59478E187B3B3A00437857 /* RemoteScrollingCoordinator.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RemoteScrollingCoordinator.messages.in; sourceTree = "<group>"; }; … … 5075 5100 usesTabs = 0; 5076 5101 }; 5102 0F45A32E239D896000294ABF /* ios */ = { 5103 isa = PBXGroup; 5104 children = ( 5105 0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */, 5106 0F45A330239D89A100294ABF /* WKWebViewTestingIOS.mm */, 5107 ); 5108 path = ios; 5109 sourceTree = "<group>"; 5110 }; 5077 5111 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = { 5078 5112 isa = PBXGroup; … … 6755 6789 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */, 6756 6790 26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */, 6791 0F45A33B239D8CC400294ABF /* WKWebViewPrivateForTesting.h */, 6792 0F45A33C239D8CC400294ABF /* WKWebViewTesting.mm */, 6757 6793 1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */, 6758 6794 1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */, … … 8186 8222 37C4C08318149C2A003688B9 /* Cocoa */, 8187 8223 BC8A501311765F4500757573 /* cpp */, 8224 0F45A32E239D896000294ABF /* ios */, 8188 8225 BC111B47112F616900337BAB /* mac */, 8189 8226 6348424F1FB26E7100946E3C /* APIApplicationManifest.h */, … … 8469 8506 BC8699B3116AADAA002A925B /* WKView.mm */, 8470 8507 BC8699B4116AADAA002A925B /* WKViewInternal.h */, 8508 0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */, 8509 0F45A334239D89AF00294ABF /* WKWebViewTestingMac.mm */, 8471 8510 ); 8472 8511 path = mac; … … 10746 10785 1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */, 10747 10786 26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */, 10787 0F45A33D239D8CC400294ABF /* WKWebViewPrivateForTesting.h in Headers */, 10788 0F45A331239D89A100294ABF /* WKWebViewPrivateForTestingIOS.h in Headers */, 10789 0F45A335239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h in Headers */, 10748 10790 1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */, 10749 10791 1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */, … … 10863 10905 5379C7AC21E5288500E4A8F6 /* Check .xcfilelists */, 10864 10906 933170072234674500B32554 /* Create symlinks to XPC services for engineering builds */, 10907 0FB94836239F31B700926A8F /* Copy Testing Headers */, 10865 10908 ); 10866 10909 buildRules = ( -
trunk/Tools/ChangeLog
r253462 r253465 1 2019-12-12 Simon Fraser <simon.fraser@apple.com> 2 3 Move WKWebView code related to testing to new files, with new private "for testing" headers. 4 https://bugs.webkit.org/show_bug.cgi?id=205021 5 6 Reviewed by Tim Horton. 7 8 Move testing-only SPI to new private headers to discourage first parties from using 9 them by mistake. Move test-only code to new files to reduce the size of WKWebView.mm. 10 11 * MiniBrowser/mac/WK2BrowserWindowController.m: 12 * TestWebKitAPI/EditingTestHarness.mm: 13 * TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: 14 * TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm: 15 * TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm: 16 * TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: 17 * TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm: 18 * TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm: 19 * TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm: 20 * TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: 21 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm: 22 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 23 * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 24 * TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm: 25 * TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm: 26 * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: 27 * TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: 28 * TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm: 29 * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: 30 * TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm: 31 * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm: 32 * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm: 33 * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm: 34 * TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm: 35 * TestWebKitAPI/Tests/ios/ActionSheetTests.mm: 36 * TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm: 37 * TestWebKitAPI/Tests/ios/FocusPreservationTests.mm: 38 * TestWebKitAPI/cocoa/TestNavigationDelegate.mm: 39 * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: 40 * TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: 41 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 42 * WebKitTestRunner/cocoa/TestRunnerWKWebView.mm: 43 * WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm: 44 * WebKitTestRunner/ios/TestControllerIOS.mm: 45 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 46 * WebKitTestRunner/mac/UIScriptControllerMac.mm: 47 1 48 2019-12-12 Jonathan Bedard <jbedard@apple.com> 2 49 -
trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m
r253396 r253465 36 36 #import <WebKit/WKWebViewConfigurationPrivate.h> 37 37 #import <WebKit/WKWebViewPrivate.h> 38 #import <WebKit/WKWebViewPrivateForTesting.h> 38 39 #import <WebKit/WKWebsiteDataStorePrivate.h> 39 40 #import <WebKit/WebNSURLExtras.h> -
trunk/Tools/TestWebKitAPI/EditingTestHarness.mm
r253396 r253465 29 29 30 30 #import "PlatformUtilities.h" 31 #import <WebKit/WKWebViewPrivate .h>31 #import <WebKit/WKWebViewPrivateForTesting.h> 32 32 33 33 @implementation EditingTestHarness -
trunk/Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm
r253396 r253465 32 32 #import <WebKit/WKPagePrivateMac.h> 33 33 #import <WebKit/WKWebViewPrivate.h> 34 #import <WebKit/WKWebViewPrivateForTesting.h> 34 35 #import <wtf/HashSet.h> 35 36 #import <wtf/RetainPtr.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm
r253396 r253465 34 34 #import <WebKit/WKWebView.h> 35 35 #import <WebKit/WKWebViewConfiguration.h> 36 #import <WebKit/WKWebViewPrivate .h>36 #import <WebKit/WKWebViewPrivateForTesting.h> 37 37 #import <WebKit/_WKProcessPoolConfiguration.h> 38 38 #import <wtf/RetainPtr.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm
r253396 r253465 34 34 #import <WebKit/WKPreferencesPrivate.h> 35 35 #import <WebKit/WKUIDelegatePrivate.h> 36 #import <WebKit/WKWebViewPrivateForTesting.h> 36 37 #import <wtf/Function.h> 37 38 #import <wtf/HashMap.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm
r253396 r253465 32 32 #import <WebKit/WKNavigationDelegatePrivate.h> 33 33 #import <WebKit/WKProcessPoolPrivate.h> 34 #import <WebKit/WKWebViewPrivate .h>34 #import <WebKit/WKWebViewPrivateForTesting.h> 35 35 #import <WebKit/_WKProcessPoolConfiguration.h> 36 36 #import <wtf/RetainPtr.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm
r253396 r253465 31 31 #import "TestWKWebView.h" 32 32 #import <WebKit/WKWebViewConfigurationPrivate.h> 33 #import <WebKit/WKWebViewPrivate .h>33 #import <WebKit/WKWebViewPrivateForTesting.h> 34 34 #import <wtf/RetainPtr.h> 35 35 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm
r253396 r253465 30 30 #import "PlatformUtilities.h" 31 31 #import "TestWKWebView.h" 32 33 32 #import <WebKit/WKWebViewConfigurationPrivate.h> 34 #import <WebKit/WKWebViewPrivate .h>33 #import <WebKit/WKWebViewPrivateForTesting.h> 35 34 36 35 static void waitUntilBufferingPolicyIsEqualTo(WKWebView* webView, const char* expected) -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm
r253396 r253465 28 28 #import "PlatformUtilities.h" 29 29 #import "TestWKWebView.h" 30 31 30 #import <WebKit/WKWebViewConfigurationPrivate.h> 32 #import <WebKit/WKWebViewPrivate .h>31 #import <WebKit/WKWebViewPrivateForTesting.h> 33 32 34 33 #if PLATFORM(IOS_FAMILY) -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm
r253396 r253465 39 39 #import <WebKit/WKURLCF.h> 40 40 #import <WebKit/WKView.h> 41 #import <WebKit/WKViewPrivate.h>42 41 #import <WebKit/WKWebViewConfigurationPrivate.h> 43 42 #import <WebKit/WKWebViewPrivate.h> 43 #import <WebKit/WKWebViewPrivateForTesting.h> 44 44 #import <wtf/RetainPtr.h> 45 45 #import <wtf/Seconds.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm
r253396 r253465 30 30 #import "PlatformUtilities.h" 31 31 #import "TestWKWebView.h" 32 33 32 #import <WebKit/WKWebViewConfigurationPrivate.h> 34 #import <WebKit/WKWebViewPrivate .h>33 #import <WebKit/WKWebViewPrivateForTesting.h> 35 34 36 35 TEST(WebKit, ProcessSuspendMediaBuffering) -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
r253396 r253465 40 40 #import <WebKit/WKURLSchemeTaskPrivate.h> 41 41 #import <WebKit/WKWebViewConfigurationPrivate.h> 42 #import <WebKit/WKWebViewPrivate .h>42 #import <WebKit/WKWebViewPrivateForTesting.h> 43 43 #import <WebKit/WKWebsiteDataStorePrivate.h> 44 44 #import <WebKit/WKWebsiteDataStoreRef.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm
r253396 r253465 37 37 #import <WebKit/WKURLSchemeTaskPrivate.h> 38 38 #import <WebKit/WKWebViewConfigurationPrivate.h> 39 #import <WebKit/WKWebViewPrivate .h>39 #import <WebKit/WKWebViewPrivateForTesting.h> 40 40 #import <WebKit/WKWebsiteDataStorePrivate.h> 41 41 #import <WebKit/WKWebsiteDataStoreRef.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm
r253396 r253465 37 37 #import <WebKit/WKPagePrivate.h> 38 38 #import <WebKit/WKWebView.h> 39 #import <WebKit/WKWebViewPrivate .h>39 #import <WebKit/WKWebViewPrivateForTesting.h> 40 40 #import <wtf/RetainPtr.h> 41 41 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm
r253396 r253465 32 32 #import "WKWebViewConfigurationExtras.h" 33 33 #import <WebKit/WKViewPrivate.h> 34 #import <WebKit/WKWebViewPrivate .h>34 #import <WebKit/WKWebViewPrivateForTesting.h> 35 35 #import <WebKit/WebKit.h> 36 36 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm
r253396 r253465 37 37 #import <WebKit/WKRetainPtr.h> 38 38 #import <WebKit/WKUIDelegatePrivate.h> 39 #import <WebKit/WKWebViewPrivate .h>39 #import <WebKit/WKWebViewPrivateForTesting.h> 40 40 #import <WebKit/_WKHitTestResult.h> 41 41 #import <WebKit/_WKInspector.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm
r253396 r253465 29 29 #import "Test.h" 30 30 #import "TestWKWebView.h" 31 32 31 #import <WebKit/WKPreferencesPrivate.h> 33 32 #import <WebKit/WKUserContentControllerPrivate.h> 34 33 #import <WebKit/WKWebViewConfigurationPrivate.h> 35 34 #import <WebKit/WKWebViewPrivate.h> 35 #import <WebKit/WKWebViewPrivateForTesting.h> 36 36 #import <WebKit/WebKit.h> 37 37 #import <WebKit/_WKProcessPoolConfiguration.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm
r253396 r253465 28 28 #import "PlatformUtilities.h" 29 29 #import "TestWKWebView.h" 30 31 30 #import <WebKit/WKWebViewConfigurationPrivate.h> 32 #import <WebKit/WKWebViewPrivate .h>31 #import <WebKit/WKWebViewPrivateForTesting.h> 33 32 #import <wtf/RetainPtr.h> 34 33 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm
r253396 r253465 38 38 #import <MapKit/MapKit.h> 39 39 #import <WebKit/WKPreferencesRefPrivate.h> 40 #import <WebKit/WKWebViewPrivate .h>40 #import <WebKit/WKWebViewPrivateForTesting.h> 41 41 #import <WebKit/WebArchive.h> 42 42 #import <WebKit/WebKitPrivate.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm
r253396 r253465 30 30 #import "TestNavigationDelegate.h" 31 31 #import "TestWKWebView.h" 32 #import <WebKit/WKWebView.h>33 32 #import <WebKit/WKWebViewConfigurationPrivate.h> 33 #import <WebKit/WKWebViewPrivateForTesting.h> 34 34 #import <WebKit/_WKActivatedElementInfo.h> 35 35 #import <wtf/RetainPtr.h> -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm
r253396 r253465 30 30 #import "PlatformUtilities.h" 31 31 #import "TestWKWebView.h" 32 33 32 #import <Carbon/Carbon.h> 33 #import <WebKit/WKWebViewPrivateForTesting.h> 34 34 #import <WebKit/WebKitPrivate.h> 35 35 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm
r253396 r253465 29 29 #import "TestWKWebView.h" 30 30 #import <WebKit/WKWebViewPrivate.h> 31 #import <WebKit/WKWebViewPrivateForTesting.h> 31 32 32 33 #if PLATFORM(IOS_FAMILY) -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm
r253396 r253465 30 30 #import "TestWKWebView.h" 31 31 #import <WebKit/WKWebViewPrivate.h> 32 #import <WebKit/WKWebViewPrivateForTesting.h> 32 33 33 34 #if PLATFORM(IOS_FAMILY) -
trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm
r253396 r253465 33 33 #import "WKWebViewConfigurationExtras.h" 34 34 #import <WebKit/WKWebViewPrivate.h> 35 #import <WebKit/WKWebViewPrivateForTesting.h> 35 36 #import <WebKit/_WKRemoteObjectInterface.h> 36 37 #import <WebKit/_WKRemoteObjectRegistry.h> -
trunk/Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm
r253396 r253465 38 38 #import <MobileCoreServices/MobileCoreServices.h> 39 39 #import <WebKit/WKUIDelegatePrivate.h> 40 #import <WebKit/WKWebViewPrivate .h>40 #import <WebKit/WKWebViewPrivateForTesting.h> 41 41 #import <WebKit/_WKActivatedElementInfo.h> 42 42 #import <WebKit/_WKElementAction.h> -
trunk/Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm
r253396 r253465 33 33 #import "UIKitSPI.h" 34 34 #import <WebKit/WKWebViewPrivate.h> 35 #import <WebKit/WKWebViewPrivateForTesting.h> 35 36 36 37 @interface TestWKWebView (AutocorrectionTests) -
trunk/Tools/TestWebKitAPI/Tests/ios/FocusPreservationTests.mm
r253396 r253465 34 34 #import "UIKitSPI.h" 35 35 #import <WebKit/WKWebViewPrivate.h> 36 #import <WebKit/WKWebViewPrivateForTesting.h> 36 37 #import <WebKit/_WKInputDelegate.h> 37 38 #import <wtf/BlockPtr.h> -
trunk/Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm
r253396 r253465 28 28 29 29 #import "Utilities.h" 30 #import <WebKit/WKWebViewPrivateForTesting.h> 30 31 #import <wtf/RetainPtr.h> 31 32 -
trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm
r253396 r253465 32 32 #import "PlatformUtilities.h" 33 33 #import "UIKitSPI.h" 34 35 34 #import <UIKit/UIDragInteraction.h> 36 35 #import <UIKit/UIDragItem.h> 37 36 #import <UIKit/UIDropInteraction.h> 38 37 #import <UIKit/UIInteraction.h> 39 #import <WebKit/WKWebViewPrivate .h>38 #import <WebKit/WKWebViewPrivateForTesting.h> 40 39 #import <WebKit/_WKFocusedElementInfo.h> 41 40 #import <WebKit/_WKFormInputSession.h> -
trunk/Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm
r253396 r253465 32 32 #import "TestDraggingInfo.h" 33 33 #import "TestWKWebView.h" 34 #import <WebKit/WKWebViewPrivateForTesting.h> 34 35 #import <cmath> 35 36 #import <wtf/WeakObjCPtr.h> -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r253396 r253465 45 45 #import <WebKit/WKWebViewConfigurationPrivate.h> 46 46 #import <WebKit/WKWebViewPrivate.h> 47 #import <WebKit/WKWebViewPrivateForTesting.h> 47 48 #import <WebKit/WKWebsiteDataRecordPrivate.h> 48 49 #import <WebKit/WKWebsiteDataStorePrivate.h> -
trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm
r253396 r253465 29 29 #import "WebKitTestRunnerDraggingInfo.h" 30 30 #import <WebKit/WKUIDelegatePrivate.h> 31 #import <WebKit/WKWebViewPrivateForTesting.h> 31 32 #import <wtf/Assertions.h> 32 33 #import <wtf/BlockPtr.h> … … 37 38 #import "UIKitSPI.h" 38 39 #import <WebKit/WKWebViewPrivate.h> 40 39 41 @interface WKWebView () 40 42 -
trunk/Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm
r253396 r253465 34 34 #import <JavaScriptCore/JavaScriptCore.h> 35 35 #import <WebKit/WKWebViewPrivate.h> 36 #import <WebKit/WKWebViewPrivateForTesting.h> 36 37 37 38 namespace WTR { -
trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm
r253396 r253465 43 43 #import <WebKit/WKWebViewConfigurationPrivate.h> 44 44 #import <WebKit/WKWebViewPrivate.h> 45 #import <WebKit/WKWebViewPrivateForTesting.h> 45 46 #import <objc/runtime.h> 46 47 #import <pal/spi/ios/GraphicsServicesSPI.h> -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r253396 r253465 44 44 #import <WebCore/FloatRect.h> 45 45 #import <WebKit/WKWebViewPrivate.h> 46 #import <WebKit/WKWebViewPrivateForTesting.h> 46 47 #import <WebKit/WebKit.h> 47 48 #import <pal/spi/ios/GraphicsServicesSPI.h> -
trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm
r253396 r253465 31 31 #import "PlatformViewHelpers.h" 32 32 #import "PlatformWebView.h" 33 #import "PlatformWebView.h" 33 34 #import "SharedEventStreamsMac.h" 34 #import "TestController.h"35 #import "PlatformWebView.h"36 35 #import "StringFunctions.h" 37 36 #import "TestController.h" … … 44 43 #import <JavaScriptCore/OpaqueJSString.h> 45 44 #import <WebKit/WKWebViewPrivate.h> 45 #import <WebKit/WKWebViewPrivateForTesting.h> 46 46 #import <wtf/BlockPtr.h> 47 47
Note: See TracChangeset
for help on using the changeset viewer.