Changeset 253465 in webkit


Ignore:
Timestamp:
Dec 12, 2019 10:06:08 PM (4 years ago)
Author:
Simon Fraser
Message:

Move WKWebView code related to testing to new files, with new private "for testing" headers.
https://bugs.webkit.org/show_bug.cgi?id=205021

Reviewed by Tim Horton.
Source/WebKit:

Move testing-only SPI to new private headers to discourage first parties from using
them by mistake. Move test-only code to new files to reduce the size of WKWebView.mm.

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _internalDoAfterNextPresentationUpdate:withoutWaitingForPainting:withoutWaitingForAnimatedResize:]):
(-[WKWebView _prepareForImmediateActionAnimation]):
(-[WKWebView _cancelImmediateActionAnimation]):
(-[WKWebView _completeImmediateActionAnimation]):
(-[WKWebView _useSystemAppearance]):
(-[WKWebView _setUseSystemAppearance:]):
(-[WKWebView _pageRefForTransitionToWKWebView]):
(-[WKWebView _canChangeFrameLayout:]):
(-[WKWebView _tryToSwipeWithEvent:ignoringPinnedState:]):
(-[WKWebView _ignoresNonWheelEvents]):
(-[WKWebView _setIgnoresNonWheelEvents:]):
(-[WKWebView _hasActiveVideoForControlsManager]):
(-[WKWebView _dismissContentRelativeChildWindows]):
(-[WKWebView _gestureEventWasNotHandledByWebCore:]):
(-[WKWebView _disableFrameSizeUpdates]):
(-[WKWebView _enableFrameSizeUpdates]):
(-[WKWebView _beginDeferringViewInWindowChanges]):
(-[WKWebView _endDeferringViewInWindowChanges]):
(-[WKWebView _endDeferringViewInWindowChangesSync]):
(-[WKWebView _fullScreenPlaceholderView]):
(-[WKWebView _fullScreenWindow]):
(-[WKWebView _underlayColor]):
(-[WKWebView _setUnderlayColor:]):
(-[WKWebView _setCustomSwipeViews:]):
(-[WKWebView _setCustomSwipeViewsTopContentInset:]):
(-[WKWebView _setDidMoveSwipeSnapshotCallback:]):
(-[WKWebView _setFrame:andScrollBy:]):
(-[WKWebView _setTotalHeightOfBanners:]):
(-[WKWebView _totalHeightOfBanners]):
(-[WKWebView _setFont:sender:]):
(-[WKWebView _setFontSize:sender:]):
(-[WKWebView _setTextColor:sender:]):
(-[WKWebView inputAccessoryView]):
(-[WKWebView inputView]):
(-[WKWebView _requestActivatedElementAtPosition:completionBlock:]):
(-[WKWebView _contentVisibleRect]):
(-[WKWebView _convertPointFromContentsToView:]):
(-[WKWebView _convertPointFromViewToContents:]):
(-[WKWebView didStartFormControlInteraction]):
(-[WKWebView didEndFormControlInteraction]):
(-[WKWebView _uiTextCaretRect]):
(-[WKWebView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(-[WKWebView _accessibilityStoreSelection]):
(-[WKWebView _accessibilityClearSelection]):
(-[WKWebView _contentViewIsFirstResponder]):
(-[WKWebView _inspector]):
(-[WKWebView _mainFrame]):
(-[WKWebView _isEditable]):
(-[WKWebView _setEditable:]):
(-[WKWebView _executeEditCommand:argument:completion:]):
(-[WKWebView _textManipulationDelegate]):
(-[WKWebView _setTextManipulationDelegate:]):
(-[WKWebView _startTextManipulationsWithConfiguration:completion:]):
(-[WKWebView _completeTextManipulation:completion:]):
(-[WKWebView _takeFindStringFromSelection:]):
(+[WKWebView _stringForFind]):
(+[WKWebView _setStringForFind:]):
(-[WKWebView _remoteObjectRegistry]):
(-[WKWebView _handle]):
(-[WKWebView _observedRenderingProgressEvents]):
(-[WKWebView _historyDelegate]):
(-[WKWebView _setHistoryDelegate:]):
(-[WKWebView _updateMediaPlaybackControlsManager]):
(-[WKWebView _canTogglePictureInPicture]):
(-[WKWebView _isPictureInPictureActive]):
(-[WKWebView _togglePictureInPicture]):
(-[WKWebView _closeAllMediaPresentations]):
(-[WKWebView _stopMediaCapture]):
(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):
(-[WKWebView _unreachableURL]):
(-[WKWebView _mainFrameURL]):
(-[WKWebView _loadAlternateHTMLString:baseURL:forUnreachableURL:]):
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
(-[WKWebView _loadRequest:shouldOpenExternalURLs:]):
(-[WKWebView _certificateChain]):
(-[WKWebView _committedURL]):
(-[WKWebView _MIMEType]):
(-[WKWebView _userAgent]):
(-[WKWebView _applicationNameForUserAgent]):
(-[WKWebView _setApplicationNameForUserAgent:]):
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
(-[WKWebView _setUserContentExtensionsEnabled:]):
(-[WKWebView _userContentExtensionsEnabled]):
(-[WKWebView _webProcessIdentifier]):
(-[WKWebView _provisionalWebProcessIdentifier]):
(-[WKWebView _killWebContentProcess]):
(-[WKWebView _safeBrowsingWarning]):
(-[WKWebView _reloadWithoutContentBlockers]):
(-[WKWebView _reloadExpiredOnly]):
(-[WKWebView _killWebContentProcessAndResetState]):
(-[WKWebView _convertRectFromRootViewCoordinates:]):
(-[WKWebView _convertRectToRootViewCoordinates:]):
(-[WKWebView _requestTextInputContextsInRect:completionHandler:]):
(-[WKWebView _focusTextInputContext:completionHandler:]):
(-[WKWebView _takePDFSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _setShouldSuppressFirstResponderChanges:]):
(-[WKWebView _retainActiveFocusedState]):
(-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKWebView _snapshotLayerContentsForBackForwardListItem:]):
(-[WKWebView _dataDetectionResults]):
(-[WKWebView _accessibilityRetrieveSpeakSelectionContent]):
(-[WKWebView _accessibilityDidGetSpeakSelectionContent:]):
(-[WKWebView inputAssistantItem]):
(-[WKWebView _sessionStateData]):
(-[WKWebView _sessionState]):
(-[WKWebView _sessionStateWithFilter:]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
(-[WKWebView _close]):
(-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:options:completion:]):
(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):
(-[WKWebView _attachmentForIdentifier:]):
(-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]):
(+[WKWebView _handlesSafeBrowsing]):
(-[WKWebView _showSafeBrowsingWarningWithTitle:warning:details:completionHandler:]):
(-[WKWebView _showSafeBrowsingWarningWithURL:title:warning:details:completionHandler:]):
(+[WKWebView _confirmMalwareSentinel]):
(+[WKWebView _visitUnsafeWebsiteSentinel]):
(-[WKWebView _isJITEnabled:]):
(-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]):
(-[WKWebView _updateWebsitePolicies:]):
(-[WKWebView _allowsRemoteInspection]):
(-[WKWebView _setAllowsRemoteInspection:]):
(-[WKWebView _remoteInspectionNameOverride]):
(-[WKWebView _setRemoteInspectionNameOverride:]):
(-[WKWebView _addsVisitedLinks]):
(-[WKWebView _setAddsVisitedLinks:]):
(-[WKWebView _networkRequestsInProgress]):
(layoutMilestones):
(-[WKWebView _setObservedRenderingProgressEvents:]):
(-[WKWebView _getMainResourceDataWithCompletionHandler:]):
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
(-[WKWebView _getContentsAsStringWithCompletionHandler:]):
(-[WKWebView _getContentsAsAttributedStringWithCompletionHandler:]):
(-[WKWebView _getApplicationManifestWithCompletionHandler:]):
(-[WKWebView _paginationMode]):
(-[WKWebView _setPaginationMode:]):
(-[WKWebView _paginationBehavesLikeColumns]):
(-[WKWebView _setPaginationBehavesLikeColumns:]):
(-[WKWebView _pageLength]):
(-[WKWebView _setPageLength:]):
(-[WKWebView _gapBetweenPages]):
(-[WKWebView _setGapBetweenPages:]):
(-[WKWebView _paginationLineGridEnabled]):
(-[WKWebView _setPaginationLineGridEnabled:]):
(-[WKWebView _pageCount]):
(-[WKWebView _supportsTextZoom]):
(-[WKWebView _textZoomFactor]):
(-[WKWebView _setTextZoomFactor:]):
(-[WKWebView setPageZoom:]):
(-[WKWebView pageZoom]):
(-[WKWebView _pageZoomFactor]):
(-[WKWebView _setPageZoomFactor:]):
(-[WKWebView _diagnosticLoggingDelegate]):
(-[WKWebView _setDiagnosticLoggingDelegate:]):
(-[WKWebView _findDelegate]):
(-[WKWebView _setFindDelegate:]):
(toFindOptions):
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
(-[WKWebView _saveBackForwardSnapshotForItem:]):
(-[WKWebView _inputDelegate]):
(-[WKWebView _setInputDelegate:]):
(-[WKWebView _isDisplayingStandaloneImageDocument]):
(-[WKWebView _isDisplayingStandaloneMediaDocument]):
(-[WKWebView _isPlayingAudio]):
(-[WKWebView _isShowingNavigationGestureSnapshot]):
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _fixedLayoutSize]):
(-[WKWebView _setFixedLayoutSize:]):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _backgroundExtendsBeyondPage]):
(-[WKWebView _viewScale]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _setMinimumEffectiveDeviceWidth:]):
(-[WKWebView _minimumEffectiveDeviceWidth]):
(-[WKWebView _setScrollPerformanceDataCollectionEnabled:]):
(-[WKWebView _scrollPerformanceDataCollectionEnabled]):
(-[WKWebView _scrollPerformanceData]):
(-[WKWebView _allowsMediaDocumentInlinePlayback]):
(-[WKWebView _setAllowsMediaDocumentInlinePlayback:]):
(-[WKWebView _webProcessIsResponsive]):
(-[WKWebView _setFullscreenDelegate:]):
(-[WKWebView _fullscreenDelegate]):
(-[WKWebView _isInFullscreen]):
(-[WKWebView _mediaCaptureState]):
(-[WKWebView _setMediaCaptureEnabled:]):
(-[WKWebView _mediaCaptureEnabled]):
(-[WKWebView _setPageMuted:]):
(-[WKWebView _removeDataDetectedLinks:]):
(-[WKWebView _doAfterNextPresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
(-[WKWebView _doAfterNextStablePresentationUpdate:]):
(-[WKWebView _detectDataWithTypes:completionHandler:]):
(-[WKWebView removeFromSuperview]):
(-[WKWebView _minimumLayoutSizeOverride]):
(-[WKWebView _setViewLayoutSizeOverride:]):
(-[WKWebView _obscuredInsets]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _obscuredInsetEdgesAffectedBySafeArea]):
(-[WKWebView _setObscuredInsetEdgesAffectedBySafeArea:]):
(-[WKWebView _unobscuredSafeAreaInsets]):
(-[WKWebView _setUnobscuredSafeAreaInsets:]):
(-[WKWebView _safeAreaShouldAffectObscuredInsets]):
(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _interfaceOrientationOverride]):
(-[WKWebView _clearInterfaceOrientationOverride]):
(-[WKWebView _maximumUnobscuredSizeOverride]):
(-[WKWebView _setMaximumUnobscuredSizeOverride:]):
(-[WKWebView _setAllowsViewportShrinkToFit:]):
(-[WKWebView _allowsViewportShrinkToFit]):
(-[WKWebView _beginInteractiveObscuredInsetsChange]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):
(-[WKWebView _hideContentUntilNextUpdate]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _resizeWhileHidingContentWithUpdates:]):
(-[WKWebView _setOverlaidAccessoryViewsInset:]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _clearOverrideLayoutParameters]):
(viewportArgumentsFromDictionary):
(-[WKWebView _overrideViewportWithArguments:]):
(-[WKWebView _viewForFindUI]):
(-[WKWebView _isDisplayingPDF]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):
(-[WKWebView _webViewPrintFormatter]):
(toUserInterfaceLayoutDirection):
(-[WKWebView setSemanticContentAttribute:]):
(-[WKWebView _drawsBackground]):
(-[WKWebView _setDrawsBackground:]):
(-[WKWebView _backgroundColor]):
(-[WKWebView _setBackgroundColor:]):
(-[WKWebView _setDrawsTransparentBackground:]):
(-[WKWebView _inspectorAttachmentView]):
(-[WKWebView _setInspectorAttachmentView:]):
(-[WKWebView _setOverlayScrollbarStyle:]):
(-[WKWebView _overlayScrollbarStyle]):
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
(-[WKWebView shareSheetDidDismiss:]):
(-[WKWebView _setOverrideDeviceScaleFactor:]):
(-[WKWebView _overrideDeviceScaleFactor]):
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _pinnedState]):
(-[WKWebView _rubberBandingEnabled]):
(-[WKWebView _setRubberBandingEnabled:]):
(-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
(-[WKWebView _minimumLayoutWidth]):
(-[WKWebView _setMinimumLayoutWidth:]):
(-[WKWebView _shouldExpandContentToViewHeightForAutoLayout]):
(-[WKWebView _setShouldExpandContentToViewHeightForAutoLayout:]):
(-[WKWebView _alwaysShowsHorizontalScroller]):
(-[WKWebView _setAlwaysShowsHorizontalScroller:]):
(-[WKWebView _alwaysShowsVerticalScroller]):
(-[WKWebView _setAlwaysShowsVerticalScroller:]):
(-[WKWebView _printOperationWithPrintInfo:]):
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):
(-[WKWebView setUserInterfaceLayoutDirection:]):
(-[WKWebView _wantsMediaPlaybackControlsView]):
(-[WKWebView _setWantsMediaPlaybackControlsView:]):
(-[WKWebView _mediaPlaybackControlsView]):
(-[WKWebView _addMediaPlaybackControlsView:]):
(-[WKWebView _removeMediaPlaybackControlsView]):
(-[WKWebView _prepareForMoveToWindow:completionHandler:]):
(-[WKWebView _setThumbnailView:]):
(-[WKWebView _thumbnailView]):
(-[WKWebView _setIgnoresAllEvents:]):
(-[WKWebView _ignoresAllEvents]):
(-[WKWebView _spellCheckerDocumentTag]):
(-[WKWebView _setContinuousSpellCheckingEnabledForTesting:]): Deleted.
(-[WKWebView _contentsOfUserInterfaceItem:]): Deleted.
(-[WKWebView _setDeviceOrientationUserPermissionHandlerForTesting:]): Deleted.
(-[WKWebView keyboardAccessoryBarNext]): Deleted.
(-[WKWebView keyboardAccessoryBarPrevious]): Deleted.
(-[WKWebView applyAutocorrection:toString:withCompletionHandler:]): Deleted.
(-[WKWebView dismissFormAccessoryView]): Deleted.
(-[WKWebView _dismissFilePicker]): Deleted.
(-[WKWebView setTimePickerValueToHour:minute:]): Deleted.
(-[WKWebView selectFormAccessoryPickerRow:]): Deleted.
(-[WKWebView selectFormPopoverTitle]): Deleted.
(-[WKWebView textContentTypeForTesting]): Deleted.
(-[WKWebView formInputLabel]): Deleted.
(-[WKWebView _didShowContextMenu]): Deleted.
(-[WKWebView _didDismissContextMenu]): Deleted.
(-[WKWebView _inputViewBounds]): Deleted.
(-[WKWebView _uiTextSelectionRects]): Deleted.
(-[WKWebView _scrollingTreeAsText]): Deleted.
(-[WKWebView _stableStateOverride]): Deleted.
(-[WKWebView _propertiesOfLayerWithID:]): Deleted.
(-[WKWebView _doAfterResettingSingleTapGesture:]): Deleted.
(-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]): Deleted.
(-[WKWebView _requestControlledElementID]): Deleted.
(-[WKWebView _handleControlledElementIDResponse:]): Deleted.
(-[WKWebView _handleAcceptedCandidate:]): Deleted.
(-[WKWebView _didHandleAcceptedCandidate]): Deleted.
(-[WKWebView _didUpdateCandidateListVisibility:]): Deleted.
(-[WKWebView _forceRequestCandidates]): Deleted.
(-[WKWebView _shouldRequestCandidates]): Deleted.
(-[WKWebView _insertText:replacementRange:]): Deleted.
(-[WKWebView _candidateRect]): Deleted.
(-[WKWebView viewDidChangeEffectiveAppearance]): Deleted.
(-[WKWebView _setHeaderBannerHeight:]): Deleted.
(-[WKWebView _setFooterBannerHeight:]): Deleted.
(-[WKWebView _doAfterProcessingAllPendingMouseEvents:]): Deleted.
(-[WKWebView _activeMenu]): Deleted.
(-[WKWebView _requestActiveNowPlayingSessionInfo:]): Deleted.
(-[WKWebView _setPageScale:withOrigin:]): Deleted.
(-[WKWebView _pageScale]): Deleted.
(-[WKWebView _scrollingUpdatesDisabledForTesting]): Deleted.
(-[WKWebView _setScrollingUpdatesDisabledForTesting:]): Deleted.
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:]): Deleted.
(-[WKWebView _doAfterNextVisibleContentRectUpdate:]): Deleted.
(-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]): Deleted.
(-[WKWebView _dragCaretRect]): Deleted.
(-[WKWebView _simulateLongPressActionAtLocation:]): Deleted.
(-[WKWebView _simulateTextEntered:]): Deleted.
(-[WKWebView _dynamicUserInterfaceTraitDidChange]): Deleted.
(-[WKWebView _beginBackSwipeForTesting]): Deleted.
(-[WKWebView _completeBackSwipeForTesting]): Deleted.
(-[WKWebView _setDefersLoadingForTesting:]): Deleted.
(-[WKWebView _setShareSheetCompletesImmediatelyWithResolutionForTesting:]): Deleted.
(-[WKWebView _hasInspectorFrontend]): Deleted.
(-[WKWebView _processWillSuspendImminentlyForTesting]): Deleted.
(-[WKWebView _processDidResumeForTesting]): Deleted.
(-[WKWebView _setAssertionStateForTesting:]): Deleted.
(-[WKWebView _hasServiceWorkerBackgroundActivityForTesting]): Deleted.
(-[WKWebView _hasServiceWorkerForegroundActivityForTesting]): Deleted.
(-[WKWebView _denyNextUserMediaRequest]): Deleted.
(-[WKWebView _triggerSystemPreviewActionOnElement:document:page:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: Added.
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: Added.

(-[WKWebView _setPageScale:withOrigin:]):
(-[WKWebView _pageScale]):
(-[WKWebView _setContinuousSpellCheckingEnabledForTesting:]):
(-[WKWebView _contentsOfUserInterfaceItem:]):
(-[WKWebView _requestActiveNowPlayingSessionInfo:]):
(-[WKWebView _scrollingUpdatesDisabledForTesting]):
(-[WKWebView _setScrollingUpdatesDisabledForTesting:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:]):
(-[WKWebView _doAfterNextVisibleContentRectUpdate:]):
(-[WKWebView _disableBackForwardSnapshotVolatilityForTesting]):
(-[WKWebView _beginBackSwipeForTesting]):
(-[WKWebView _completeBackSwipeForTesting]):
(-[WKWebView _setDefersLoadingForTesting:]):
(-[WKWebView _setShareSheetCompletesImmediatelyWithResolutionForTesting:]):
(-[WKWebView _hasInspectorFrontend]):
(-[WKWebView _processWillSuspendImminentlyForTesting]):
(-[WKWebView _processDidResumeForTesting]):
(-[WKWebView _setAssertionStateForTesting:]):
(-[WKWebView _hasServiceWorkerBackgroundActivityForTesting]):
(-[WKWebView _hasServiceWorkerForegroundActivityForTesting]):
(-[WKWebView _denyNextUserMediaRequest]):

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h: Added.
  • UIProcess/API/ios/WKWebViewTestingIOS.mm: Added.

(-[WKWebView keyboardAccessoryBarNext]):
(-[WKWebView keyboardAccessoryBarPrevious]):
(-[WKWebView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKWebView dismissFormAccessoryView]):
(-[WKWebView _dismissFilePicker]):
(-[WKWebView setTimePickerValueToHour:minute:]):
(-[WKWebView selectFormAccessoryPickerRow:]):
(-[WKWebView selectFormPopoverTitle]):
(-[WKWebView textContentTypeForTesting]):
(-[WKWebView formInputLabel]):
(-[WKWebView _didShowContextMenu]):
(-[WKWebView _didDismissContextMenu]):
(-[WKWebView _inputViewBounds]):
(-[WKWebView _uiTextSelectionRects]):
(-[WKWebView _scrollingTreeAsText]):
(-[WKWebView _stableStateOverride]):
(-[WKWebView _propertiesOfLayerWithID:]):
(-[WKWebView _doAfterResettingSingleTapGesture:]):
(-[WKWebView _doAfterReceivingEditDragSnapshotForTesting:]):
(-[WKWebView _dragCaretRect]):
(-[WKWebView _simulateLongPressActionAtLocation:]):
(-[WKWebView _simulateTextEntered:]):
(-[WKWebView _dynamicUserInterfaceTraitDidChange]):
(-[WKWebView _triggerSystemPreviewActionOnElement:document:page:]):
(-[WKWebView _setDeviceOrientationUserPermissionHandlerForTesting:]):

  • UIProcess/API/mac/WKWebViewPrivateForTestingMac.h: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm.
  • UIProcess/API/mac/WKWebViewTestingMac.mm: Added.

(-[WKWebView _requestControlledElementID]):
(-[WKWebView _handleControlledElementIDResponse:]):
(-[WKWebView _handleAcceptedCandidate:]):
(-[WKWebView _didHandleAcceptedCandidate]):
(-[WKWebView _didUpdateCandidateListVisibility:]):
(-[WKWebView _forceRequestCandidates]):
(-[WKWebView _shouldRequestCandidates]):
(-[WKWebView _insertText:replacementRange:]):
(-[WKWebView _candidateRect]):
(-[WKWebView viewDidChangeEffectiveAppearance]):
(-[WKWebView _setHeaderBannerHeight:]):
(-[WKWebView _setFooterBannerHeight:]):
(-[WKWebView _doAfterProcessingAllPendingMouseEvents:]):
(-[WKWebView _activeMenu]):

  • UIProcess/Cocoa/PageClientImplCocoa.mm:
  • UIProcess/ios/PageClientImplIOS.mm:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • UIProcess/ios/WKMouseGestureRecognizer.h:
  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/WKFullScreenWindowController.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Move testing-only SPI to new private headers to discourage first parties from using
them by mistake. Move test-only code to new files to reduce the size of WKWebView.mm.

  • MiniBrowser/mac/WK2BrowserWindowController.m:
  • TestWebKitAPI/EditingTestHarness.mm:
  • TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm:
  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
  • TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/FocusPreservationTests.mm:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
  • TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
  • WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm:
  • WebKitTestRunner/ios/TestControllerIOS.mm:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:
  • WebKitTestRunner/mac/UIScriptControllerMac.mm:
Location:
trunk
Files:
6 added
51 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r253454 r253465  
     12019-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
    14322019-12-12  Per Arne Vollan  <pvollan@apple.com>
    2433
  • trunk/Source/WebKit/SourcesCocoa.txt

    r253396 r253465  
    323323UIProcess/API/Cocoa/WKWebsiteDataStore.mm
    324324UIProcess/API/Cocoa/WKWebView.mm
     325UIProcess/API/Cocoa/WKWebViewTesting.mm
    325326UIProcess/API/Cocoa/WKWebViewConfiguration.mm
    326327UIProcess/API/Cocoa/WKWebpagePreferences.mm
    327328UIProcess/API/Cocoa/WKWindowFeatures.mm
    328329
     330UIProcess/API/ios/WKWebViewTestingIOS.mm
     331
    329332UIProcess/API/mac/WKView.mm
     333UIProcess/API/mac/WKWebViewTestingMac.mm
    330334
    331335UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h

    r253396 r253465  
    4040@class _WKElementAction;
    4141@class _WKFrameHandle;
     42@class _WKInspector;
    4243
    4344#if TARGET_OS_IOS
     
    183184- (void)_webView:(WKWebView *)webView dataInteractionOperationWasHandled:(BOOL)handled forSession:(id)session itemProviders:(NSArray *)itemProviders WK_API_AVAILABLE(ios(11.0));
    184185- (NSUInteger)_webView:(WKWebView *)webView willUpdateDataInteractionOperationToOperation:(NSUInteger)operation forSession:(id)session WK_API_AVAILABLE(ios(11.0));
     186
    185187#if TARGET_OS_IOS
    186188- (UIDropProposal *)_webView:(WKWebView *)webView willUpdateDropProposalToProposal:(UIDropProposal *)proposal forSession:(id <UIDropSession>)session WK_API_AVAILABLE(ios(12.2));
     
    191193- (NSInteger)_webView:(WKWebView *)webView dataOwnerForDragSession:(id <UIDragSession>)session WK_API_AVAILABLE(ios(11.0));
    192194#endif
     195
    193196- (void)_webView:(WKWebView *)webView didChangeSafeAreaShouldAffectObscuredInsets:(BOOL)safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(11.0));
    194197- (void)_webView:(WKWebView *)webView didPresentFocusedElementViewController:(UIViewController *)controller WK_API_AVAILABLE(ios(12.0));
     
    205208
    206209#else // !TARGET_OS_IPHONE
     210
    207211- (void)_prepareForImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macos(10.13.4));
    208212- (void)_cancelImmediateActionAnimationForWebView:(WKWebView *)webView WK_API_AVAILABLE(macos(10.13.4));
     
    238242*/
    239243- (void)_webView:(WKWebView *)webView didAttachInspector:(_WKInspector *)inspector WK_API_AVAILABLE(macos(WK_MAC_TBA));
     244
    240245#endif // !TARGET_OS_IPHONE
    241246
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r253396 r253465  
    5353#import "TextCheckerState.h"
    5454#import "UIDelegate.h"
    55 #import "UserMediaProcessManager.h"
    5655#import "VersionChecks.h"
    5756#import "VideoFullscreenManagerProxy.h"
     
    8180#import "WKWebViewConfigurationInternal.h"
    8281#import "WKWebViewContentProvider.h"
     82#import "WKWebViewPrivateForTestingIOS.h"
    8383#import "WKWebpagePreferencesInternal.h"
    8484#import "WKWebsiteDataStoreInternal.h"
     
    125125#import <WebCore/StringUtilities.h>
    126126#import <WebCore/TextManipulationController.h>
    127 #import <WebCore/ValidationBubble.h>
    128127#import <WebCore/ViewportArguments.h>
    129128#import <WebCore/WritingMode.h>
     
    283282    WeakObjCPtr<id <_WKInputDelegate>> _inputDelegate;
    284283
    285     Optional<BOOL> _resolutionForShareSheetImmediateCompletionForTesting;
    286284    RetainPtr<WKSafeBrowsingWarning> _safeBrowsingWarning;
    287285
    288286    BOOL _usePlatformFindUI;
    289 
    290     WeakObjCPtr<id <_WKTextManipulationDelegate>> _textManipulationDelegate;
    291287
    292288#if PLATFORM(IOS_FAMILY)
    293289    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
    294 
    295     RetainPtr<WKScrollView> _scrollView;
    296     RetainPtr<WKContentView> _contentView;
    297 
    298 #if ENABLE(FULLSCREEN_API)
    299     RetainPtr<WKFullScreenWindowController> _fullScreenWindowController;
    300 #endif
    301290
    302291    Optional<CGSize> _viewLayoutSizeOverride;
     
    305294    Optional<WebCore::FloatSize> _lastSentMaximumUnobscuredSize;
    306295
    307     CGRect _inputViewBounds;
    308296    CGFloat _viewportMetaTagWidth;
    309297    BOOL _viewportMetaTagWidthWasExplicit;
     
    350338    double _scaleToRestore;
    351339
    352     std::unique_ptr<WebKit::ViewGestureController> _gestureController;
    353340    BOOL _allowsBackForwardNavigationGestures;
    354341
     
    382369    BOOL _hasScheduledVisibleRectUpdate;
    383370    BOOL _visibleContentRectUpdateScheduledFromScrollViewInStableState;
    384     Vector<BlockPtr<void ()>> _visibleContentRectUpdateCallbacks;
    385371
    386372    _WKDragInteractionPolicy _dragInteractionPolicy;
     
    398384#endif
    399385#if PLATFORM(MAC)
    400     std::unique_ptr<WebKit::WebViewImpl> _impl;
    401386    RetainPtr<WKTextFinderClient> _textFinderClient;
    402387#endif
     
    14311416}
    14321417
     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
    14331453#if ENABLE(ATTACHMENT_ELEMENT)
    14341454
     
    14591479
    14601480#if PLATFORM(IOS_FAMILY)
    1461 
    1462 - (BOOL)_contentViewIsFirstResponder
    1463 {
    1464     return self._currentContentView.isFirstResponder;
    1465 }
    14661481
    14671482- (BOOL)_shouldAvoidResizingWhenInputViewBoundsChange
     
    36743689{
    36753690    _impl->handleDOMPasteRequestWithResult(WebCore::DOMPasteAccessResponse::GrantedForGesture);
     3691}
     3692
     3693- (void)_prepareForImmediateActionAnimation
     3694{
     3695}
     3696
     3697- (void)_cancelImmediateActionAnimation
     3698{
     3699}
     3700
     3701- (void)_completeImmediateActionAnimation
     3702{
    36763703}
    36773704
     
    48314858}
    48324859
     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
    48334987#endif // PLATFORM(MAC)
    48344988
     
    48655019}
    48665020
     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
    48675100#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}
    48685115
    48695116- (BOOL)_isEditable
     
    48895136}
    48905137
     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}
    48915223- (void)_takeFindStringFromSelection:(id)sender
    48925224{
     
    61446476}
    61456477
     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
    61466508#pragma mark iOS-specific methods
    61476509
     
    64696831        _waitingForEndAnimatedResize = NO;
    64706832    }
     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    }];
    64716844}
    64726845
     
    69247297#undef FORWARD_ACTION_TO_WKCONTENTVIEW
    69257298
    6926 @implementation WKWebView (WKTesting)
    6927 
    6928 - (void)_setContinuousSpellCheckingEnabledForTesting:(BOOL)enabled
    6929 {
    6930 #if PLATFORM(IOS_FAMILY)
    6931     [_contentView setContinuousSpellCheckingEnabled:enabled];
    6932 #else
    6933     _impl->setContinuousSpellCheckingEnabled(enabled);
    6934 #endif
    6935 }
    6936 
    6937 - (NSDictionary *)_contentsOfUserInterfaceItem:(NSString *)userInterfaceItem
    6938 {
    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 #else
    6949     return nil;
    6950 #endif
    6951 }
    6952 
    6953 #if PLATFORM(IOS_FAMILY)
    6954 - (void)_requestActivatedElementAtPosition:(CGPoint)position completionBlock:(void (^)(_WKActivatedElementInfo *))block
    6955 {
    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))completionHandler
    6965 {
    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 (^)())handler
    6977 {
    6978     Function<bool()> handlerWrapper;
    6979     if (handler)
    6980         handlerWrapper = [handler = makeBlockPtr(handler)] { return handler(); };
    6981     _page->setDeviceOrientationUserPermissionHandlerForTesting(WTFMove(handlerWrapper));
    6982 }
    6983 
    6984 - (void)_accessibilityStoreSelection
    6985 {
    6986     [_contentView _accessibilityStoreSelection];
    6987 }
    6988 
    6989 - (void)_accessibilityClearSelection
    6990 {
    6991     [_contentView _accessibilityClearSelection];
    6992 }
    6993 
    6994 - (UIView *)_fullScreenPlaceholderView
    6995 {
    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)_contentVisibleRect
    7004 {
    7005     return [self convertRect:[self bounds] toView:self._currentContentView];
    7006 }
    7007 
    7008 - (CGPoint)_convertPointFromContentsToView:(CGPoint)point
    7009 {
    7010     return [self convertPoint:point fromView:self._currentContentView];
    7011 }
    7012 
    7013 - (CGPoint)_convertPointFromViewToContents:(CGPoint)point
    7014 {
    7015     return [self convertPoint:point toView:self._currentContentView];
    7016 }
    7017 
    7018 - (void)keyboardAccessoryBarNext
    7019 {
    7020     [_contentView accessoryTab:YES];
    7021 }
    7022 
    7023 - (void)keyboardAccessoryBarPrevious
    7024 {
    7025     [_contentView accessoryTab:NO];
    7026 }
    7027 
    7028 - (void)applyAutocorrection:(NSString *)newString toString:(NSString *)oldString withCompletionHandler:(void (^)(void))completionHandler
    7029 {
    7030     [_contentView applyAutocorrection:newString toString:oldString withCompletionHandler:[capturedCompletionHandler = makeBlockPtr(completionHandler)] (UIWKAutocorrectionRects *rects) {
    7031         capturedCompletionHandler();
    7032     }];
    7033 }
    7034 
    7035 - (void)dismissFormAccessoryView
    7036 {
    7037     [_contentView accessoryDone];
    7038 }
    7039 
    7040 - (void)_dismissFilePicker
    7041 {
    7042     [_contentView dismissFilePicker];
    7043 }
    7044 
    7045 - (void)setTimePickerValueToHour:(NSInteger)hour minute:(NSInteger)minute
    7046 {
    7047     [_contentView setTimePickerValueToHour:hour minute:minute];
    7048 }
    7049 
    7050 - (void)selectFormAccessoryPickerRow:(int)rowIndex
    7051 {
    7052     [_contentView selectFormAccessoryPickerRow:rowIndex];
    7053 }
    7054 
    7055 - (NSString *)selectFormPopoverTitle
    7056 {
    7057     return [_contentView selectFormPopoverTitle];
    7058 }
    7059 
    7060 - (NSString *)textContentTypeForTesting
    7061 {
    7062     return [_contentView textContentTypeForTesting];
    7063 }
    7064 
    7065 - (NSString *)formInputLabel
    7066 {
    7067     return [_contentView formInputLabel];
    7068 }
    7069 
    7070 - (void)didStartFormControlInteraction
    7071 {
    7072     // For subclasses to override.
    7073 }
    7074 
    7075 - (void)didEndFormControlInteraction
    7076 {
    7077     // For subclasses to override.
    7078 }
    7079 
    7080 - (void)_didShowContextMenu
    7081 {
    7082     // For subclasses to override.
    7083 }
    7084 
    7085 - (void)_didDismissContextMenu
    7086 {
    7087     // For subclasses to override.
    7088 }
    7089 
    7090 - (CGRect)_uiTextCaretRect
    7091 {
    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)_inputViewBounds
    7099 {
    7100     return _inputViewBounds;
    7101 }
    7102 
    7103 - (NSArray<NSValue *> *)_uiTextSelectionRects
    7104 {
    7105     // Force the selection view to update if needed.
    7106     [_contentView _updateChangedSelection];
    7107 
    7108     return [_contentView _uiTextSelectionRects];
    7109 }
    7110 
    7111 - (NSString *)_scrollingTreeAsText
    7112 {
    7113     WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy();
    7114     if (!coordinator)
    7115         return @"";
    7116 
    7117     return coordinator->scrollingTreeAsText();
    7118 }
    7119 
    7120 - (NSNumber *)_stableStateOverride
    7121 {
    7122     // For subclasses to override.
    7123     return nil;
    7124 }
    7125 
    7126 - (void)_doAfterNextStablePresentationUpdate:(dispatch_block_t)updateBlock
    7127 {
    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)_firePresentationUpdateForPendingStableStatePresentationCallbacks
    7144 {
    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)layerID
    7155 {
    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)action
    7232 {
    7233     [_contentView _doAfterResettingSingleTapGesture:action];
    7234 }
    7235 
    7236 - (void)_doAfterReceivingEditDragSnapshotForTesting:(dispatch_block_t)action
    7237 {
    7238     [_contentView _doAfterReceivingEditDragSnapshotForTesting:action];
    7239 }
    7240 
    7241 #endif // PLATFORM(IOS_FAMILY)
    7242 
    7243 #if PLATFORM(MAC)
    7244 - (WKPageRef)_pageRefForTransitionToWKWebView
    7245 {
    7246     return toAPI(_page.get());
    7247 }
    7248 
    7249 - (void)_dismissContentRelativeChildWindows
    7250 {
    7251     _impl->dismissContentRelativeChildWindowsFromViewOnly();
    7252 }
    7253 
    7254 - (void)_setFrame:(NSRect)rect andScrollBy:(NSSize)offset
    7255 {
    7256     _impl->setFrameAndScrollBy(NSRectToCGRect(rect), NSSizeToCGSize(offset));
    7257 }
    7258 
    7259 - (void)_setTotalHeightOfBanners:(CGFloat)totalHeightOfBanners
    7260 {
    7261     _impl->setTotalHeightOfBanners(totalHeightOfBanners);
    7262 }
    7263 
    7264 - (CGFloat)_totalHeightOfBanners
    7265 {
    7266     return _impl->totalHeightOfBanners();
    7267 }
    7268 
    7269 - (void)_beginDeferringViewInWindowChanges
    7270 {
    7271     _impl->beginDeferringViewInWindowChanges();
    7272 }
    7273 
    7274 - (void)_endDeferringViewInWindowChanges
    7275 {
    7276     _impl->endDeferringViewInWindowChanges();
    7277 }
    7278 
    7279 - (void)_endDeferringViewInWindowChangesSync
    7280 {
    7281     _impl->endDeferringViewInWindowChangesSync();
    7282 }
    7283 
    7284 - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event
    7285 {
    7286     _impl->gestureEventWasNotHandledByWebCoreFromViewOnly(event);
    7287 }
    7288 
    7289 - (void)_setIgnoresNonWheelEvents:(BOOL)ignoresNonWheelEvents
    7290 {
    7291     _impl->setIgnoresNonWheelEvents(ignoresNonWheelEvents);
    7292 }
    7293 
    7294 - (BOOL)_ignoresNonWheelEvents
    7295 {
    7296     return _impl->ignoresNonWheelEvents();
    7297 }
    7298 
    7299 - (void)_setCustomSwipeViews:(NSArray *)customSwipeViews
    7300 {
    7301     _impl->setCustomSwipeViews(customSwipeViews);
    7302 }
    7303 
    7304 - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset
    7305 {
    7306     _impl->setCustomSwipeViewsTopContentInset(topContentInset);
    7307 }
    7308 
    7309 - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState
    7310 {
    7311     return _impl->tryToSwipeWithEvent(event, ignoringPinnedState);
    7312 }
    7313 
    7314 - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback
    7315 {
    7316     _impl->setDidMoveSwipeSnapshotCallback(callback);
    7317 }
    7318 
    7319 - (NSView *)_fullScreenPlaceholderView
    7320 {
    7321     return _impl->fullScreenPlaceholderView();
    7322 }
    7323 
    7324 - (NSWindow *)_fullScreenWindow
    7325 {
    7326     return _impl->fullScreenWindow();
    7327 }
    7328 
    7329 - (void)_disableFrameSizeUpdates
    7330 {
    7331     _impl->disableFrameSizeUpdates();
    7332 }
    7333 
    7334 - (void)_enableFrameSizeUpdates
    7335 {
    7336     _impl->enableFrameSizeUpdates();
    7337 }
    7338 
    7339 - (void)_prepareForImmediateActionAnimation
    7340 {
    7341 }
    7342 
    7343 - (void)_cancelImmediateActionAnimation
    7344 {
    7345 }
    7346 
    7347 - (void)_completeImmediateActionAnimation
    7348 {
    7349 }
    7350 
    7351 - (BOOL)_canChangeFrameLayout:(_WKFrameHandle *)frameHandle
    7352 {
    7353     if (auto* webFrameProxy = _page->process().webFrame(WebCore::frameIdentifierFromID(frameHandle._frameID)))
    7354         return _impl->canChangeFrameLayout(*webFrameProxy);
    7355     return false;
    7356 }
    7357 
    7358 - (NSColor *)_underlayColor
    7359 {
    7360     return _impl->underlayColor();
    7361 }
    7362 
    7363 - (void)_setUnderlayColor:(NSColor *)underlayColor
    7364 {
    7365     _impl->setUnderlayColor(underlayColor);
    7366 }
    7367 
    7368 - (BOOL)_hasActiveVideoForControlsManager
    7369 {
    7370     return _page && _page->hasActiveVideoForControlsManager();
    7371 }
    7372 
    7373 - (void)_requestControlledElementID
    7374 {
    7375     if (_page)
    7376         _page->requestControlledElementID();
    7377 }
    7378 
    7379 - (void)_handleControlledElementIDResponse:(NSString *)identifier
    7380 {
    7381     // Overridden by subclasses.
    7382 }
    7383 
    7384 - (void)_handleAcceptedCandidate:(NSTextCheckingResult *)candidate
    7385 {
    7386     _impl->handleAcceptedCandidate(candidate);
    7387 }
    7388 
    7389 - (void)_didHandleAcceptedCandidate
    7390 {
    7391     // Overridden by subclasses.
    7392 }
    7393 
    7394 - (void)_didUpdateCandidateListVisibility:(BOOL)visible
    7395 {
    7396     // Overridden by subclasses.
    7397 }
    7398 
    7399 - (void)_forceRequestCandidates
    7400 {
    7401     _impl->forceRequestCandidatesForTesting();
    7402 }
    7403 
    7404 - (BOOL)_shouldRequestCandidates
    7405 {
    7406     return _impl->shouldRequestCandidates();
    7407 }
    7408 
    7409 - (void)_insertText:(id)string replacementRange:(NSRange)replacementRange
    7410 {
    7411     [self insertText:string replacementRange:replacementRange];
    7412 }
    7413 
    7414 - (NSRect)_candidateRect
    7415 {
    7416     return _page->editorState().postLayoutData().focusedElementRect;
    7417 }
    7418 
    7419 - (BOOL)_useSystemAppearance
    7420 {
    7421     return _impl->useSystemAppearance();
    7422 }
    7423 
    7424 - (void)_setUseSystemAppearance:(BOOL)useSystemAppearance
    7425 {
    7426     _impl->setUseSystemAppearance(useSystemAppearance);
    7427 }
    7428 
    7429 - (void)viewDidChangeEffectiveAppearance
    7430 {
    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)height
    7440 {
    7441     _page->setHeaderBannerHeightForTesting(height);
    7442 }
    7443 
    7444 - (void)_setFooterBannerHeight:(int)height
    7445 {
    7446     _page->setFooterBannerHeightForTesting(height);
    7447 }
    7448 
    7449 - (void)_doAfterProcessingAllPendingMouseEvents:(dispatch_block_t)action
    7450 {
    7451     _impl->doAfterProcessingAllPendingMouseEvents(action);
    7452 }
    7453 
    7454 - (NSMenu *)_activeMenu
    7455 {
    7456     // FIXME: Only the DOM paste access menu is supported for now. In the future, it could be
    7457     // 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))callback
    7464 {
    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)origin
    7479 {
    7480     _page->scalePage(scale, WebCore::roundedIntPoint(origin));
    7481 }
    7482 
    7483 - (CGFloat)_pageScale
    7484 {
    7485     return _page->pageScaleFactor();
    7486 }
    7487 
    7488 - (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize
    7489 {
    7490 #if PLATFORM(IOS_FAMILY)
    7491     if (![self usesStandardContentView]) {
    7492         dispatch_async(dispatch_get_main_queue(), updateBlock);
    7493         return;
    7494     }
    7495 #endif
    7496 
    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 #else
    7516         UNUSED_PARAM(withoutWaitingForAnimatedResize);
    7517 #endif
    7518 
    7519         updateBlockCopy();
    7520     });
    7521 }
    7522 
    7523 - (BOOL)_scrollingUpdatesDisabledForTesting
    7524 {
    7525     // For subclasses to override;
    7526     return NO;
    7527 }
    7528 
    7529 - (void)_setScrollingUpdatesDisabledForTesting:(BOOL)disabled
    7530 {
    7531 }
    7532 
    7533 // Execute the supplied block after the next transaction from the WebProcess.
    7534 - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock
    7535 {
    7536     [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:NO];
    7537 }
    7538 
    7539 - (void)_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeForTesting:(void (^)(void))updateBlock
    7540 {
    7541     [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:YES];
    7542 }
    7543 
    7544 - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock
    7545 {
    7546     [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:YES withoutWaitingForAnimatedResize:NO];
    7547 }
    7548 
    7549 - (void)_doAfterNextVisibleContentRectUpdate:(void (^)(void))updateBlock
    7550 {
    7551 #if PLATFORM(IOS_FAMILY)
    7552     _visibleContentRectUpdateCallbacks.append(makeBlockPtr(updateBlock));
    7553     [self _scheduleVisibleContentRectUpdate];
    7554 #else
    7555     dispatch_async(dispatch_get_main_queue(), updateBlock);
    7556 #endif
    7557 }
    7558 
    7559 - (void)_disableBackForwardSnapshotVolatilityForTesting
    7560 {
    7561     WebKit::ViewSnapshotStore::singleton().setDisableSnapshotVolatilityForTesting(true);
    7562 }
    7563 
    7564 - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion
    7565 {
    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>)_textManipulationDelegate
    7573 {
    7574     return _textManipulationDelegate.getAutoreleased();
    7575 }
    7576 
    7577 - (void)_setTextManipulationDelegate:(id <_WKTextManipulationDelegate>)delegate
    7578 {
    7579     _textManipulationDelegate = delegate;
    7580 }
    7581 
    7582 - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)configuration completion:(void(^)())completionHandler
    7583 {
    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             else
    7600                 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))completionHandler
    7631 {
    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)_dragCaretRect
    7653 {
    7654 #if ENABLE(DRAG_SUPPORT)
    7655     return _page->currentDragCaretRect();
    7656 #else
    7657     return CGRectZero;
    7658 #endif
    7659 }
    7660 
    7661 - (void)_simulateLongPressActionAtLocation:(CGPoint)location
    7662 {
    7663     [_contentView _simulateLongPressActionAtLocation:location];
    7664 }
    7665 
    7666 - (void)_simulateTextEntered:(NSString *)text
    7667 {
    7668     [_contentView _simulateTextEntered:text];
    7669 }
    7670 
    7671 - (void)_dynamicUserInterfaceTraitDidChange
    7672 {
    7673     if (!_page)
    7674         return;
    7675     _page->effectiveAppearanceDidChange();
    7676     [self _updateScrollViewBackground];
    7677 }
    7678 
    7679 #endif // PLATFORM(IOS_FAMILY)
    7680 
    7681 - (BOOL)_beginBackSwipeForTesting
    7682 {
    7683 #if PLATFORM(MAC)
    7684     return _impl->beginBackSwipeForTesting();
    7685 #else
    7686     if (!_gestureController)
    7687         return NO;
    7688     return _gestureController->beginSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);
    7689 #endif
    7690 }
    7691 
    7692 - (BOOL)_completeBackSwipeForTesting
    7693 {
    7694 #if PLATFORM(MAC)
    7695     return _impl->completeBackSwipeForTesting();
    7696 #else
    7697     if (!_gestureController)
    7698         return NO;
    7699     return _gestureController->completeSimulatedSwipeInDirectionForTesting(WebKit::ViewGestureController::SwipeDirection::Back);
    7700 #endif
    7701 }
    7702 
    7703 - (void)_setDefersLoadingForTesting:(BOOL)defersLoading
    7704 {
    7705     _page->setDefersLoadingForTesting(defersLoading);
    7706 }
    7707 
    7708 - (void)_setShareSheetCompletesImmediatelyWithResolutionForTesting:(BOOL)resolved
    7709 {
    7710     _resolutionForShareSheetImmediateCompletionForTesting = resolved;
    7711 }
    7712 
    7713 - (BOOL)_hasInspectorFrontend
    7714 {
    7715     return _page && _page->hasInspectorFrontend();
    7716 }
    7717 
    7718 - (_WKInspector *)_inspector
    7719 {
    7720     if (auto* inspector = _page->inspector())
    7721         return wrapper(*inspector);
    7722     return nil;
    7723 }
    7724 
    7725 - (_WKFrameHandle *)_mainFrame
    7726 {
    7727     if (auto* frame = _page->mainFrame())
    7728         return wrapper(API::FrameHandle::create(frame->frameID()));
    7729     return nil;
    7730 }
    7731 
    7732 - (void)_processWillSuspendImminentlyForTesting
    7733 {
    7734     if (_page)
    7735         _page->process().sendPrepareToSuspend(WebKit::IsSuspensionImminent::Yes, [] { });
    7736 }
    7737 
    7738 - (void)_processDidResumeForTesting
    7739 {
    7740     if (_page)
    7741         _page->process().sendProcessDidResume();
    7742 }
    7743 
    7744 - (void)_setAssertionStateForTesting:(int)value
    7745 {
    7746     if (!_page)
    7747         return;
    7748 
    7749     _page->process().setAssertionStateForTesting(static_cast<WebKit::AssertionState>(value));
    7750 }
    7751 
    7752 - (BOOL)_hasServiceWorkerBackgroundActivityForTesting
    7753 {
    7754 #if ENABLE(SERVICE_WORKER)
    7755     return _page ? _page->process().processPool().hasServiceWorkerBackgroundActivityForTesting() : false;
    7756 #else
    7757     return false;
    7758 #endif
    7759 }
    7760 
    7761 - (BOOL)_hasServiceWorkerForegroundActivityForTesting
    7762 {
    7763 #if ENABLE(SERVICE_WORKER)
    7764     return _page ? _page->process().processPool().hasServiceWorkerForegroundActivityForTesting() : false;
    7765 #else
    7766     return false;
    7767 #endif
    7768 }
    7769 
    7770 - (void)_denyNextUserMediaRequest
    7771 {
    7772 #if ENABLE(MEDIA_STREAM)
    7773     WebKit::UserMediaProcessManager::singleton().denyNextUserMediaRequest();
    7774 #endif
    7775 }
    7776 
    7777 #if PLATFORM(IOS_FAMILY)
    7778 - (void)_triggerSystemPreviewActionOnElement:(uint64_t)elementID document:(uint64_t)documentID page:(uint64_t)pageID
    7779 {
    7780 #if USE(SYSTEM_PREVIEW)
    7781     if (_page) {
    7782         if (auto* previewController = _page->systemPreviewController())
    7783             previewController->triggerSystemPreviewActionWithTargetForTesting(elementID, documentID, pageID);
    7784     }
    7785 #endif
    7786 }
    7787 #endif
    7788 
    7789 @end
    7790 
    77917299#if ENABLE(FULLSCREEN_API) && PLATFORM(IOS_FAMILY)
    77927300
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h

    r253396 r253465  
    3535#import <wtf/RetainPtr.h>
    3636#import <wtf/Variant.h>
     37#include <wtf/WeakObjCPtr.h>
    3738
    3839#if PLATFORM(IOS_FAMILY)
     
    6970class WebPageProxy;
    7071struct PrintInfo;
     72#if PLATFORM(MAC)
     73class WebViewImpl;
     74#endif
     75#if PLATFORM(IOS_FAMILY)
     76class ViewGestureController;
     77#endif
    7178}
    7279
     
    7481@class WKPasswordView;
    7582@class _WKFrameHandle;
     83#if PLATFORM(IOS_FAMILY)
     84@class WKScrollView;
     85@class WKFullScreenWindowController;
     86#endif
     87@protocol _WKTextManipulationDelegate;
    7688
    7789@interface WKWebView () WK_WEB_VIEW_PROTOCOLS {
     
    7991@package
    8092    RetainPtr<WKWebViewConfiguration> _configuration;
    81 
    8293    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
    83113}
    84114
     
    88118- (void)_didRelaunchProcess;
    89119
     120- (UIView *)_currentContentView;
     121
    90122- (void)_didCommitLoadForMainFrame;
    91123- (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction;
     
    100132- (void)_scrollToContentScrollPosition:(WebCore::FloatPoint)scrollPosition scrollOrigin:(WebCore::IntPoint)scrollOrigin;
    101133- (BOOL)_scrollToRect:(WebCore::FloatRect)targetRect origin:(WebCore::FloatPoint)origin minimumScrollDistance:(float)minimumScrollDistance;
     134
    102135- (double)_initialScaleFactor;
    103136- (double)_contentZoomScale;
     137
    104138- (double)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale;
    105139- (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;
     
    157191
    158192@property (nonatomic, readonly) WKPasswordView *_passwordView;
     193@property (nonatomic, readonly) WKWebViewContentProviderRegistry *_contentProviderRegistry;
     194@property (nonatomic, readonly) WKSelectionGranularity _selectionGranularity;
    159195
    160196@property (nonatomic, readonly) BOOL _isBackground;
    161 
    162 @property (nonatomic, readonly) WKWebViewContentProviderRegistry *_contentProviderRegistry;
    163 
    164 @property (nonatomic, readonly) WKSelectionGranularity _selectionGranularity;
    165 
    166197@property (nonatomic, readonly) BOOL _allowsDoubleTapGestures;
    167198@property (nonatomic, readonly) BOOL _stylusTapGestureShouldCreateEditableImage;
     
    173204- (BOOL)_effectiveAppearanceIsDark;
    174205- (BOOL)_effectiveUserInterfaceLevelIsElevated;
     206
    175207#endif // PLATFORM(IOS_FAMILY)
    176208
     
    181213#endif
    182214
     215- (void)_internalDoAfterNextPresentationUpdate:(void (^)(void))updateBlock withoutWaitingForPainting:(BOOL)withoutWaitingForPainting withoutWaitingForAnimatedResize:(BOOL)withoutWaitingForAnimatedResize;
     216
    183217- (void)_showSafeBrowsingWarning:(const WebKit::SafeBrowsingWarning&)warning completionHandler:(CompletionHandler<void(Variant<WebKit::ContinueUnsafeLoad, URL>&&)>&&)completionHandler;
    184218- (void)_clearSafeBrowsingWarning;
     
    191225
    192226#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;
    193233- (void)_web_grantDOMPasteAccess;
     234
    194235#endif
    195236
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h

    r253396 r253465  
    173173@property (nonatomic, setter=_setAllowsRemoteInspection:) BOOL _allowsRemoteInspection;
    174174@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));
    175181
    176182@property (nonatomic, setter=_setAddsVisitedLinks:) BOOL _addsVisitedLinks;
     
    212218- (void)_showSafeBrowsingWarningWithTitle:(NSString *)title warning:(NSString *)warning details:(NSAttributedString *)details completionHandler:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.14.4), ios(12.2));
    213219- (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));
    214228
    215229- (void)_isJITEnabled:(void(^)(BOOL))completionHandler WK_API_AVAILABLE(macos(10.14.4), ios(12.2));
     
    239253#if TARGET_OS_IPHONE
    240254
     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
    241259- (void)_setFont:(UIFont *)font sender:(id)sender WK_API_AVAILABLE(ios(12.2));
    242260- (void)_setFontSize:(CGFloat)fontSize sender:(id)sender WK_API_AVAILABLE(ios(12.2));
     
    277295@property (nonatomic, setter=_setDragInteractionPolicy:) _WKDragInteractionPolicy _dragInteractionPolicy WK_API_AVAILABLE(ios(11.0));
    278296@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));
    279305
    280306- (void)_beginInteractiveObscuredInsetsChange;
     
    307333- (NSArray *)_dataDetectionResults;
    308334
     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
    309339- (void)_accessibilityRetrieveSpeakSelectionContent WK_API_AVAILABLE(ios(11.0));
    310340- (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(11.0));
    311341
    312342@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
    313346#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));
    315353
    316354@property (nonatomic, readonly) _WKRectEdge _pinnedState WK_API_AVAILABLE(macos(10.13.4));
     
    319357@property (readonly) NSColor *_pageExtendedBackgroundColor;
    320358@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));
    321362@property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground;
    322363@property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset;
     
    332373
    333374- (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));
    334396
    335397// Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to
     
    347409
    348410- (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));
    350412
    351413// FIXME: This SPI should become a part of the WKUIDelegate. rdar://problem/26561537
     
    357419- (void)_prepareForMoveToWindow:(NSWindow *)targetWindow completionHandler:(void(^)(void))completionHandler WK_API_AVAILABLE(macos(10.13));
    358420
     421@property (nonatomic, readwrite, setter=_setUseSystemAppearance:) BOOL _useSystemAppearance WK_API_AVAILABLE(macos(10.14));
    359422@property (nonatomic, setter=_setOverlayScrollbarStyle:) _WKOverlayScrollbarStyle _overlayScrollbarStyle WK_API_AVAILABLE(macos(10.13.4));
    360423@property (strong, nonatomic, setter=_setInspectorAttachmentView:) NSView *_inspectorAttachmentView WK_API_AVAILABLE(macos(10.13.4));
     
    452515@end
    453516
    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  
    11/*
    2  * Copyright (C) 2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #include "config.h"
     26#import <WebKit/WKBase.h>
     27#import <WebKit/WKWebView.h>
    2728
    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
    3530
    36 #if PLATFORM(IOS_FAMILY)
     31@class _WKFrameHandle;
    3732
    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
    4055@end
    4156
    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  
    2929#import "WKWebViewConfigurationPrivate.h"
    3030#import "WKWebViewInternal.h"
     31#import "WKWebViewPrivateForTesting.h"
    3132
    3233namespace WebKit {
  • trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm

    r253396 r253465  
    5050#import "WKWebViewContentProviderRegistry.h"
    5151#import "WKWebViewInternal.h"
     52#import "WKWebViewPrivateForTesting.h"
    5253#import "WebContextMenuProxy.h"
    5354#import "WebDataListSuggestionsDropdownIOS.h"
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r253396 r253465  
    7272#import "WKWebViewInternal.h"
    7373#import "WKWebViewPrivate.h"
     74#import "WKWebViewPrivateForTestingIOS.h"
    7475#import "WebAutocorrectionContext.h"
    7576#import "WebAutocorrectionData.h"
  • trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.h

    r253396 r253465  
    2626#if HAVE(HOVER_GESTURE_RECOGNIZER)
    2727
     28#import <UIKit/UIGestureRecognizer.h>
    2829#import "NativeWebMouseEvent.h"
    2930
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

    r253396 r253465  
    3434#import "WKWebView.h"
    3535#import "WKWebViewInternal.h"
    36 #import "WKWebViewPrivate.h"
     36#import "WKWebViewPrivateForTesting.h"
    3737#import "WebFullScreenManagerProxy.h"
    3838#import "WebPageProxy.h"
  • trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm

    r253396 r253465  
    4949#import "WKViewInternal.h"
    5050#import "WKWebViewInternal.h"
     51#import "WKWebViewPrivateForTestingMac.h"
    5152#import "WebColorPickerMac.h"
    5253#import "WebContextMenuProxyMac.h"
  • trunk/Source/WebKit/UIProcess/mac/WKFullScreenWindowController.h

    r253396 r253465  
    2424 */
    2525
    26 #if ENABLE(FULLSCREEN_API)
     26#if ENABLE(FULLSCREEN_API) && PLATFORM(MAC)
    2727
     28#import <AppKit/AppKit.h>
    2829#import "GenericCallback.h"
    2930#import <wtf/RetainPtr.h>
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r253452 r253465  
    9999                0F174AA3142A4CB70039250F /* APIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F174AA2142A4CB60039250F /* APIGeometry.h */; };
    100100                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, ); }; };
    101104                0F594790187B3B3A00437857 /* RemoteScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */; };
    102105                0F59479B187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F594795187B3B6000437857 /* RemoteScrollingCoordinatorProxy.h */; };
     
    110113                0F931C1C18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBB8D4 /* ScrollingTreeScrollingNodeDelegateIOS.h */; };
    111114                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 */; };
    112118                0FCB4E4618BBE044000FCFC9 /* PageClientImplIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB4E3618BBE044000FCFC9 /* PageClientImplIOS.h */; };
    113119                0FCB4E4818BBE044000FCFC9 /* WKActionSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB4E3818BBE044000FCFC9 /* WKActionSheet.h */; };
     
    19251931
    19261932/* 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                };
    19271946                1A07D2F71919B36500ECDA16 /* Copy Message Generation Scripts */ = {
    19281947                        isa = PBXCopyFilesBuildPhase;
     
    20272046                0F3C7257196F5F5000AEDD0C /* WKInspectorHighlightView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKInspectorHighlightView.mm; sourceTree = "<group>"; };
    20282047                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>"; };
    20292054                0F59478D187B3B3A00437857 /* RemoteScrollingCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteScrollingCoordinator.h; sourceTree = "<group>"; };
    20302055                0F59478E187B3B3A00437857 /* RemoteScrollingCoordinator.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RemoteScrollingCoordinator.messages.in; sourceTree = "<group>"; };
     
    50755100                        usesTabs = 0;
    50765101                };
     5102                0F45A32E239D896000294ABF /* ios */ = {
     5103                        isa = PBXGroup;
     5104                        children = (
     5105                                0F45A32F239D89A000294ABF /* WKWebViewPrivateForTestingIOS.h */,
     5106                                0F45A330239D89A100294ABF /* WKWebViewTestingIOS.mm */,
     5107                        );
     5108                        path = ios;
     5109                        sourceTree = "<group>";
     5110                };
    50775111                1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
    50785112                        isa = PBXGroup;
     
    67556789                                1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */,
    67566790                                26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */,
     6791                                0F45A33B239D8CC400294ABF /* WKWebViewPrivateForTesting.h */,
     6792                                0F45A33C239D8CC400294ABF /* WKWebViewTesting.mm */,
    67576793                                1AD60F5C18E20F4C0020C034 /* WKWindowFeatures.h */,
    67586794                                1AD60F5B18E20F4C0020C034 /* WKWindowFeatures.mm */,
     
    81868222                                37C4C08318149C2A003688B9 /* Cocoa */,
    81878223                                BC8A501311765F4500757573 /* cpp */,
     8224                                0F45A32E239D896000294ABF /* ios */,
    81888225                                BC111B47112F616900337BAB /* mac */,
    81898226                                6348424F1FB26E7100946E3C /* APIApplicationManifest.h */,
     
    84698506                                BC8699B3116AADAA002A925B /* WKView.mm */,
    84708507                                BC8699B4116AADAA002A925B /* WKViewInternal.h */,
     8508                                0F45A333239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h */,
     8509                                0F45A334239D89AF00294ABF /* WKWebViewTestingMac.mm */,
    84718510                        );
    84728511                        path = mac;
     
    1074610785                                1A66BF8F18A052ED002071B4 /* WKWebViewInternal.h in Headers */,
    1074710786                                26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */,
     10787                                0F45A33D239D8CC400294ABF /* WKWebViewPrivateForTesting.h in Headers */,
     10788                                0F45A331239D89A100294ABF /* WKWebViewPrivateForTestingIOS.h in Headers */,
     10789                                0F45A335239D89AF00294ABF /* WKWebViewPrivateForTestingMac.h in Headers */,
    1074810790                                1AD60F5E18E20F4C0020C034 /* WKWindowFeatures.h in Headers */,
    1074910791                                1AD60F6018E20F740020C034 /* WKWindowFeaturesInternal.h in Headers */,
     
    1086310905                                5379C7AC21E5288500E4A8F6 /* Check .xcfilelists */,
    1086410906                                933170072234674500B32554 /* Create symlinks to XPC services for engineering builds */,
     10907                                0FB94836239F31B700926A8F /* Copy Testing Headers */,
    1086510908                        );
    1086610909                        buildRules = (
  • trunk/Tools/ChangeLog

    r253462 r253465  
     12019-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
    1482019-12-12  Jonathan Bedard  <jbedard@apple.com>
    249
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r253396 r253465  
    3636#import <WebKit/WKWebViewConfigurationPrivate.h>
    3737#import <WebKit/WKWebViewPrivate.h>
     38#import <WebKit/WKWebViewPrivateForTesting.h>
    3839#import <WebKit/WKWebsiteDataStorePrivate.h>
    3940#import <WebKit/WebNSURLExtras.h>
  • trunk/Tools/TestWebKitAPI/EditingTestHarness.mm

    r253396 r253465  
    2929
    3030#import "PlatformUtilities.h"
    31 #import <WebKit/WKWebViewPrivate.h>
     31#import <WebKit/WKWebViewPrivateForTesting.h>
    3232
    3333@implementation EditingTestHarness
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm

    r253396 r253465  
    3232#import <WebKit/WKPagePrivateMac.h>
    3333#import <WebKit/WKWebViewPrivate.h>
     34#import <WebKit/WKWebViewPrivateForTesting.h>
    3435#import <wtf/HashSet.h>
    3536#import <wtf/RetainPtr.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm

    r253396 r253465  
    3434#import <WebKit/WKWebView.h>
    3535#import <WebKit/WKWebViewConfiguration.h>
    36 #import <WebKit/WKWebViewPrivate.h>
     36#import <WebKit/WKWebViewPrivateForTesting.h>
    3737#import <WebKit/_WKProcessPoolConfiguration.h>
    3838#import <wtf/RetainPtr.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DeviceOrientation.mm

    r253396 r253465  
    3434#import <WebKit/WKPreferencesPrivate.h>
    3535#import <WebKit/WKUIDelegatePrivate.h>
     36#import <WebKit/WKWebViewPrivateForTesting.h>
    3637#import <wtf/Function.h>
    3738#import <wtf/HashMap.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm

    r253396 r253465  
    3232#import <WebKit/WKNavigationDelegatePrivate.h>
    3333#import <WebKit/WKProcessPoolPrivate.h>
    34 #import <WebKit/WKWebViewPrivate.h>
     34#import <WebKit/WKWebViewPrivateForTesting.h>
    3535#import <WebKit/_WKProcessPoolConfiguration.h>
    3636#import <wtf/RetainPtr.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm

    r253396 r253465  
    3131#import "TestWKWebView.h"
    3232#import <WebKit/WKWebViewConfigurationPrivate.h>
    33 #import <WebKit/WKWebViewPrivate.h>
     33#import <WebKit/WKWebViewPrivateForTesting.h>
    3434#import <wtf/RetainPtr.h>
    3535
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm

    r253396 r253465  
    3030#import "PlatformUtilities.h"
    3131#import "TestWKWebView.h"
    32 
    3332#import <WebKit/WKWebViewConfigurationPrivate.h>
    34 #import <WebKit/WKWebViewPrivate.h>
     33#import <WebKit/WKWebViewPrivateForTesting.h>
    3534
    3635static void waitUntilBufferingPolicyIsEqualTo(WKWebView* webView, const char* expected)
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm

    r253396 r253465  
    2828#import "PlatformUtilities.h"
    2929#import "TestWKWebView.h"
    30 
    3130#import <WebKit/WKWebViewConfigurationPrivate.h>
    32 #import <WebKit/WKWebViewPrivate.h>
     31#import <WebKit/WKWebViewPrivateForTesting.h>
    3332
    3433#if PLATFORM(IOS_FAMILY)
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm

    r253396 r253465  
    3939#import <WebKit/WKURLCF.h>
    4040#import <WebKit/WKView.h>
    41 #import <WebKit/WKViewPrivate.h>
    4241#import <WebKit/WKWebViewConfigurationPrivate.h>
    4342#import <WebKit/WKWebViewPrivate.h>
     43#import <WebKit/WKWebViewPrivateForTesting.h>
    4444#import <wtf/RetainPtr.h>
    4545#import <wtf/Seconds.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm

    r253396 r253465  
    3030#import "PlatformUtilities.h"
    3131#import "TestWKWebView.h"
    32 
    3332#import <WebKit/WKWebViewConfigurationPrivate.h>
    34 #import <WebKit/WKWebViewPrivate.h>
     33#import <WebKit/WKWebViewPrivateForTesting.h>
    3534
    3635TEST(WebKit, ProcessSuspendMediaBuffering)
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

    r253396 r253465  
    4040#import <WebKit/WKURLSchemeTaskPrivate.h>
    4141#import <WebKit/WKWebViewConfigurationPrivate.h>
    42 #import <WebKit/WKWebViewPrivate.h>
     42#import <WebKit/WKWebViewPrivateForTesting.h>
    4343#import <WebKit/WKWebsiteDataStorePrivate.h>
    4444#import <WebKit/WKWebsiteDataStoreRef.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm

    r253396 r253465  
    3737#import <WebKit/WKURLSchemeTaskPrivate.h>
    3838#import <WebKit/WKWebViewConfigurationPrivate.h>
    39 #import <WebKit/WKWebViewPrivate.h>
     39#import <WebKit/WKWebViewPrivateForTesting.h>
    4040#import <WebKit/WKWebsiteDataStorePrivate.h>
    4141#import <WebKit/WKWebsiteDataStoreRef.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SnapshotStore.mm

    r253396 r253465  
    3737#import <WebKit/WKPagePrivate.h>
    3838#import <WebKit/WKWebView.h>
    39 #import <WebKit/WKWebViewPrivate.h>
     39#import <WebKit/WKWebViewPrivateForTesting.h>
    4040#import <wtf/RetainPtr.h>
    4141
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SystemPreview.mm

    r253396 r253465  
    3232#import "WKWebViewConfigurationExtras.h"
    3333#import <WebKit/WKViewPrivate.h>
    34 #import <WebKit/WKWebViewPrivate.h>
     34#import <WebKit/WKWebViewPrivateForTesting.h>
    3535#import <WebKit/WebKit.h>
    3636
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm

    r253396 r253465  
    3737#import <WebKit/WKRetainPtr.h>
    3838#import <WebKit/WKUIDelegatePrivate.h>
    39 #import <WebKit/WKWebViewPrivate.h>
     39#import <WebKit/WKWebViewPrivateForTesting.h>
    4040#import <WebKit/_WKHitTestResult.h>
    4141#import <WebKit/_WKInspector.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm

    r253396 r253465  
    2929#import "Test.h"
    3030#import "TestWKWebView.h"
    31 
    3231#import <WebKit/WKPreferencesPrivate.h>
    3332#import <WebKit/WKUserContentControllerPrivate.h>
    3433#import <WebKit/WKWebViewConfigurationPrivate.h>
    3534#import <WebKit/WKWebViewPrivate.h>
     35#import <WebKit/WKWebViewPrivateForTesting.h>
    3636#import <WebKit/WebKit.h>
    3737#import <WebKit/_WKProcessPoolConfiguration.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm

    r253396 r253465  
    2828#import "PlatformUtilities.h"
    2929#import "TestWKWebView.h"
    30 
    3130#import <WebKit/WKWebViewConfigurationPrivate.h>
    32 #import <WebKit/WKWebViewPrivate.h>
     31#import <WebKit/WKWebViewPrivateForTesting.h>
    3332#import <wtf/RetainPtr.h>
    3433
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm

    r253396 r253465  
    3838#import <MapKit/MapKit.h>
    3939#import <WebKit/WKPreferencesRefPrivate.h>
    40 #import <WebKit/WKWebViewPrivate.h>
     40#import <WebKit/WKWebViewPrivateForTesting.h>
    4141#import <WebKit/WebArchive.h>
    4242#import <WebKit/WebKitPrivate.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm

    r253396 r253465  
    3030#import "TestNavigationDelegate.h"
    3131#import "TestWKWebView.h"
    32 #import <WebKit/WKWebView.h>
    3332#import <WebKit/WKWebViewConfigurationPrivate.h>
     33#import <WebKit/WKWebViewPrivateForTesting.h>
    3434#import <WebKit/_WKActivatedElementInfo.h>
    3535#import <wtf/RetainPtr.h>
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewCandidateTests.mm

    r253396 r253465  
    3030#import "PlatformUtilities.h"
    3131#import "TestWKWebView.h"
    32 
    3332#import <Carbon/Carbon.h>
     33#import <WebKit/WKWebViewPrivateForTesting.h>
    3434#import <WebKit/WebKitPrivate.h>
    3535
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm

    r253396 r253465  
    2929#import "TestWKWebView.h"
    3030#import <WebKit/WKWebViewPrivate.h>
     31#import <WebKit/WKWebViewPrivateForTesting.h>
    3132
    3233#if PLATFORM(IOS_FAMILY)
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFirstResponderTests.mm

    r253396 r253465  
    3030#import "TestWKWebView.h"
    3131#import <WebKit/WKWebViewPrivate.h>
     32#import <WebKit/WKWebViewPrivateForTesting.h>
    3233
    3334#if PLATFORM(IOS_FAMILY)
  • trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm

    r253396 r253465  
    3333#import "WKWebViewConfigurationExtras.h"
    3434#import <WebKit/WKWebViewPrivate.h>
     35#import <WebKit/WKWebViewPrivateForTesting.h>
    3536#import <WebKit/_WKRemoteObjectInterface.h>
    3637#import <WebKit/_WKRemoteObjectRegistry.h>
  • trunk/Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm

    r253396 r253465  
    3838#import <MobileCoreServices/MobileCoreServices.h>
    3939#import <WebKit/WKUIDelegatePrivate.h>
    40 #import <WebKit/WKWebViewPrivate.h>
     40#import <WebKit/WKWebViewPrivateForTesting.h>
    4141#import <WebKit/_WKActivatedElementInfo.h>
    4242#import <WebKit/_WKElementAction.h>
  • trunk/Tools/TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm

    r253396 r253465  
    3333#import "UIKitSPI.h"
    3434#import <WebKit/WKWebViewPrivate.h>
     35#import <WebKit/WKWebViewPrivateForTesting.h>
    3536
    3637@interface TestWKWebView (AutocorrectionTests)
  • trunk/Tools/TestWebKitAPI/Tests/ios/FocusPreservationTests.mm

    r253396 r253465  
    3434#import "UIKitSPI.h"
    3535#import <WebKit/WKWebViewPrivate.h>
     36#import <WebKit/WKWebViewPrivateForTesting.h>
    3637#import <WebKit/_WKInputDelegate.h>
    3738#import <wtf/BlockPtr.h>
  • trunk/Tools/TestWebKitAPI/cocoa/TestNavigationDelegate.mm

    r253396 r253465  
    2828
    2929#import "Utilities.h"
     30#import <WebKit/WKWebViewPrivateForTesting.h>
    3031#import <wtf/RetainPtr.h>
    3132
  • trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm

    r253396 r253465  
    3232#import "PlatformUtilities.h"
    3333#import "UIKitSPI.h"
    34 
    3534#import <UIKit/UIDragInteraction.h>
    3635#import <UIKit/UIDragItem.h>
    3736#import <UIKit/UIDropInteraction.h>
    3837#import <UIKit/UIInteraction.h>
    39 #import <WebKit/WKWebViewPrivate.h>
     38#import <WebKit/WKWebViewPrivateForTesting.h>
    4039#import <WebKit/_WKFocusedElementInfo.h>
    4140#import <WebKit/_WKFormInputSession.h>
  • trunk/Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm

    r253396 r253465  
    3232#import "TestDraggingInfo.h"
    3333#import "TestWKWebView.h"
     34#import <WebKit/WKWebViewPrivateForTesting.h>
    3435#import <cmath>
    3536#import <wtf/WeakObjCPtr.h>
  • trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

    r253396 r253465  
    4545#import <WebKit/WKWebViewConfigurationPrivate.h>
    4646#import <WebKit/WKWebViewPrivate.h>
     47#import <WebKit/WKWebViewPrivateForTesting.h>
    4748#import <WebKit/WKWebsiteDataRecordPrivate.h>
    4849#import <WebKit/WKWebsiteDataStorePrivate.h>
  • trunk/Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm

    r253396 r253465  
    2929#import "WebKitTestRunnerDraggingInfo.h"
    3030#import <WebKit/WKUIDelegatePrivate.h>
     31#import <WebKit/WKWebViewPrivateForTesting.h>
    3132#import <wtf/Assertions.h>
    3233#import <wtf/BlockPtr.h>
     
    3738#import "UIKitSPI.h"
    3839#import <WebKit/WKWebViewPrivate.h>
     40
    3941@interface WKWebView ()
    4042
  • trunk/Tools/WebKitTestRunner/cocoa/UIScriptControllerCocoa.mm

    r253396 r253465  
    3434#import <JavaScriptCore/JavaScriptCore.h>
    3535#import <WebKit/WKWebViewPrivate.h>
     36#import <WebKit/WKWebViewPrivateForTesting.h>
    3637
    3738namespace WTR {
  • trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm

    r253396 r253465  
    4343#import <WebKit/WKWebViewConfigurationPrivate.h>
    4444#import <WebKit/WKWebViewPrivate.h>
     45#import <WebKit/WKWebViewPrivateForTesting.h>
    4546#import <objc/runtime.h>
    4647#import <pal/spi/ios/GraphicsServicesSPI.h>
  • trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm

    r253396 r253465  
    4444#import <WebCore/FloatRect.h>
    4545#import <WebKit/WKWebViewPrivate.h>
     46#import <WebKit/WKWebViewPrivateForTesting.h>
    4647#import <WebKit/WebKit.h>
    4748#import <pal/spi/ios/GraphicsServicesSPI.h>
  • trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm

    r253396 r253465  
    3131#import "PlatformViewHelpers.h"
    3232#import "PlatformWebView.h"
     33#import "PlatformWebView.h"
    3334#import "SharedEventStreamsMac.h"
    34 #import "TestController.h"
    35 #import "PlatformWebView.h"
    3635#import "StringFunctions.h"
    3736#import "TestController.h"
     
    4443#import <JavaScriptCore/OpaqueJSString.h>
    4544#import <WebKit/WKWebViewPrivate.h>
     45#import <WebKit/WKWebViewPrivateForTesting.h>
    4646#import <wtf/BlockPtr.h>
    4747
Note: See TracChangeset for help on using the changeset viewer.