[webkit-changes] [WebKit/WebKit] 29481c: Support using Ref / RefPtr with PageClient

Chris Dumez noreply at github.com
Thu Feb 8 08:33:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29481cad7db8c650d25363a0cdf445d515342a9e
      https://github.com/WebKit/WebKit/commit/29481cad7db8c650d25363a0cdf445d515342a9e
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
    M Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/ios/WKContentView.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm
    M Source/WebKit/UIProcess/playstation/PlayStationWebView.cpp
    M Source/WebKit/UIProcess/win/WebView.cpp

  Log Message:
  -----------
  Support using Ref / RefPtr with PageClient
https://bugs.webkit.org/show_bug.cgi?id=268965

Reviewed by Darin Adler.

Support using Ref / RefPtr with PageClient and protect it more.

* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp:
(WKWPE::View::View):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::layerTreeCommitComplete):
(WebKit::WebPageProxy::handleClickForDataDetectionResult):
(WebKit::WebPageProxy::scrollingUpdatesDisabledForTesting):
(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::platformRegisterAttachment):
(WebKit::WebPageProxy::insertDictatedTextAsync):
(WebKit::WebPageProxy::addDictationAlternative):
(WebKit::WebPageProxy::platformDictationAlternatives):
(WebKit::WebPageProxy::didCreateContextInWebProcessForVisibilityPropagation):
(WebKit::WebPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):
(WebKit::WebPageProxy::didCreateContextInModelProcessForVisibilityPropagation):
(WebKit::WebPageProxy::updateFullscreenVideoTextRecognition):
(WebKit::WebPageProxy::fullscreenVideoTextRecognitionTimerFired):
(WebKit::WebPageProxy::canHandleContextMenuTranslation const):
(WebKit::WebPageProxy::handleContextMenuTranslation):
(WebKit::WebPageProxy::shouldForceForegroundPriorityForClientNavigation const):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::ref):
(WebKit::PageClient::deref):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::m_browsingContextGroup):
(WebKit::WebPageProxy::protectedPageClient const):
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
(WebKit::WebPageProxy::setTopContentInset):
(WebKit::WebPageProxy::setUnderPageBackgroundColorOverride):
(WebKit::WebPageProxy::setViewNeedsDisplay):
(WebKit::WebPageProxy::requestScroll):
(WebKit::WebPageProxy::viewScrollPosition const):
(WebKit::WebPageProxy::updateActivityState):
(WebKit::WebPageProxy::activityStateDidChange):
(WebKit::WebPageProxy::viewDidEnterWindow):
(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::layerHostingModeDidChange):
(WebKit::WebPageProxy::viewSize const):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdateIfNecessary):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::performDragOperation):
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::setDragCaretRect):
(WebKit::WebPageProxy::processNextQueuedMouseEvent):
(WebKit::WebPageProxy::sendPreventableTouchEvent):
(WebKit::WebPageProxy::handlePreventableTouchEvent):
(WebKit::WebPageProxy::touchEventHandlingCompleted):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPageProxy::preferencesDidChange):
(WebKit::WebPageProxy::didCreateMainFrame):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didDestroyNavigationShared):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrameViaJSHistoryAPI):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didReachLayoutMilestone):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirectShared):
(WebKit::WebPageProxy::didUpdateHistoryTitle):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::runModalJavaScriptDialog):
(WebKit::WebPageProxy::setWindowFrame):
(WebKit::WebPageProxy::getWindowFrame):
(WebKit::WebPageProxy::getWindowFrameWithCallback):
(WebKit::WebPageProxy::screenToRootView):
(WebKit::WebPageProxy::rootViewToScreen):
(WebKit::WebPageProxy::syncRootViewToScreen):
(WebKit::WebPageProxy::accessibilityScreenToRootView):
(WebKit::WebPageProxy::rootViewToAccessibilityScreen):
(WebKit::WebPageProxy::didChangeViewportProperties):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::showShareSheet):
(WebKit::WebPageProxy::showContactPicker):
(WebKit::WebPageProxy::didChangeContentSize):
(WebKit::WebPageProxy::didChangeIntrinsicContentSize):
(WebKit::WebPageProxy::showColorPicker):
(WebKit::WebPageProxy::showDataListSuggestions):
(WebKit::WebPageProxy::showDateTimePicker):
(WebKit::WebPageProxy::compositionWasCanceled):
(WebKit::WebPageProxy::registerInsertionUndoGrouping):
(WebKit::WebPageProxy::canUndoRedo):
(WebKit::WebPageProxy::executeUndoRedo):
(WebKit::WebPageProxy::clearAllEditCommands):
(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):
(WebKit::WebPageProxy::setTextIndicatorAnimationProgress):
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::didShowContextMenu):
(WebKit::WebPageProxy::didDismissContextMenu):
(WebKit::WebPageProxy::registerEditCommand):
(WebKit::WebPageProxy::canUndo):
(WebKit::WebPageProxy::canRedo):
(WebKit::WebPageProxy::takeFocus):
(WebKit::WebPageProxy::setToolTip):
(WebKit::WebPageProxy::setCursor):
(WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves):
(WebKit::WebPageProxy::keyEventHandlingCompleted):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessTermination):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):
(WebKit::WebPageProxy::didFirstLayerFlush):
(WebKit::WebPageProxy::exitAcceleratedCompositingMode):
(WebKit::WebPageProxy::updateAcceleratedCompositingMode):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
(WebKit::WebPageProxy::requestTextRecognition):
(WebKit::WebPageProxy::computeHasVisualSearchResults):
(WebKit::WebPageProxy::showMediaControlsContextMenu):
(WebKit::WebPageProxy::drawPageBorderForPrinting):
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
(WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
(WebKit::WebPageProxy::themeColorChanged):
(WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange):
(WebKit::WebPageProxy::sampledPageTopColorChanged):
(WebKit::WebPageProxy::didFinishLoadingDataForCustomContentProvider):
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
(WebKit::WebPageProxy::showDictationAlternativeUI):
(WebKit::WebPageProxy::removeDictationAlternatives):
(WebKit::WebPageProxy::dictationAlternatives):
(WebKit::WebPageProxy::showCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanelSoon):
(WebKit::WebPageProxy::recordAutocorrectionResponse):
(WebKit::WebPageProxy::setEditableElementIsFocused):
(WebKit::WebPageProxy::takeViewSnapshot):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
(WebKit::WebPageProxy::willRecordNavigationSnapshot):
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved):
(WebKit::WebPageProxy::updatePlayingMediaDidChange):
(WebKit::WebPageProxy::updateReportedMediaCaptureState):
(WebKit::WebPageProxy::videoControlsManagerDidChange):
(WebKit::WebPageProxy::handleControlledElementIDResponse const):
(WebKit::WebPageProxy::didPerformImmediateActionHitTest):
(WebKit::WebPageProxy::immediateActionAnimationControllerForHitTestResult):
(WebKit::WebPageProxy::didHandleAcceptedCandidate):
(WebKit::WebPageProxy::performSwitchHapticFeedback):
(WebKit::WebPageProxy::addPlaybackTargetPickerClient):
(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled):
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState):
(WebKit::WebPageProxy::mockMediaPlaybackTargetPickerDismissPopup):
(WebKit::WebPageProxy::didChangeBackgroundColor):
(WebKit::WebPageProxy::didRestoreScrollPosition):
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
(WebKit::WebPageProxy::useDarkAppearance const):
(WebKit::WebPageProxy::useElevatedUserInterfaceLevel const):
(WebKit::WebPageProxy::dataOwnerForPasteboard const):
(WebKit::WebPageProxy::writePromisedAttachmentToPasteboard):
(WebKit::WebPageProxy::didInvalidateDataForAttachment):
(WebKit::WebPageProxy::didInsertAttachmentWithIdentifier):
(WebKit::WebPageProxy::didRemoveAttachment):
(WebKit::WebPageProxy::storeAppHighlight):
(WebKit::WebPageProxy::webViewDidMoveToWindow):
(WebKit::WebPageProxy::gpuProcessDidFinishLaunching):
(WebKit::WebPageProxy::gpuProcessExited):
(WebKit::WebPageProxy::modelProcessDidFinishLaunching):
(WebKit::WebPageProxy::modelProcessExited):
(WebKit::WebPageProxy::requestScrollToRect):
(WebKit::WebPageProxy::beginTextRecognitionForVideoInElementFullScreen):
(WebKit::WebPageProxy::cancelTextRecognitionForVideoInElementFullScreen):
(WebKit::PageClientProtector::PageClientProtector): Deleted.
(WebKit::PageClientProtector::~PageClientProtector): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeLayoutViewportRect const):
(WebKit::WebPageProxy::scrollingNodeScrollViewWillStartPanGesture):
(WebKit::WebPageProxy::scrollingNodeScrollViewDidScroll):
(WebKit::WebPageProxy::scrollingNodeScrollWillStartScroll):
(WebKit::WebPageProxy::scrollingNodeScrollDidEndScroll):
(WebKit::WebPageProxy::handleAutocorrectionContext):
(WebKit::WebPageProxy::didReceivePositionInformation):
(WebKit::WebPageProxy::saveImageToLibrary):
(WebKit::WebPageProxy::interpretKeyEvent):
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::relayAccessibilityNotification):
(WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
(WebKit::WebPageProxy::couldNotRestorePageState):
(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):
(WebKit::WebPageProxy::didGetTapHighlightGeometries):
(WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement):
(WebKit::WebPageProxy::elementDidFocus):
(WebKit::WebPageProxy::elementDidBlur):
(WebKit::WebPageProxy::updateFocusedElementInformation):
(WebKit::WebPageProxy::focusedElementDidChangeInputMode):
(WebKit::WebPageProxy::didReleaseAllTouchPoints):
(WebKit::WebPageProxy::showInspectorHighlight):
(WebKit::WebPageProxy::hideInspectorHighlight):
(WebKit::WebPageProxy::showInspectorIndication):
(WebKit::WebPageProxy::hideInspectorIndication):
(WebKit::WebPageProxy::enableInspectorNodeSearch):
(WebKit::WebPageProxy::disableInspectorNodeSearch):
(WebKit::WebPageProxy::didPerformDictionaryLookup):
(WebKit::WebPageProxy::setRemoteLayerTreeRootNode):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::commitPotentialTapFailed):
(WebKit::WebPageProxy::didNotHandleTapAsClick):
(WebKit::WebPageProxy::didHandleTapAsHover):
(WebKit::WebPageProxy::didCompleteSyntheticClick):
(WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
(WebKit::WebPageProxy::handleSmartMagnificationInformationForPotentialTap):
(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::dispatchDidUpdateEditorState):
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::didHandleDragStartRequest):
(WebKit::WebPageProxy::didHandleAdditionalDragItemsRequest):
(WebKit::WebPageProxy::willReceiveEditDragSnapshot):
(WebKit::WebPageProxy::didReceiveEditDragSnapshot):
(WebKit::WebPageProxy::requestPasswordForQuickLookDocumentInMainFrameShared):
(WebKit::WebPageProxy::isDesktopClassBrowsingRecommended const):
(WebKit::WebPageProxy::showDataDetectorsUIForPositionInformation):
(WebKit::WebPageProxy::insertionPointColorDidChange):
(WebKit::WebPageProxy::platformUnderPageBackgroundColor const):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
(WebKit::WebPageProxy::setPromisedDataForImage):
(WebKit::WebPageProxy::didPerformDictionaryLookup):
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::makeFirstResponder):
(WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
(WebKit::WebPageProxy::useFormSemanticContext const):
(WebKit::WebPageProxy::colorSpace):
(WebKit::WebPageProxy::executeSavedCommandBySelector):
(WebKit::WebPageProxy::setRemoteLayerTreeRootNode):
(WebKit::WebPageProxy::acceleratedCompositingRootLayer const):
(WebKit::WebPageProxy::headerBannerLayer const):
(WebKit::WebPageProxy::footerBannerLayer const):
(WebKit::WebPageProxy::showPDFContextMenu):
(WebKit::WebPageProxy::showTelephoneNumberMenu):
(WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates const):
(WebKit::WebPageProxy::didUpdateEditorState):
(WebKit::WebPageProxy::startWindowDrag):
(WebKit::WebPageProxy::rootViewToWindow):
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::inspectorAttachmentView):
(WebKit::WebPageProxy::remoteObjectRegistry):
(WebKit::WebPageProxy::createSyntheticEventForContextMenu const):
(WebKit::WebPageProxy::Internals::platformView const):
(WebKit::WebPageProxy::createPDFHUD):
(WebKit::WebPageProxy::removePDFHUD):
(WebKit::WebPageProxy::updatePDFHUDLocation):
(WebKit::WebPageProxy::showImageInQuickLookPreviewPanel):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
* Source/WebKit/UIProcess/playstation/PlayStationWebView.cpp:
(WebKit::PlayStationWebView::PlayStationWebView):
* Source/WebKit/UIProcess/win/WebView.cpp:
(WebKit::WebView::WebView):

Canonical link: https://commits.webkit.org/274288@main




More information about the webkit-changes mailing list