<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[191824] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/191824">191824</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-10-30 15:48:32 -0700 (Fri, 30 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>WKView being inside WKWebView leads to weird API issues
https://bugs.webkit.org/show_bug.cgi?id=150174
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
(-[WKView prepareContentInRect:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView pageRef]):
(-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKView dealloc]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
(WebKit::WebViewImpl::page):
* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKWindowVisibilityObserver initWithView:impl:]):
(-[WKWindowVisibilityObserver dealloc]):
(-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::~WebViewImpl):
(WebKit::WebViewImpl::setDrawsBackground):
(WebKit::WebViewImpl::drawsBackground):
(WebKit::WebViewImpl::setDrawsTransparentBackground):
(WebKit::WebViewImpl::drawsTransparentBackground):
(WebKit::WebViewImpl::isOpaque):
(WebKit::WebViewImpl::acceptsFirstMouse):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::viewWillStartLiveResize):
(WebKit::WebViewImpl::viewDidEndLiveResize):
(WebKit::WebViewImpl::updateWindowAndViewFrames):
(WebKit::WebViewImpl::setFixedLayoutSize):
(WebKit::WebViewImpl::fixedLayoutSize):
(WebKit::WebViewImpl::isUsingUISideCompositing):
(WebKit::WebViewImpl::setDrawingAreaSize):
(WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::drawRect):
(WebKit::WebViewImpl::dispatchSetTopContentInset):
(WebKit::WebViewImpl::prepareContentInRect):
(WebKit::WebViewImpl::updateViewExposedRect):
(WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
(WebKit::WebViewImpl::minimumSizeForAutoLayout):
(WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
(WebKit::WebViewImpl::setIntrinsicContentSize):
(WebKit::WebViewImpl::setViewScale):
(WebKit::WebViewImpl::viewScale):
(WebKit::WebViewImpl::supportsArbitraryLayoutModes):
(WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
(WebKit::WebViewImpl::windowDidOrderOffScreen):
(WebKit::WebViewImpl::windowDidOrderOnScreen):
(WebKit::WebViewImpl::windowDidBecomeKey):
(WebKit::WebViewImpl::windowDidResignKey):
(WebKit::WebViewImpl::windowDidMiniaturize):
(WebKit::WebViewImpl::windowDidDeminiaturize):
(WebKit::WebViewImpl::windowDidChangeBackingProperties):
(WebKit::WebViewImpl::windowDidChangeScreen):
(WebKit::WebViewImpl::windowDidChangeLayerHosting):
(WebKit::WebViewImpl::windowDidChangeOcclusionState):
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
(WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::viewDidChangeBackingProperties):
(WebKit::WebViewImpl::viewDidHide):
(WebKit::WebViewImpl::viewDidUnhide):
(WebKit::WebViewImpl::activeSpaceDidChange):
(WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
(WebKit::WebViewImpl::setUnderlayColor):
(WebKit::WebViewImpl::underlayColor):
(WebKit::WebViewImpl::pageExtendedBackgroundColor):
(WebKit::WebViewImpl::setOverlayScrollbarStyle):
(WebKit::WebViewImpl::overlayScrollbarStyle):
(WebKit::WebViewImpl::endDeferringViewInWindowChanges):
(WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
(WebKit::WebViewImpl::prepareForMoveToWindow):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::setPluginComplexTextInputState):
(WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
(WebKit::WebViewImpl::handleAcceptedAlternativeText):
(WebKit::WebViewImpl::pressureChangeWithEvent):
(WebKit::WebViewImpl::isEditable):
(WebKit::WebViewImpl::executeEditCommandForSelector):
(WebKit::WebViewImpl::writeSelectionToPasteboard):
(WebKit::WebViewImpl::readSelectionFromPasteboard):
(WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
(WebKit::WebViewImpl::centerSelectionInVisibleArea):
(WebKit::WebViewImpl::updateFontPanelIfNeeded):
(WebKit::WebViewImpl::changeFontFromFontPanel):
(WebKit::WebViewImpl::validateUserInterfaceItem):
(WebKit::WebViewImpl::startSpeaking):
(WebKit::WebViewImpl::showGuessPanel):
(WebKit::WebViewImpl::checkSpelling):
(WebKit::WebViewImpl::changeSpelling):
(WebKit::WebViewImpl::toggleContinuousSpellChecking):
(WebKit::WebViewImpl::setGrammarCheckingEnabled):
(WebKit::WebViewImpl::toggleGrammarChecking):
(WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
(WebKit::WebViewImpl::toggleSmartInsertDelete):
(WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
(WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
(WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
(WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
(WebKit::WebViewImpl::toggleAutomaticLinkDetection):
(WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
(WebKit::WebViewImpl::toggleAutomaticTextReplacement):
(WebKit::WebViewImpl::uppercaseWord):
(WebKit::WebViewImpl::lowercaseWord):
(WebKit::WebViewImpl::capitalizeWord):
(WebKit::WebViewImpl::preferencesDidChange):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
(WebKit::WebViewImpl::didChangeContentSize):
(WebKit::WebViewImpl::setIgnoresNonWheelEvents):
(WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
(WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
(WebKit::WebViewImpl::stringForToolTip):
(WebKit::WebViewImpl::setInspectorAttachmentView):
(WebKit::WebViewImpl::remoteObjectRegistry):
(WebKit::WebViewImpl::browsingContextController):
(WebKit::WebViewImpl::draggedImage):
(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
(WebKit::WebViewImpl::draggingExited):
(WebKit::WebViewImpl::performDragOperation):
(WebKit::WebViewImpl::takeViewSnapshot):
(WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
(WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
(WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
(WebKit::WebViewImpl::setMagnification):
(WebKit::WebViewImpl::magnification):
(WebKit::WebViewImpl::scrollWheel):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::rotateWithEvent):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::insertText):
(WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
(WebKit::WebViewImpl::markedRangeWithCompletionHandler):
(WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
(WebKit::WebViewImpl::attributedSubstringForProposedRange):
(WebKit::WebViewImpl::firstRectForCharacterRange):
(WebKit::WebViewImpl::characterIndexForPoint):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::unmarkText):
(WebKit::WebViewImpl::setMarkedText):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyUp):
(WebKit::WebViewImpl::keyDown):
(WebKit::WebViewImpl::flagsChanged):
(WebKit::WebViewImpl::executeSavedKeypressCommands):
(WebKit::WebViewImpl::selectedRange):
(WebKit::WebViewImpl::hasMarkedText):
(WebKit::WebViewImpl::markedRange):
(WebKit::WebViewImpl::setContentPreparationRect): Deleted.
(WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
(WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::scrollPinningBehavior):
(WebKit::WebPageProxy::overlayScrollbarStyle):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::activeView):
(WebKit::PageClientImpl::activeWindow):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::makeFirstResponder):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::colorSpace):
(WebKit::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::pageClosed):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::preferencesDidChange):
(WebKit::PageClientImpl::toolTipChanged):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didChangeContentSize):
(WebKit::PageClientImpl::setCursor):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::setPromisedDataForImage):
(WebKit::PageClientImpl::setPromisedDataForAttachment):
(WebKit::PageClientImpl::updateSecureInputState):
(WebKit::PageClientImpl::resetSecureInputState):
(WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::PageClientImpl::convertToDeviceSpace):
(WebKit::PageClientImpl::convertToUserSpace):
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
(WebKit::PageClientImpl::doneWithKeyEvent):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::PageClientImpl::createColorPicker):
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
(WebKit::PageClientImpl::takeViewSnapshot):
(WebKit::PageClientImpl::selectionDidChange):
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
(WebKit::PageClientImpl::setPluginComplexTextInputState):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::recordAutocorrectionResponse):
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
(WebKit::PageClientImpl::intrinsicContentSizeDidChange):
(WebKit::PageClientImpl::executeSavedCommandBySelector):
(WebKit::PageClientImpl::showDictationAlternativeUI):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
(WebKit::PageClientImpl::didFailLoadForMainFrame):
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
(WebKit::PageClientImpl::removeNavigationGestureSnapshot):
(WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
(WebKit::PageClientImpl::didPerformImmediateActionHitTest):
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
(WebKit::PageClientImpl::showPlatformContextMenu):
(WebKit::PageClientImpl::refView):
(WebKit::PageClientImpl::derefView):
(WebKit::PageClientImpl::startWindowDrag):
(WebKit::PageClientImpl::platformWindow):
(WebKit::PageClientImpl::inspectorAttachmentView):
(WebKit::PageClientImpl::remoteObjectRegistry):
* UIProcess/mac/WebColorPickerMac.h:
* UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::create):
(WebKit::WebColorPickerMac::WebColorPickerMac):
(-[WKColorPopoverMac initWithFrame:inView:]):
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebColorPickerMach">trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebColorPickerMacmm">trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMenuProxyMach">trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPopupMenuProxyMach">trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPopupMenuProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -1,3 +1,267 @@
</span><ins>+2015-10-30 Tim Horton <timothy_horton@apple.com>
+
+ WKView being inside WKWebView leads to weird API issues
+ https://bugs.webkit.org/show_bug.cgi?id=150174
+
+ Reviewed by Anders Carlsson.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
+ (-[WKView prepareContentInRect:]):
+ (-[WKView initWithFrame:processPool:configuration:webView:]):
+ (-[WKView pageRef]):
+ (-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
+ (-[WKView dealloc]): Deleted.
+ * UIProcess/Cocoa/WebViewImpl.h:
+ (WebKit::WebViewImpl::page):
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (-[WKWindowVisibilityObserver initWithView:impl:]):
+ (-[WKWindowVisibilityObserver dealloc]):
+ (-[WKWindowVisibilityObserver _activeSpaceDidChange:]):
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::~WebViewImpl):
+ (WebKit::WebViewImpl::setDrawsBackground):
+ (WebKit::WebViewImpl::drawsBackground):
+ (WebKit::WebViewImpl::setDrawsTransparentBackground):
+ (WebKit::WebViewImpl::drawsTransparentBackground):
+ (WebKit::WebViewImpl::isOpaque):
+ (WebKit::WebViewImpl::acceptsFirstMouse):
+ (WebKit::WebViewImpl::becomeFirstResponder):
+ (WebKit::WebViewImpl::resignFirstResponder):
+ (WebKit::WebViewImpl::viewWillStartLiveResize):
+ (WebKit::WebViewImpl::viewDidEndLiveResize):
+ (WebKit::WebViewImpl::updateWindowAndViewFrames):
+ (WebKit::WebViewImpl::setFixedLayoutSize):
+ (WebKit::WebViewImpl::fixedLayoutSize):
+ (WebKit::WebViewImpl::isUsingUISideCompositing):
+ (WebKit::WebViewImpl::setDrawingAreaSize):
+ (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
+ (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
+ (WebKit::WebViewImpl::updateLayer):
+ (WebKit::WebViewImpl::drawRect):
+ (WebKit::WebViewImpl::dispatchSetTopContentInset):
+ (WebKit::WebViewImpl::prepareContentInRect):
+ (WebKit::WebViewImpl::updateViewExposedRect):
+ (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
+ (WebKit::WebViewImpl::minimumSizeForAutoLayout):
+ (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
+ (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
+ (WebKit::WebViewImpl::setIntrinsicContentSize):
+ (WebKit::WebViewImpl::setViewScale):
+ (WebKit::WebViewImpl::viewScale):
+ (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
+ (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
+ (WebKit::WebViewImpl::windowDidOrderOffScreen):
+ (WebKit::WebViewImpl::windowDidOrderOnScreen):
+ (WebKit::WebViewImpl::windowDidBecomeKey):
+ (WebKit::WebViewImpl::windowDidResignKey):
+ (WebKit::WebViewImpl::windowDidMiniaturize):
+ (WebKit::WebViewImpl::windowDidDeminiaturize):
+ (WebKit::WebViewImpl::windowDidChangeBackingProperties):
+ (WebKit::WebViewImpl::windowDidChangeScreen):
+ (WebKit::WebViewImpl::windowDidChangeLayerHosting):
+ (WebKit::WebViewImpl::windowDidChangeOcclusionState):
+ (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
+ (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
+ (WebKit::WebViewImpl::viewDidMoveToWindow):
+ (WebKit::WebViewImpl::viewDidChangeBackingProperties):
+ (WebKit::WebViewImpl::viewDidHide):
+ (WebKit::WebViewImpl::viewDidUnhide):
+ (WebKit::WebViewImpl::activeSpaceDidChange):
+ (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
+ (WebKit::WebViewImpl::setUnderlayColor):
+ (WebKit::WebViewImpl::underlayColor):
+ (WebKit::WebViewImpl::pageExtendedBackgroundColor):
+ (WebKit::WebViewImpl::setOverlayScrollbarStyle):
+ (WebKit::WebViewImpl::overlayScrollbarStyle):
+ (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
+ (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
+ (WebKit::WebViewImpl::prepareForMoveToWindow):
+ (WebKit::WebViewImpl::updateSecureInputState):
+ (WebKit::WebViewImpl::setPluginComplexTextInputState):
+ (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
+ (WebKit::WebViewImpl::handleAcceptedAlternativeText):
+ (WebKit::WebViewImpl::pressureChangeWithEvent):
+ (WebKit::WebViewImpl::isEditable):
+ (WebKit::WebViewImpl::executeEditCommandForSelector):
+ (WebKit::WebViewImpl::writeSelectionToPasteboard):
+ (WebKit::WebViewImpl::readSelectionFromPasteboard):
+ (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
+ (WebKit::WebViewImpl::centerSelectionInVisibleArea):
+ (WebKit::WebViewImpl::updateFontPanelIfNeeded):
+ (WebKit::WebViewImpl::changeFontFromFontPanel):
+ (WebKit::WebViewImpl::validateUserInterfaceItem):
+ (WebKit::WebViewImpl::startSpeaking):
+ (WebKit::WebViewImpl::showGuessPanel):
+ (WebKit::WebViewImpl::checkSpelling):
+ (WebKit::WebViewImpl::changeSpelling):
+ (WebKit::WebViewImpl::toggleContinuousSpellChecking):
+ (WebKit::WebViewImpl::setGrammarCheckingEnabled):
+ (WebKit::WebViewImpl::toggleGrammarChecking):
+ (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
+ (WebKit::WebViewImpl::toggleSmartInsertDelete):
+ (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
+ (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
+ (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
+ (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
+ (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
+ (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
+ (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
+ (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
+ (WebKit::WebViewImpl::uppercaseWord):
+ (WebKit::WebViewImpl::lowercaseWord):
+ (WebKit::WebViewImpl::capitalizeWord):
+ (WebKit::WebViewImpl::preferencesDidChange):
+ (WebKit::WebViewImpl::dismissContentRelativeChildWindowsFromViewOnly):
+ (WebKit::WebViewImpl::quickLookWithEvent):
+ (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
+ (WebKit::WebViewImpl::didChangeContentSize):
+ (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
+ (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
+ (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
+ (WebKit::WebViewImpl::stringForToolTip):
+ (WebKit::WebViewImpl::setInspectorAttachmentView):
+ (WebKit::WebViewImpl::remoteObjectRegistry):
+ (WebKit::WebViewImpl::browsingContextController):
+ (WebKit::WebViewImpl::draggedImage):
+ (WebKit::WebViewImpl::draggingEntered):
+ (WebKit::WebViewImpl::draggingUpdated):
+ (WebKit::WebViewImpl::draggingExited):
+ (WebKit::WebViewImpl::performDragOperation):
+ (WebKit::WebViewImpl::takeViewSnapshot):
+ (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
+ (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
+ (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
+ (WebKit::WebViewImpl::setMagnification):
+ (WebKit::WebViewImpl::magnification):
+ (WebKit::WebViewImpl::scrollWheel):
+ (WebKit::WebViewImpl::swipeWithEvent):
+ (WebKit::WebViewImpl::magnifyWithEvent):
+ (WebKit::WebViewImpl::rotateWithEvent):
+ (WebKit::WebViewImpl::doCommandBySelector):
+ (WebKit::WebViewImpl::insertText):
+ (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
+ (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
+ (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
+ (WebKit::WebViewImpl::attributedSubstringForProposedRange):
+ (WebKit::WebViewImpl::firstRectForCharacterRange):
+ (WebKit::WebViewImpl::characterIndexForPoint):
+ (WebKit::WebViewImpl::inputContext):
+ (WebKit::WebViewImpl::unmarkText):
+ (WebKit::WebViewImpl::setMarkedText):
+ (WebKit::WebViewImpl::performKeyEquivalent):
+ (WebKit::WebViewImpl::keyUp):
+ (WebKit::WebViewImpl::keyDown):
+ (WebKit::WebViewImpl::flagsChanged):
+ (WebKit::WebViewImpl::executeSavedKeypressCommands):
+ (WebKit::WebViewImpl::selectedRange):
+ (WebKit::WebViewImpl::hasMarkedText):
+ (WebKit::WebViewImpl::markedRange):
+ (WebKit::WebViewImpl::setContentPreparationRect): Deleted.
+ (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly): Deleted.
+ (WebKit::WebViewImpl::destroyRemoteObjectRegistry): Deleted.
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::scrollPinningBehavior):
+ (WebKit::WebPageProxy::overlayScrollbarStyle):
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::createWebPage):
+ * UIProcess/WebProcessPool.h:
+ * UIProcess/mac/PageClientImpl.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::PageClientImpl):
+ (WebKit::PageClientImpl::createDrawingAreaProxy):
+ (WebKit::PageClientImpl::viewSize):
+ (WebKit::PageClientImpl::activeView):
+ (WebKit::PageClientImpl::activeWindow):
+ (WebKit::PageClientImpl::isViewFocused):
+ (WebKit::PageClientImpl::makeFirstResponder):
+ (WebKit::PageClientImpl::isViewVisible):
+ (WebKit::PageClientImpl::colorSpace):
+ (WebKit::PageClientImpl::processDidExit):
+ (WebKit::PageClientImpl::pageClosed):
+ (WebKit::PageClientImpl::didRelaunchProcess):
+ (WebKit::PageClientImpl::preferencesDidChange):
+ (WebKit::PageClientImpl::toolTipChanged):
+ (WebKit::PageClientImpl::didCommitLoadForMainFrame):
+ (WebKit::PageClientImpl::didChangeContentSize):
+ (WebKit::PageClientImpl::setCursor):
+ (WebKit::PageClientImpl::registerEditCommand):
+ (WebKit::PageClientImpl::registerInsertionUndoGrouping):
+ (WebKit::PageClientImpl::clearAllEditCommands):
+ (WebKit::PageClientImpl::canUndoRedo):
+ (WebKit::PageClientImpl::executeUndoRedo):
+ (WebKit::PageClientImpl::setDragImage):
+ (WebKit::PageClientImpl::setPromisedDataForImage):
+ (WebKit::PageClientImpl::setPromisedDataForAttachment):
+ (WebKit::PageClientImpl::updateSecureInputState):
+ (WebKit::PageClientImpl::resetSecureInputState):
+ (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
+ (WebKit::PageClientImpl::convertToDeviceSpace):
+ (WebKit::PageClientImpl::convertToUserSpace):
+ (WebKit::PageClientImpl::screenToRootView):
+ (WebKit::PageClientImpl::rootViewToScreen):
+ (WebKit::PageClientImpl::doneWithKeyEvent):
+ (WebKit::PageClientImpl::createPopupMenuProxy):
+ (WebKit::PageClientImpl::createContextMenuProxy):
+ (WebKit::PageClientImpl::createColorPicker):
+ (WebKit::PageClientImpl::setTextIndicator):
+ (WebKit::PageClientImpl::clearTextIndicator):
+ (WebKit::PageClientImpl::setTextIndicatorAnimationProgress):
+ (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
+ (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
+ (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
+ (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
+ (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
+ (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
+ (WebKit::PageClientImpl::takeViewSnapshot):
+ (WebKit::PageClientImpl::selectionDidChange):
+ (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
+ (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
+ (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
+ (WebKit::PageClientImpl::setPluginComplexTextInputState):
+ (WebKit::PageClientImpl::didPerformDictionaryLookup):
+ (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
+ (WebKit::PageClientImpl::showCorrectionPanel):
+ (WebKit::PageClientImpl::recordAutocorrectionResponse):
+ (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
+ (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
+ (WebKit::PageClientImpl::executeSavedCommandBySelector):
+ (WebKit::PageClientImpl::showDictationAlternativeUI):
+ (WebKit::PageClientImpl::closeFullScreenManager):
+ (WebKit::PageClientImpl::isFullScreen):
+ (WebKit::PageClientImpl::enterFullScreen):
+ (WebKit::PageClientImpl::exitFullScreen):
+ (WebKit::PageClientImpl::beganEnterFullScreen):
+ (WebKit::PageClientImpl::beganExitFullScreen):
+ (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
+ (WebKit::PageClientImpl::didFinishLoadForMainFrame):
+ (WebKit::PageClientImpl::didFailLoadForMainFrame):
+ (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
+ (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
+ (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
+ (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
+ (WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult):
+ (WebKit::PageClientImpl::showPlatformContextMenu):
+ (WebKit::PageClientImpl::refView):
+ (WebKit::PageClientImpl::derefView):
+ (WebKit::PageClientImpl::startWindowDrag):
+ (WebKit::PageClientImpl::platformWindow):
+ (WebKit::PageClientImpl::inspectorAttachmentView):
+ (WebKit::PageClientImpl::remoteObjectRegistry):
+ * UIProcess/mac/WebColorPickerMac.h:
+ * UIProcess/mac/WebColorPickerMac.mm:
+ (WebKit::WebColorPickerMac::create):
+ (WebKit::WebColorPickerMac::WebColorPickerMac):
+ (-[WKColorPopoverMac initWithFrame:inView:]):
+ * UIProcess/mac/WebContextMenuProxyMac.h:
+ * UIProcess/mac/WebContextMenuProxyMac.mm:
+ (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
+ * UIProcess/mac/WebPopupMenuProxyMac.h:
+ (WebKit::WebPopupMenuProxyMac::create):
+ * UIProcess/mac/WebPopupMenuProxyMac.mm:
+ (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
+ Move ownership of WebPageProxy and PageClientImpl to WebViewImpl.
+
</ins><span class="cx"> 2015-10-30 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix Mac CMake build after rr191810.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -24,105 +24,25 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import "config.h"
</span><del>-#import "WKView.h"
</del><ins>+#import "WKViewInternal.h"
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">
</span><del>-#if USE(DICTATION_ALTERNATIVES)
-#import <AppKit/NSTextAlternatives.h>
-#import <AppKit/NSAttributedString.h>
-#endif
-
-#import "APILegacyContextHistoryClient.h"
</del><ins>+#import "APIHitTestResult.h"
</ins><span class="cx"> #import "APIPageConfiguration.h"
</span><del>-#import "AppKitSPI.h"
-#import "AttributedString.h"
-#import "DataReference.h"
-#import "EditingRange.h"
-#import "EditorState.h"
-#import "LayerTreeContext.h"
-#import "Logging.h"
-#import "NativeWebKeyboardEvent.h"
-#import "NativeWebMouseEvent.h"
-#import "NativeWebWheelEvent.h"
-#import "PageClientImpl.h"
-#import "PasteboardTypes.h"
-#import "StringUtilities.h"
-#import "TextChecker.h"
-#import "TextCheckerState.h"
-#import "WKAPICast.h"
-#import "WKFullScreenWindowController.h"
-#import "WKLayoutMode.h"
-#import "WKProcessPoolInternal.h"
-#import "WKStringCF.h"
-#import "WKTextInputWindowController.h"
-#import "WKViewInternal.h"
-#import "WKViewPrivate.h"
-#import "WKWebView.h"
-#import "WebBackForwardList.h"
-#import "WebEventFactory.h"
-#import "WebHitTestResultData.h"
</del><ins>+#import "WKBrowsingContextGroupPrivate.h"
+#import "WKProcessGroupPrivate.h"
+#import "WebBackForwardListItem.h"
</ins><span class="cx"> #import "WebKit2Initialize.h"
</span><del>-#import "WebPage.h"
</del><span class="cx"> #import "WebPageGroup.h"
</span><del>-#import "WebPageProxy.h"
-#import "WebPreferences.h"
</del><span class="cx"> #import "WebProcessPool.h"
</span><del>-#import "WebProcessProxy.h"
-#import "WebSystemInterface.h"
</del><span class="cx"> #import "WebViewImpl.h"
</span><del>-#import <QuartzCore/QuartzCore.h>
-#import <WebCore/AXObjectCache.h>
-#import <WebCore/ColorMac.h>
-#import <WebCore/CoreGraphicsSPI.h>
-#import <WebCore/DataDetectorsSPI.h>
-#import <WebCore/DragController.h>
-#import <WebCore/DragData.h>
-#import <WebCore/FloatRect.h>
-#import <WebCore/Image.h>
-#import <WebCore/IntRect.h>
-#import <WebCore/FileSystem.h>
-#import <WebCore/KeyboardEvent.h>
-#import <WebCore/LocalizedStrings.h>
-#import <WebCore/NSMenuSPI.h>
-#import <WebCore/PlatformEventFactoryMac.h>
-#import <WebCore/PlatformScreen.h>
-#import <WebCore/Region.h>
-#import <WebCore/RuntimeApplicationChecks.h>
-#import <WebCore/SharedBuffer.h>
-#import <WebCore/TextAlternativeWithRange.h>
-#import <WebCore/TextIndicator.h>
-#import <WebCore/TextIndicatorWindow.h>
-#import <WebCore/TextUndoInsertionMarkupMac.h>
-#import <WebCore/WebCoreCALayerExtras.h>
-#import <WebCore/WebCoreFullScreenPlaceholderView.h>
-#import <WebCore/WebCoreFullScreenWindow.h>
-#import <WebCore/WebCoreNSStringExtras.h>
-#import <WebKitSystemInterface.h>
-#import <sys/stat.h>
-#import <wtf/RefPtr.h>
-#import <wtf/RetainPtr.h>
-#import <wtf/RunLoop.h>
</del><span class="cx">
</span><del>-/* API internals. */
-#import "WKBrowsingContextGroupPrivate.h"
-#import "WKProcessGroupPrivate.h"
-
</del><span class="cx"> using namespace WebKit;
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><del>-#if USE(ASYNC_NSTEXTINPUTCLIENT)
-@interface NSTextInputContext (WKNSTextInputContextDetails)
-- (void)handleEvent:(NSEvent *)event completionHandler:(void(^)(BOOL handled))completionHandler;
-- (void)handleEventByInputMethod:(NSEvent *)event completionHandler:(void(^)(BOOL handled))completionHandler;
-- (BOOL)handleEventByKeyboardLayout:(NSEvent *)event;
-@end
-#endif
-
</del><span class="cx"> @interface WKViewData : NSObject {
</span><span class="cx"> @public
</span><del>- std::unique_ptr<PageClientImpl> _pageClient;
- RefPtr<WebPageProxy> _page;
</del><span class="cx"> std::unique_ptr<WebViewImpl> _impl;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -145,29 +65,18 @@
</span><span class="cx">
</span><span class="cx"> - (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView
</span><span class="cx"> {
</span><del>- return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:relatedView ? toAPI(relatedView->_data->_page.get()) : nil];
</del><ins>+ return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:relatedView ? relatedView.pageRef : nil];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // WK_API_ENABLED
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>-#if WK_API_ENABLED
- _data->_impl->destroyRemoteObjectRegistry();
-#endif
-
- _data->_page->close();
-
</del><span class="cx"> _data->_impl = nullptr;
</span><span class="cx">
</span><span class="cx"> [_data release];
</span><span class="cx"> _data = nil;
</span><span class="cx">
</span><del>- NSNotificationCenter* workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
- [workspaceNotificationCenter removeObserver:self name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
-
- WebProcessPool::statistics().wkViewCount--;
-
</del><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -235,8 +144,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)prepareContentInRect:(NSRect)rect
</span><span class="cx"> {
</span><del>- _data->_impl->setContentPreparationRect(NSRectToCGRect(rect));
- _data->_impl->updateViewExposedRect();
</del><ins>+ _data->_impl->prepareContentInRect(NSRectToCGRect(rect));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setFrameSize:(NSSize)size
</span><span class="lines">@@ -1007,34 +915,11 @@
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- [NSApp registerServicesMenuSendTypes:PasteboardTypes::forSelection() returnTypes:PasteboardTypes::forEditing()];
-
</del><span class="cx"> InitializeWebKit2();
</span><span class="cx">
</span><span class="cx"> _data = [[WKViewData alloc] init];
</span><ins>+ _data->_impl = std::make_unique<WebViewImpl>(self, webView, processPool, WTF::move(configuration));
</ins><span class="cx">
</span><del>- _data->_pageClient = std::make_unique<PageClientImpl>(self, webView);
- _data->_page = processPool.createWebPage(*_data->_pageClient, WTF::move(configuration));
-
- _data->_impl = std::make_unique<WebViewImpl>(self, *_data->_page, *_data->_pageClient);
- static_cast<PageClientImpl&>(*_data->_pageClient).setImpl(*_data->_impl);
-
- _data->_page->setAddsVisitedLinks(processPool.historyClient().addsVisitedLinks());
-
- _data->_page->initializeWebPage();
-
- _data->_impl->registerDraggedTypes();
-
- self.wantsLayer = YES;
-
- // Explicitly set the layer contents placement so AppKit will make sure that our layer has masksToBounds set to YES.
- self.layerContentsPlacement = NSViewLayerContentsPlacementTopLeft;
-
- WebProcessPool::statistics().wkViewCount++;
-
- NSNotificationCenter* workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
- [workspaceNotificationCenter addObserver:self selector:@selector(_activeSpaceDidChange:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
-
</del><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1101,7 +986,7 @@
</span><span class="cx">
</span><span class="cx"> - (WKPageRef)pageRef
</span><span class="cx"> {
</span><del>- return toAPI(_data->_page.get());
</del><ins>+ return toAPI(&_data->_impl->page());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (BOOL)canChangeFrameLayout:(WKFrameRef)frameRef
</span><span class="lines">@@ -1474,6 +1359,11 @@
</span><span class="cx"> _data->_impl->setDidMoveSwipeSnapshotCallback(callback);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData
+{
+ return [self _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult) withType:type userData:toAPI(userData)];
+}
+
</ins><span class="cx"> - (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(uint32_t)type userData:(WKTypeRef)userData
</span><span class="cx"> {
</span><span class="cx"> return nil;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> OBJC_CLASS WKFullScreenWindowController;
</span><span class="cx"> OBJC_CLASS WKImmediateActionController;
</span><span class="cx"> OBJC_CLASS WKViewLayoutStrategy;
</span><ins>+OBJC_CLASS WKWebView;
</ins><span class="cx"> OBJC_CLASS WKWindowVisibilityObserver;
</span><span class="cx"> OBJC_CLASS _WKThumbnailView;
</span><span class="cx">
</span><span class="lines">@@ -67,13 +68,15 @@
</span><span class="cx"> // They're not actually optional.
</span><span class="cx"> @optional
</span><span class="cx">
</span><del>-- (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(uint32_t)type userData:(WKTypeRef)userData;
</del><ins>+- (id)_web_immediateActionAnimationControllerForHitTestResultInternal:(API::HitTestResult*)hitTestResult withType:(uint32_t)type userData:(API::Object*)userData;
+
</ins><span class="cx"> - (void)_prepareForImmediateActionAnimation;
</span><span class="cx"> - (void)_cancelImmediateActionAnimation;
</span><span class="cx"> - (void)_completeImmediateActionAnimation;
</span><span class="cx"> - (void)_dismissContentRelativeChildWindows;
</span><span class="cx"> - (void)_dismissContentRelativeChildWindowsWithAnimation:(BOOL)animate;
</span><span class="cx"> - (void)_gestureEventWasNotHandledByWebCore:(NSEvent *)event;
</span><ins>+- (void)_didChangeContentSize:(NSSize)newSize;
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="lines">@@ -83,6 +86,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class PageClientImpl;
</ins><span class="cx"> class DrawingAreaProxy;
</span><span class="cx"> class ViewGestureController;
</span><span class="cx"> class WebEditCommandProxy;
</span><span class="lines">@@ -106,12 +110,14 @@
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(WebViewImpl);
</span><span class="cx"> public:
</span><del>- WebViewImpl(NSView <WebViewImplDelegate> *, WebPageProxy&, PageClient&);
</del><ins>+ WebViewImpl(NSView <WebViewImplDelegate> *, WKWebView *outerWebView, WebProcessPool&, Ref<API::PageConfiguration>&&);
</ins><span class="cx">
</span><span class="cx"> ~WebViewImpl();
</span><span class="cx">
</span><span class="cx"> NSWindow *window();
</span><span class="cx">
</span><ins>+ WebPageProxy& page() { return m_page.get(); }
+
</ins><span class="cx"> void processDidExit();
</span><span class="cx"> void pageClosed();
</span><span class="cx"> void didRelaunchProcess();
</span><span class="lines">@@ -160,7 +166,7 @@
</span><span class="cx"> void setTopContentInset(CGFloat);
</span><span class="cx"> CGFloat topContentInset() const { return m_topContentInset; }
</span><span class="cx">
</span><del>- void setContentPreparationRect(CGRect);
</del><ins>+ void prepareContentInRect(CGRect);
</ins><span class="cx"> void updateViewExposedRect();
</span><span class="cx"> void setClipsToVisibleRect(bool);
</span><span class="cx"> bool clipsToVisibleRect() const { return m_clipsToVisibleRect; }
</span><span class="lines">@@ -318,12 +324,12 @@
</span><span class="cx"> void prepareForDictionaryLookup();
</span><span class="cx"> void setAllowsLinkPreview(bool);
</span><span class="cx"> bool allowsLinkPreview() const { return m_allowsLinkPreview; }
</span><del>- void* immediateActionAnimationControllerForHitTestResult(WKHitTestResultRef, uint32_t type, WKTypeRef userData);
- void* immediateActionAnimationControllerForHitTestResultFromViewOnly(WKHitTestResultRef, uint32_t type, WKTypeRef userData);
</del><ins>+ void* immediateActionAnimationControllerForHitTestResult(API::HitTestResult*, uint32_t type, API::Object* userData);
</ins><span class="cx"> void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object* userData);
</span><span class="cx"> void prepareForImmediateActionAnimation();
</span><span class="cx"> void cancelImmediateActionAnimation();
</span><span class="cx"> void completeImmediateActionAnimation();
</span><ins>+ void didChangeContentSize(CGSize);
</ins><span class="cx">
</span><span class="cx"> void setIgnoresNonWheelEvents(bool);
</span><span class="cx"> bool ignoresNonWheelEvents() const { return m_ignoresNonWheelEvents; }
</span><span class="lines">@@ -363,7 +369,6 @@
</span><span class="cx"> NSView *inspectorAttachmentView();
</span><span class="cx">
</span><span class="cx"> _WKRemoteObjectRegistry *remoteObjectRegistry();
</span><del>- void destroyRemoteObjectRegistry(); // FIXME: Temporary. Can fold in after we move ownership of WebPageProxy here.
</del><span class="cx">
</span><span class="cx"> WKBrowsingContextController *browsingContextController();
</span><span class="cx"> #endif // WK_API_ENABLED
</span><span class="lines">@@ -504,8 +509,8 @@
</span><span class="cx"> void mouseDraggedInternal(NSEvent *);
</span><span class="cx">
</span><span class="cx"> NSView <WebViewImplDelegate> *m_view;
</span><del>- WebPageProxy& m_page;
- PageClient& m_pageClient;
</del><ins>+ std::unique_ptr<PageClient> m_pageClient;
+ Ref<WebPageProxy> m_page;
</ins><span class="cx">
</span><span class="cx"> WeakPtrFactory<WebViewImpl> m_weakPtrFactory;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">
</span><ins>+#import "APILegacyContextHistoryClient.h"
</ins><span class="cx"> #import "AppKitSPI.h"
</span><span class="cx"> #import "ColorSpaceData.h"
</span><span class="cx"> #import "GenericCallback.h"
</span><span class="lines">@@ -37,6 +38,7 @@
</span><span class="cx"> #import "NativeWebMouseEvent.h"
</span><span class="cx"> #import "NativeWebWheelEvent.h"
</span><span class="cx"> #import "PageClient.h"
</span><ins>+#import "PageClientImpl.h"
</ins><span class="cx"> #import "PasteboardTypes.h"
</span><span class="cx"> #import "RemoteLayerTreeDrawingAreaProxy.h"
</span><span class="cx"> #import "RemoteObjectRegistry.h"
</span><span class="lines">@@ -121,6 +123,9 @@
</span><span class="cx"> _view = view;
</span><span class="cx"> _impl = &impl;
</span><span class="cx">
</span><ins>+ NSNotificationCenter* workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
+ [workspaceNotificationCenter addObserver:self selector:@selector(_activeSpaceDidChange:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
+
</ins><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -129,6 +134,9 @@
</span><span class="cx"> if (canLoadLUNotificationPopoverWillClose())
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:getLUNotificationPopoverWillClose() object:nil];
</span><span class="cx">
</span><ins>+ NSNotificationCenter *workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
+ [workspaceNotificationCenter removeObserver:self name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
+
</ins><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -287,6 +295,11 @@
</span><span class="cx"> _impl->clearTextIndicatorWithAnimation(WebCore::TextIndicatorWindowDismissalAnimation::None);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_activeSpaceDidChange:(NSNotification *)notification
+{
+ _impl->activeSpaceDidChange();
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @interface WKEditCommandObjC : NSObject {
</span><span class="lines">@@ -427,21 +440,25 @@
</span><span class="cx"> return options;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebViewImpl::WebViewImpl(NSView <WebViewImplDelegate> *view, WebPageProxy& page, PageClient& pageClient)
</del><ins>+WebViewImpl::WebViewImpl(NSView <WebViewImplDelegate> *view, WKWebView *outerWebView, WebProcessPool& processPool, Ref<API::PageConfiguration>&& configuration)
</ins><span class="cx"> : m_view(view)
</span><del>- , m_page(page)
- , m_pageClient(pageClient)
</del><ins>+ , m_pageClient(std::make_unique<PageClientImpl>(view, outerWebView))
+ , m_page(processPool.createWebPage(*m_pageClient, WTF::move(configuration)))
</ins><span class="cx"> , m_weakPtrFactory(this)
</span><del>- , m_needsViewFrameInWindowCoordinates(m_page.preferences().pluginsEnabled())
</del><ins>+ , m_needsViewFrameInWindowCoordinates(m_page->preferences().pluginsEnabled())
</ins><span class="cx"> , m_intrinsicContentSize(CGSizeMake(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric))
</span><span class="cx"> , m_layoutStrategy([WKViewLayoutStrategy layoutStrategyWithPage:m_page view:m_view viewImpl:*this mode:kWKLayoutModeViewSize])
</span><span class="cx"> , m_undoTarget(adoptNS([[WKEditorUndoTargetObjC alloc] init]))
</span><span class="cx"> , m_windowVisibilityObserver(adoptNS([[WKWindowVisibilityObserver alloc] initWithView:view impl:*this]))
</span><span class="cx"> , m_primaryTrackingArea(adoptNS([[NSTrackingArea alloc] initWithRect:m_view.frame options:trackingAreaOptions() owner:m_view userInfo:nil]))
</span><span class="cx"> {
</span><ins>+ static_cast<PageClientImpl&>(*m_pageClient).setImpl(*this);
+
+ [NSApp registerServicesMenuSendTypes:PasteboardTypes::forSelection() returnTypes:PasteboardTypes::forEditing()];
+
</ins><span class="cx"> [m_view addTrackingArea:m_primaryTrackingArea.get()];
</span><span class="cx">
</span><del>- m_page.setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</del><ins>+ m_page->setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</ins><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> if (Class gestureClass = NSClassFromString(@"NSImmediateActionGestureRecognizer")) {
</span><span class="lines">@@ -451,10 +468,32 @@
</span><span class="cx"> [m_immediateActionGestureRecognizer setDelaysPrimaryMouseButtonEvents:NO];
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><ins>+
+
+ m_page->setAddsVisitedLinks(processPool.historyClient().addsVisitedLinks());
+
+ m_page->initializeWebPage();
+
+ registerDraggedTypes();
+
+ m_view.wantsLayer = YES;
+
+ // Explicitly set the layer contents placement so AppKit will make sure that our layer has masksToBounds set to YES.
+ m_view.layerContentsPlacement = NSViewLayerContentsPlacementTopLeft;
+
+ WebProcessPool::statistics().wkViewCount++;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebViewImpl::~WebViewImpl()
</span><span class="cx"> {
</span><ins>+#if WK_API_ENABLED
+ if (m_remoteObjectRegistry) {
+ m_page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page->pageID());
+ [m_remoteObjectRegistry _invalidate];
+ m_remoteObjectRegistry = nil;
+ }
+#endif
+
</ins><span class="cx"> ASSERT(!m_inSecureInputState);
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="lines">@@ -466,6 +505,11 @@
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> [m_immediateActionController willDestroyView:m_view];
</span><span class="cx"> #endif
</span><ins>+
+ m_page->close();
+
+ WebProcessPool::statistics().wkViewCount--;
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSWindow *WebViewImpl::window()
</span><span class="lines">@@ -497,27 +541,27 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setDrawsBackground(bool drawsBackground)
</span><span class="cx"> {
</span><del>- m_page.setDrawsBackground(drawsBackground);
</del><ins>+ m_page->setDrawsBackground(drawsBackground);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::drawsBackground() const
</span><span class="cx"> {
</span><del>- return m_page.drawsBackground();
</del><ins>+ return m_page->drawsBackground();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setDrawsTransparentBackground(bool drawsTransparentBackground)
</span><span class="cx"> {
</span><del>- m_page.setDrawsTransparentBackground(drawsTransparentBackground);
</del><ins>+ m_page->setDrawsTransparentBackground(drawsTransparentBackground);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::drawsTransparentBackground() const
</span><span class="cx"> {
</span><del>- return m_page.drawsTransparentBackground();
</del><ins>+ return m_page->drawsTransparentBackground();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isOpaque() const
</span><span class="cx"> {
</span><del>- return m_page.drawsBackground();
</del><ins>+ return m_page->drawsBackground();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::acceptsFirstMouse(NSEvent *event)
</span><span class="lines">@@ -531,7 +575,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> setLastMouseDownEvent(event);
</span><del>- bool result = m_page.acceptsFirstMouse(event.eventNumber, WebEventFactory::createWebMouseEvent(event, m_lastPressureEvent.get(), m_view));
</del><ins>+ bool result = m_page->acceptsFirstMouse(event.eventNumber, WebEventFactory::createWebMouseEvent(event, m_lastPressureEvent.get(), m_view));
</ins><span class="cx"> setLastMouseDownEvent(nil);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -555,9 +599,9 @@
</span><span class="cx"> m_inBecomeFirstResponder = true;
</span><span class="cx">
</span><span class="cx"> updateSecureInputState();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsFocused);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsFocused);
</ins><span class="cx"> // Restore the selection in the editable region if resigning first responder cleared selection.
</span><del>- m_page.restoreSelectionInFocusedEditableElement();
</del><ins>+ m_page->restoreSelectionInFocusedEditableElement();
</ins><span class="cx">
</span><span class="cx"> m_inBecomeFirstResponder = false;
</span><span class="cx">
</span><span class="lines">@@ -566,7 +610,7 @@
</span><span class="cx"> NSEvent *keyboardEvent = nil;
</span><span class="cx"> if ([event type] == NSKeyDown || [event type] == NSKeyUp)
</span><span class="cx"> keyboardEvent = event;
</span><del>- m_page.setInitialFocus(direction == NSSelectingNext, keyboardEvent != nil, NativeWebKeyboardEvent(keyboardEvent, false, { }), [](WebKit::CallbackBase::Error) { });
</del><ins>+ m_page->setInitialFocus(direction == NSSelectingNext, keyboardEvent != nil, NativeWebKeyboardEvent(keyboardEvent, false, { }), [](WebKit::CallbackBase::Error) { });
</ins><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -589,20 +633,20 @@
</span><span class="cx"> m_inResignFirstResponder = true;
</span><span class="cx">
</span><span class="cx"> #if USE(ASYNC_NSTEXTINPUTCLIENT)
</span><del>- m_page.confirmCompositionAsync();
</del><ins>+ m_page->confirmCompositionAsync();
</ins><span class="cx"> #else
</span><del>- if (m_page.editorState().hasComposition && !m_page.editorState().shouldIgnoreCompositionSelectionChange)
- m_page.cancelComposition();
</del><ins>+ if (m_page->editorState().hasComposition && !m_page->editorState().shouldIgnoreCompositionSelectionChange)
+ m_page->cancelComposition();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> notifyInputContextAboutDiscardedComposition();
</span><span class="cx">
</span><span class="cx"> resetSecureInputState();
</span><span class="cx">
</span><del>- if (!m_page.maintainsInactiveSelection())
- m_page.clearSelection();
</del><ins>+ if (!m_page->maintainsInactiveSelection())
+ m_page->clearSelection();
</ins><span class="cx">
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsFocused);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsFocused);
</ins><span class="cx">
</span><span class="cx"> m_inResignFirstResponder = false;
</span><span class="cx">
</span><span class="lines">@@ -620,14 +664,14 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::viewWillStartLiveResize()
</span><span class="cx"> {
</span><del>- m_page.viewWillStartLiveResize();
</del><ins>+ m_page->viewWillStartLiveResize();
</ins><span class="cx">
</span><span class="cx"> [m_layoutStrategy willStartLiveResize];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::viewDidEndLiveResize()
</span><span class="cx"> {
</span><del>- m_page.viewWillEndLiveResize();
</del><ins>+ m_page->viewWillEndLiveResize();
</ins><span class="cx">
</span><span class="cx"> [m_layoutStrategy didEndLiveResize];
</span><span class="cx"> }
</span><span class="lines">@@ -701,18 +745,18 @@
</span><span class="cx"> accessibilityPosition = [[weakThis->m_view accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue];
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx">
</span><del>- weakThis->m_page.windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition);
</del><ins>+ weakThis->m_page->windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition);
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setFixedLayoutSize(CGSize fixedLayoutSize)
</span><span class="cx"> {
</span><del>- m_page.setFixedLayoutSize(WebCore::expandedIntSize(WebCore::FloatSize(fixedLayoutSize)));
</del><ins>+ m_page->setFixedLayoutSize(WebCore::expandedIntSize(WebCore::FloatSize(fixedLayoutSize)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGSize WebViewImpl::fixedLayoutSize() const
</span><span class="cx"> {
</span><del>- return m_page.fixedLayoutSize();
</del><ins>+ return m_page->fixedLayoutSize();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> std::unique_ptr<WebKit::DrawingAreaProxy> WebViewImpl::createDrawingAreaProxy()
</span><span class="lines">@@ -725,16 +769,16 @@
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isUsingUISideCompositing() const
</span><span class="cx"> {
</span><del>- auto* drawingArea = m_page.drawingArea();
</del><ins>+ auto* drawingArea = m_page->drawingArea();
</ins><span class="cx"> return drawingArea && drawingArea->type() == DrawingAreaTypeRemoteLayerTree;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setDrawingAreaSize(CGSize size)
</span><span class="cx"> {
</span><del>- if (!m_page.drawingArea())
</del><ins>+ if (!m_page->drawingArea())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_page.drawingArea()->setSize(WebCore::IntSize(size), WebCore::IntSize(), WebCore::IntSize(m_resizeScrollOffset));
</del><ins>+ m_page->drawingArea()->setSize(WebCore::IntSize(size), WebCore::IntSize(), WebCore::IntSize(m_resizeScrollOffset));
</ins><span class="cx"> m_resizeScrollOffset = CGSizeZero;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -755,7 +799,7 @@
</span><span class="cx"> // If a geometry update is pending the new update won't be sent. Poll without waiting for any
</span><span class="cx"> // pending did-update message now, such that the new update can be sent. We do so after setting
</span><span class="cx"> // the drawing area size such that the latest update is sent.
</span><del>- if (DrawingAreaProxy* drawingArea = m_page.drawingArea())
</del><ins>+ if (DrawingAreaProxy* drawingArea = m_page->drawingArea())
</ins><span class="cx"> drawingArea->waitForPossibleGeometryUpdate(std::chrono::milliseconds::zero());
</span><span class="cx"> #else
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -766,7 +810,7 @@
</span><span class="cx"> {
</span><span class="cx"> // This SPI is only used on 10.9 and below, and is incompatible with the fence-based drawing area size synchronization in 10.10+.
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
</span><del>- if (DrawingAreaProxy* drawingArea = m_page.drawingArea()) {
</del><ins>+ if (DrawingAreaProxy* drawingArea = m_page->drawingArea()) {
</ins><span class="cx"> // If a geometry update is still pending then the action of receiving the
</span><span class="cx"> // first geometry update may result in another update being scheduled -
</span><span class="cx"> // we should wait for this to complete too.
</span><span class="lines">@@ -792,14 +836,14 @@
</span><span class="cx"> if (frameSizeUpdatesDisabled())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (DrawingAreaProxy* drawingArea = m_page.drawingArea())
</del><ins>+ if (DrawingAreaProxy* drawingArea = m_page->drawingArea())
</ins><span class="cx"> drawingArea->waitForPossibleGeometryUpdate();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::drawRect(CGRect rect)
</span><span class="cx"> {
</span><span class="cx"> LOG(Printing, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
</span><del>- m_page.endPrinting();
</del><ins>+ m_page->endPrinting();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::canChangeFrameLayout(WebFrameProxy& frame)
</span><span class="lines">@@ -869,13 +913,15 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_didScheduleSetTopContentInset = false;
</span><del>- m_page.setTopContentInset(m_topContentInset);
</del><ins>+ m_page->setTopContentInset(m_topContentInset);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebViewImpl::setContentPreparationRect(CGRect rect)
</del><ins>+void WebViewImpl::prepareContentInRect(CGRect rect)
</ins><span class="cx"> {
</span><span class="cx"> m_contentPreparationRect = rect;
</span><span class="cx"> m_useContentPreparationRectForVisibleRect = true;
</span><ins>+
+ updateViewExposedRect();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::updateViewExposedRect()
</span><span class="lines">@@ -885,7 +931,7 @@
</span><span class="cx"> if (m_useContentPreparationRectForVisibleRect)
</span><span class="cx"> exposedRect = CGRectUnion(m_contentPreparationRect, exposedRect);
</span><span class="cx">
</span><del>- if (auto drawingArea = m_page.drawingArea())
</del><ins>+ if (auto drawingArea = m_page->drawingArea())
</ins><span class="cx"> drawingArea->setExposedRect(m_clipsToVisibleRect ? WebCore::FloatRect(exposedRect) : WebCore::FloatRect::infiniteRect());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -899,25 +945,25 @@
</span><span class="cx"> {
</span><span class="cx"> bool expandsToFit = minimumSizeForAutoLayout.width > 0;
</span><span class="cx">
</span><del>- m_page.setMinimumLayoutSize(WebCore::IntSize(minimumSizeForAutoLayout));
- m_page.setMainFrameIsScrollable(!expandsToFit);
</del><ins>+ m_page->setMinimumLayoutSize(WebCore::IntSize(minimumSizeForAutoLayout));
+ m_page->setMainFrameIsScrollable(!expandsToFit);
</ins><span class="cx">
</span><span class="cx"> setClipsToVisibleRect(expandsToFit);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGSize WebViewImpl::minimumSizeForAutoLayout() const
</span><span class="cx"> {
</span><del>- return m_page.minimumLayoutSize();
</del><ins>+ return m_page->minimumLayoutSize();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setShouldExpandToViewHeightForAutoLayout(bool shouldExpandToViewHeightForAutoLayout)
</span><span class="cx"> {
</span><del>- m_page.setAutoSizingShouldExpandToViewHeight(shouldExpandToViewHeightForAutoLayout);
</del><ins>+ m_page->setAutoSizingShouldExpandToViewHeight(shouldExpandToViewHeightForAutoLayout);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::shouldExpandToViewHeightForAutoLayout() const
</span><span class="cx"> {
</span><del>- return m_page.autoSizingShouldExpandToViewHeight();
</del><ins>+ return m_page->autoSizingShouldExpandToViewHeight();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setIntrinsicContentSize(CGSize intrinsicContentSize)
</span><span class="lines">@@ -927,7 +973,7 @@
</span><span class="cx"> // so that autolayout will know to provide space for us.
</span><span class="cx">
</span><span class="cx"> CGSize intrinsicContentSizeAcknowledgingFlexibleWidth = intrinsicContentSize;
</span><del>- if (intrinsicContentSize.width < m_page.minimumLayoutSize().width())
</del><ins>+ if (intrinsicContentSize.width < m_page->minimumLayoutSize().width())
</ins><span class="cx"> intrinsicContentSizeAcknowledgingFlexibleWidth.width = NSViewNoInstrinsicMetric;
</span><span class="cx">
</span><span class="cx"> m_intrinsicContentSize = intrinsicContentSizeAcknowledgingFlexibleWidth;
</span><span class="lines">@@ -949,13 +995,13 @@
</span><span class="cx"> if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale))
</span><span class="cx"> [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
</span><span class="cx">
</span><del>- m_page.scaleView(viewScale);
</del><ins>+ m_page->scaleView(viewScale);
</ins><span class="cx"> [m_layoutStrategy didChangeViewScale];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CGFloat WebViewImpl::viewScale() const
</span><span class="cx"> {
</span><del>- return m_page.viewScaleFactor();
</del><ins>+ return m_page->viewScaleFactor();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKLayoutMode WebViewImpl::layoutMode() const
</span><span class="lines">@@ -982,7 +1028,7 @@
</span><span class="cx"> if ([m_fullScreenWindowController isFullScreen])
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- WebFrameProxy* frame = m_page.mainFrame();
</del><ins>+ WebFrameProxy* frame = m_page->mainFrame();
</ins><span class="cx"> if (!frame)
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="lines">@@ -1015,7 +1061,7 @@
</span><span class="cx"> void WebViewImpl::setOverrideDeviceScaleFactor(CGFloat deviceScaleFactor)
</span><span class="cx"> {
</span><span class="cx"> m_overrideDeviceScaleFactor = deviceScaleFactor;
</span><del>- m_page.setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</del><ins>+ m_page->setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float WebViewImpl::intrinsicDeviceScaleFactor() const
</span><span class="lines">@@ -1031,19 +1077,19 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidOrderOffScreen()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible | WebCore::ViewState::WindowIsActive);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible | WebCore::ViewState::WindowIsActive);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidOrderOnScreen()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible | WebCore::ViewState::WindowIsActive);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible | WebCore::ViewState::WindowIsActive);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidBecomeKey(NSWindow *keyWindow)
</span><span class="cx"> {
</span><span class="cx"> if (keyWindow == m_view.window || keyWindow == m_view.window.attachedSheet) {
</span><span class="cx"> updateSecureInputState();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::WindowIsActive);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::WindowIsActive);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1051,18 +1097,18 @@
</span><span class="cx"> {
</span><span class="cx"> if (formerKeyWindow == m_view.window || formerKeyWindow == m_view.window.attachedSheet) {
</span><span class="cx"> updateSecureInputState();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::WindowIsActive);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::WindowIsActive);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidMiniaturize()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidDeminiaturize()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidMove()
</span><span class="lines">@@ -1081,30 +1127,30 @@
</span><span class="cx"> if (oldBackingScaleFactor == newBackingScaleFactor)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_page.setIntrinsicDeviceScaleFactor(newBackingScaleFactor);
</del><ins>+ m_page->setIntrinsicDeviceScaleFactor(newBackingScaleFactor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidChangeScreen()
</span><span class="cx"> {
</span><span class="cx"> NSWindow *window = m_targetWindowForMovePreparation ? m_targetWindowForMovePreparation : m_view.window;
</span><del>- m_page.windowScreenDidChange((PlatformDisplayID)[[[[window screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
</del><ins>+ m_page->windowScreenDidChange((PlatformDisplayID)[[[[window screen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidChangeLayerHosting()
</span><span class="cx"> {
</span><del>- m_page.layerHostingModeDidChange();
</del><ins>+ m_page->layerHostingModeDidChange();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::windowDidChangeOcclusionState()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::shouldDelayWindowOrderingForEvent(NSEvent *event)
</span><span class="cx"> {
</span><span class="cx"> // If this is the active window or we don't have a range selection, there is no need to perform additional checks
</span><span class="cx"> // and we can avoid making a synchronous call to the WebProcess.
</span><del>- if (m_view.window.isKeyWindow || m_page.editorState().selectionIsNone || !m_page.editorState().selectionIsRange)
</del><ins>+ if (m_view.window.isKeyWindow || m_page->editorState().selectionIsNone || !m_page->editorState().selectionIsRange)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> // There's a chance that responding to this event will run a nested event loop, and
</span><span class="lines">@@ -1116,7 +1162,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> setLastMouseDownEvent(event);
</span><del>- bool result = m_page.shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, m_lastPressureEvent.get(), m_view));
</del><ins>+ bool result = m_page->shouldDelayWindowOrderingForEvent(WebEventFactory::createWebMouseEvent(event, m_lastPressureEvent.get(), m_view));
</ins><span class="cx"> setLastMouseDownEvent(nil);
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -1124,7 +1170,7 @@
</span><span class="cx"> bool WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb(CGPoint point)
</span><span class="cx"> {
</span><span class="cx"> NSPoint localPoint = [m_view convertPoint:NSPointFromCGPoint(point) fromView:nil];
</span><del>- NSRect visibleThumbRect = NSRect(m_page.visibleScrollerThumbRect());
</del><ins>+ NSRect visibleThumbRect = NSRect(m_page->visibleScrollerThumbRect());
</ins><span class="cx"> return NSMouseInRect(localPoint, visibleThumbRect, m_view.isFlipped);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1156,12 +1202,12 @@
</span><span class="cx"> m_viewInWindowChangeWasDeferred = true;
</span><span class="cx"> else
</span><span class="cx"> viewStateChanges |= WebCore::ViewState::IsInWindow;
</span><del>- m_page.viewStateDidChange(viewStateChanges);
</del><ins>+ m_page->viewStateDidChange(viewStateChanges);
</ins><span class="cx">
</span><span class="cx"> updateWindowAndViewFrames();
</span><span class="cx">
</span><span class="cx"> // FIXME(135509) This call becomes unnecessary once 135509 is fixed; remove.
</span><del>- m_page.layerHostingModeDidChange();
</del><ins>+ m_page->layerHostingModeDidChange();
</ins><span class="cx">
</span><span class="cx"> if (!m_flagsChangedEventMonitor) {
</span><span class="cx"> auto weakThis = createWeakPtr();
</span><span class="lines">@@ -1184,7 +1230,7 @@
</span><span class="cx"> m_viewInWindowChangeWasDeferred = true;
</span><span class="cx"> else
</span><span class="cx"> viewStateChanges |= WebCore::ViewState::IsInWindow;
</span><del>- m_page.viewStateDidChange(viewStateChanges);
</del><ins>+ m_page->viewStateDidChange(viewStateChanges);
</ins><span class="cx">
</span><span class="cx"> [NSEvent removeMonitor:m_flagsChangedEventMonitor];
</span><span class="cx"> m_flagsChangedEventMonitor = nil;
</span><span class="lines">@@ -1197,7 +1243,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</del><ins>+ m_page->setIntrinsicDeviceScaleFactor(intrinsicDeviceScaleFactor());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::viewDidChangeBackingProperties()
</span><span class="lines">@@ -1207,23 +1253,23 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_colorSpace = nullptr;
</span><del>- if (DrawingAreaProxy *drawingArea = m_page.drawingArea())
</del><ins>+ if (DrawingAreaProxy *drawingArea = m_page->drawingArea())
</ins><span class="cx"> drawingArea->colorSpaceDidChange();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::viewDidHide()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::viewDidUnhide()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::activeSpaceDidChange()
</span><span class="cx"> {
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsVisible);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsVisible);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSView *WebViewImpl::hitTest(CGPoint point)
</span><span class="lines">@@ -1241,7 +1287,7 @@
</span><span class="cx"> modifierFlags:flagsChangedEvent.modifierFlags timestamp:flagsChangedEvent.timestamp windowNumber:flagsChangedEvent.windowNumber
</span><span class="cx"> context:flagsChangedEvent.context eventNumber:0 clickCount:0 pressure:0];
</span><span class="cx"> NativeWebMouseEvent webEvent(fakeEvent, m_lastPressureEvent.get(), m_view);
</span><del>- m_page.handleMouseEvent(webEvent);
</del><ins>+ m_page->handleMouseEvent(webEvent);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ColorSpaceData WebViewImpl::colorSpace()
</span><span class="lines">@@ -1263,12 +1309,12 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setUnderlayColor(NSColor *underlayColor)
</span><span class="cx"> {
</span><del>- m_page.setUnderlayColor(WebCore::colorFromNSColor(underlayColor));
</del><ins>+ m_page->setUnderlayColor(WebCore::colorFromNSColor(underlayColor));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSColor *WebViewImpl::underlayColor() const
</span><span class="cx"> {
</span><del>- WebCore::Color webColor = m_page.underlayColor();
</del><ins>+ WebCore::Color webColor = m_page->underlayColor();
</ins><span class="cx"> if (!webColor.isValid())
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="lines">@@ -1277,7 +1323,7 @@
</span><span class="cx">
</span><span class="cx"> NSColor *WebViewImpl::pageExtendedBackgroundColor() const
</span><span class="cx"> {
</span><del>- WebCore::Color color = m_page.pageExtendedBackgroundColor();
</del><ins>+ WebCore::Color color = m_page->pageExtendedBackgroundColor();
</ins><span class="cx"> if (!color.isValid())
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="lines">@@ -1286,12 +1332,12 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setOverlayScrollbarStyle(WTF::Optional<WebCore::ScrollbarOverlayStyle> scrollbarStyle)
</span><span class="cx"> {
</span><del>- m_page.setOverlayScrollbarStyle(scrollbarStyle);
</del><ins>+ m_page->setOverlayScrollbarStyle(scrollbarStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WTF::Optional<WebCore::ScrollbarOverlayStyle> WebViewImpl::overlayScrollbarStyle() const
</span><span class="cx"> {
</span><del>- return m_page.overlayScrollbarStyle();
</del><ins>+ return m_page->overlayScrollbarStyle();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::beginDeferringViewInWindowChanges()
</span><span class="lines">@@ -1315,7 +1361,7 @@
</span><span class="cx">
</span><span class="cx"> if (m_viewInWindowChangeWasDeferred) {
</span><span class="cx"> dispatchSetTopContentInset();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsInWindow);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsInWindow);
</ins><span class="cx"> m_viewInWindowChangeWasDeferred = false;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1331,7 +1377,7 @@
</span><span class="cx">
</span><span class="cx"> if (m_viewInWindowChangeWasDeferred) {
</span><span class="cx"> dispatchSetTopContentInset();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsInWindow);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsInWindow);
</ins><span class="cx"> m_viewInWindowChangeWasDeferred = false;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1346,7 +1392,7 @@
</span><span class="cx"> m_shouldDeferViewInWindowChanges = false;
</span><span class="cx">
</span><span class="cx"> auto weakThis = createWeakPtr();
</span><del>- m_page.installViewStateChangeCompletionHandler([weakThis, completionHandler]() {
</del><ins>+ m_page->installViewStateChangeCompletionHandler([weakThis, completionHandler]() {
</ins><span class="cx"> completionHandler();
</span><span class="cx">
</span><span class="cx"> if (!weakThis)
</span><span class="lines">@@ -1357,7 +1403,7 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> dispatchSetTopContentInset();
</span><del>- m_page.viewStateDidChange(WebCore::ViewState::IsInWindow, false, WebPageProxy::ViewStateChangeDispatchMode::Immediate);
</del><ins>+ m_page->viewStateDidChange(WebCore::ViewState::IsInWindow, false, WebPageProxy::ViewStateChangeDispatchMode::Immediate);
</ins><span class="cx"> m_viewInWindowChangeWasDeferred = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1372,7 +1418,7 @@
</span><span class="cx"> }
</span><span class="cx"> // WKView has a single input context for all editable areas (except for plug-ins).
</span><span class="cx"> NSTextInputContext *context = [m_view _superInputContext];
</span><del>- bool isInPasswordField = m_page.editorState().isInPasswordField;
</del><ins>+ bool isInPasswordField = m_page->editorState().isInPasswordField;
</ins><span class="cx">
</span><span class="cx"> if (isInPasswordField) {
</span><span class="cx"> if (!m_inSecureInputState)
</span><span class="lines">@@ -1418,7 +1464,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // Send back an empty string to the plug-in. This will disable text input.
</span><del>- m_page.sendComplexTextInputToPlugin(m_pluginComplexTextInputIdentifier, String());
</del><ins>+ m_page->sendComplexTextInputToPlugin(m_pluginComplexTextInputIdentifier, String());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setPluginComplexTextInputStateAndIdentifier(PluginComplexTextInputState pluginComplexTextInputState, uint64_t pluginComplexTextInputIdentifier)
</span><span class="lines">@@ -1455,7 +1501,7 @@
</span><span class="cx"> BOOL didHandleEvent = [[WKTextInputWindowController sharedTextInputWindowController] interpretKeyEvent:event usingLegacyCocoaTextInput:usingLegacyCocoaTextInput string:&string];
</span><span class="cx">
</span><span class="cx"> if (string) {
</span><del>- m_page.sendComplexTextInputToPlugin(m_pluginComplexTextInputIdentifier, string);
</del><ins>+ m_page->sendComplexTextInputToPlugin(m_pluginComplexTextInputIdentifier, string);
</ins><span class="cx">
</span><span class="cx"> if (!usingLegacyCocoaTextInput)
</span><span class="cx"> m_pluginComplexTextInputState = PluginComplexTextInputDisabled;
</span><span class="lines">@@ -1522,7 +1568,7 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::handleAcceptedAlternativeText(const String& acceptedAlternative)
</span><span class="cx"> {
</span><del>- m_page.handleAlternativeTextUIResult(acceptedAlternative);
</del><ins>+ m_page->handleAlternativeTextUIResult(acceptedAlternative);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1546,7 +1592,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view);
</span><del>- m_page.handleMouseEvent(webEvent);
</del><ins>+ m_page->handleMouseEvent(webEvent);
</ins><span class="cx">
</span><span class="cx"> m_lastPressureEvent = event;
</span><span class="cx"> #endif
</span><span class="lines">@@ -1596,7 +1642,7 @@
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isEditable() const
</span><span class="cx"> {
</span><del>- return m_page.isEditable();
</del><ins>+ return m_page->isEditable();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> typedef HashMap<SEL, String> SelectorNameMap;
</span><span class="lines">@@ -1661,7 +1707,7 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::executeEditCommandForSelector(SEL selector, const String& argument)
</span><span class="cx"> {
</span><del>- m_page.executeEditCommand(commandNameForSelector(selector), argument);
</del><ins>+ m_page->executeEditCommand(commandNameForSelector(selector), argument);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::registerEditCommand(RefPtr<WebEditCommandProxy> prpCommand, WebPageProxy::UndoOrRedo undoOrRedo)
</span><span class="lines">@@ -1688,9 +1734,9 @@
</span><span class="cx"> [pasteboard declareTypes:types owner:nil];
</span><span class="cx"> for (size_t i = 0; i < numTypes; ++i) {
</span><span class="cx"> if ([[types objectAtIndex:i] isEqualTo:NSStringPboardType])
</span><del>- [pasteboard setString:m_page.stringSelectionForPasteboard() forType:NSStringPboardType];
</del><ins>+ [pasteboard setString:m_page->stringSelectionForPasteboard() forType:NSStringPboardType];
</ins><span class="cx"> else {
</span><del>- RefPtr<WebCore::SharedBuffer> buffer = m_page.dataSelectionForPasteboard([types objectAtIndex:i]);
</del><ins>+ RefPtr<WebCore::SharedBuffer> buffer = m_page->dataSelectionForPasteboard([types objectAtIndex:i]);
</ins><span class="cx"> [pasteboard setData:buffer ? buffer->createNSData().get() : nil forType:[types objectAtIndex:i]];
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1699,12 +1745,12 @@
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::readSelectionFromPasteboard(NSPasteboard *pasteboard)
</span><span class="cx"> {
</span><del>- return m_page.readSelectionFromPasteboard([pasteboard name]);
</del><ins>+ return m_page->readSelectionFromPasteboard([pasteboard name]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> id WebViewImpl::validRequestorForSendAndReturnTypes(NSString *sendType, NSString *returnType)
</span><span class="cx"> {
</span><del>- EditorState editorState = m_page.editorState();
</del><ins>+ EditorState editorState = m_page->editorState();
</ins><span class="cx"> bool isValidSendType = false;
</span><span class="cx">
</span><span class="cx"> if (sendType && !editorState.selectionIsNone) {
</span><span class="lines">@@ -1728,7 +1774,7 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::centerSelectionInVisibleArea()
</span><span class="cx"> {
</span><del>- m_page.centerSelectionInVisibleArea();
</del><ins>+ m_page->centerSelectionInVisibleArea();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::selectionDidChange()
</span><span class="lines">@@ -1743,11 +1789,11 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::updateFontPanelIfNeeded()
</span><span class="cx"> {
</span><del>- const EditorState& editorState = m_page.editorState();
</del><ins>+ const EditorState& editorState = m_page->editorState();
</ins><span class="cx"> if (editorState.selectionIsNone || !editorState.isContentEditable)
</span><span class="cx"> return;
</span><span class="cx"> if ([NSFontPanel sharedFontPanelExists] && [[NSFontPanel sharedFontPanel] isVisible]) {
</span><del>- m_page.fontAtSelection([](const String& fontName, double fontSize, bool selectionHasMultipleFonts, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->fontAtSelection([](const String& fontName, double fontSize, bool selectionHasMultipleFonts, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> NSFont *font = [NSFont fontWithName:fontName size:fontSize];
</span><span class="cx"> if (font)
</span><span class="cx"> [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:selectionHasMultipleFonts];
</span><span class="lines">@@ -1761,7 +1807,7 @@
</span><span class="cx"> NSFont *font = [fontManager convertFont:fontManager.selectedFont];
</span><span class="cx"> if (!font)
</span><span class="cx"> return;
</span><del>- m_page.setFont(font.familyName, font.pointSize, font.fontDescriptor.symbolicTraits);
</del><ins>+ m_page->setFont(font.familyName, font.pointSize, font.fontDescriptor.symbolicTraits);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static NSMenuItem *menuItem(id <NSValidatedUserInterfaceItem> item)
</span><span class="lines">@@ -1785,11 +1831,11 @@
</span><span class="cx"> if (action == @selector(showGuessPanel:)) {
</span><span class="cx"> if (NSMenuItem *menuItem = WebKit::menuItem(item))
</span><span class="cx"> [menuItem setTitle:WebCore::contextMenuItemTagShowSpellingPanel(![[[NSSpellChecker sharedSpellChecker] spellingPanel] isVisible])];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(checkSpelling:) || action == @selector(changeSpelling:))
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx">
</span><span class="cx"> if (action == @selector(toggleContinuousSpellChecking:)) {
</span><span class="cx"> bool enabled = TextChecker::isContinuousSpellCheckingAllowed();
</span><span class="lines">@@ -1807,54 +1853,54 @@
</span><span class="cx"> if (action == @selector(toggleAutomaticSpellingCorrection:)) {
</span><span class="cx"> bool checked = TextChecker::state().isAutomaticSpellingCorrectionEnabled;
</span><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(orderFrontSubstitutionsPanel:)) {
</span><span class="cx"> if (NSMenuItem *menuItem = WebKit::menuItem(item))
</span><span class="cx"> [menuItem setTitle:WebCore::contextMenuItemTagShowSubstitutions(![[[NSSpellChecker sharedSpellChecker] substitutionsPanel] isVisible])];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(toggleSmartInsertDelete:)) {
</span><del>- bool checked = m_page.isSmartInsertDeleteEnabled();
</del><ins>+ bool checked = m_page->isSmartInsertDeleteEnabled();
</ins><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(toggleAutomaticQuoteSubstitution:)) {
</span><span class="cx"> bool checked = TextChecker::state().isAutomaticQuoteSubstitutionEnabled;
</span><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(toggleAutomaticDashSubstitution:)) {
</span><span class="cx"> bool checked = TextChecker::state().isAutomaticDashSubstitutionEnabled;
</span><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(toggleAutomaticLinkDetection:)) {
</span><span class="cx"> bool checked = TextChecker::state().isAutomaticLinkDetectionEnabled;
</span><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(toggleAutomaticTextReplacement:)) {
</span><span class="cx"> bool checked = TextChecker::state().isAutomaticTextReplacementEnabled;
</span><span class="cx"> [menuItem(item) setState:checked ? NSOnState : NSOffState];
</span><del>- return m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().isContentEditable;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (action == @selector(uppercaseWord:) || action == @selector(lowercaseWord:) || action == @selector(capitalizeWord:))
</span><del>- return m_page.editorState().selectionIsRange && m_page.editorState().isContentEditable;
</del><ins>+ return m_page->editorState().selectionIsRange && m_page->editorState().isContentEditable;
</ins><span class="cx">
</span><span class="cx"> if (action == @selector(stopSpeaking:))
</span><span class="cx"> return [NSApp isSpeaking];
</span><span class="cx">
</span><span class="cx"> // The centerSelectionInVisibleArea: selector is enabled if there's a selection range or if there's an insertion point in an editable area.
</span><span class="cx"> if (action == @selector(centerSelectionInVisibleArea:))
</span><del>- return m_page.editorState().selectionIsRange || (m_page.editorState().isContentEditable && !m_page.editorState().selectionIsNone);
</del><ins>+ return m_page->editorState().selectionIsRange || (m_page->editorState().isContentEditable && !m_page->editorState().selectionIsNone);
</ins><span class="cx">
</span><span class="cx"> // Next, handle editor commands. Start by returning true for anything that is not an editor command.
</span><span class="cx"> // Returning true is the default thing to do in an AppKit validate method for any selector that is not recognized.
</span><span class="lines">@@ -1870,7 +1916,7 @@
</span><span class="cx"> // FIXME: Theoretically, there is a race here; when we get the answer it might be old, from a previous time
</span><span class="cx"> // we asked for the same command; there is no guarantee the answer is still valid.
</span><span class="cx"> auto weakThis = createWeakPtr();
</span><del>- m_page.validateCommand(commandName, [weakThis](const String& commandName, bool isEnabled, int32_t state, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->validateCommand(commandName, [weakThis](const String& commandName, bool isEnabled, int32_t state, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> if (!weakThis)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -1901,7 +1947,7 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::startSpeaking()
</span><span class="cx"> {
</span><del>- m_page.getSelectionOrContentsAsString([](const String& string, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->getSelectionOrContentsAsString([](const String& string, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> if (error != WebKit::CallbackBase::Error::None)
</span><span class="cx"> return;
</span><span class="cx"> if (!string)
</span><span class="lines">@@ -1930,20 +1976,20 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.advanceToNextMisspelling(true);
</del><ins>+ m_page->advanceToNextMisspelling(true);
</ins><span class="cx"> [spellingPanel orderFront:sender];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::checkSpelling()
</span><span class="cx"> {
</span><del>- m_page.advanceToNextMisspelling(false);
</del><ins>+ m_page->advanceToNextMisspelling(false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::changeSpelling(id sender)
</span><span class="cx"> {
</span><span class="cx"> NSString *word = [[sender selectedCell] stringValue];
</span><span class="cx">
</span><del>- m_page.changeSpellingToWord(word);
</del><ins>+ m_page->changeSpellingToWord(word);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleContinuousSpellChecking()
</span><span class="lines">@@ -1951,7 +1997,7 @@
</span><span class="cx"> bool spellCheckingEnabled = !TextChecker::state().isContinuousSpellCheckingEnabled;
</span><span class="cx"> TextChecker::setContinuousSpellCheckingEnabled(spellCheckingEnabled);
</span><span class="cx">
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isGrammarCheckingEnabled()
</span><span class="lines">@@ -1965,7 +2011,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TextChecker::setGrammarCheckingEnabled(flag);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleGrammarChecking()
</span><span class="lines">@@ -1973,14 +2019,14 @@
</span><span class="cx"> bool grammarCheckingEnabled = !TextChecker::state().isGrammarCheckingEnabled;
</span><span class="cx"> TextChecker::setGrammarCheckingEnabled(grammarCheckingEnabled);
</span><span class="cx">
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleAutomaticSpellingCorrection()
</span><span class="cx"> {
</span><span class="cx"> TextChecker::setAutomaticSpellingCorrectionEnabled(!TextChecker::state().isAutomaticSpellingCorrectionEnabled);
</span><span class="cx">
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::orderFrontSubstitutionsPanel(id sender)
</span><span class="lines">@@ -2001,7 +2047,7 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleSmartInsertDelete()
</span><span class="cx"> {
</span><del>- m_page.setSmartInsertDeleteEnabled(!m_page.isSmartInsertDeleteEnabled());
</del><ins>+ m_page->setSmartInsertDeleteEnabled(!m_page->isSmartInsertDeleteEnabled());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isAutomaticQuoteSubstitutionEnabled()
</span><span class="lines">@@ -2015,13 +2061,13 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TextChecker::setAutomaticQuoteSubstitutionEnabled(flag);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleAutomaticQuoteSubstitution()
</span><span class="cx"> {
</span><span class="cx"> TextChecker::setAutomaticQuoteSubstitutionEnabled(!TextChecker::state().isAutomaticQuoteSubstitutionEnabled);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isAutomaticDashSubstitutionEnabled()
</span><span class="lines">@@ -2035,13 +2081,13 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TextChecker::setAutomaticDashSubstitutionEnabled(flag);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleAutomaticDashSubstitution()
</span><span class="cx"> {
</span><span class="cx"> TextChecker::setAutomaticDashSubstitutionEnabled(!TextChecker::state().isAutomaticDashSubstitutionEnabled);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isAutomaticLinkDetectionEnabled()
</span><span class="lines">@@ -2055,13 +2101,13 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TextChecker::setAutomaticLinkDetectionEnabled(flag);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleAutomaticLinkDetection()
</span><span class="cx"> {
</span><span class="cx"> TextChecker::setAutomaticLinkDetectionEnabled(!TextChecker::state().isAutomaticLinkDetectionEnabled);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::isAutomaticTextReplacementEnabled()
</span><span class="lines">@@ -2075,33 +2121,33 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> TextChecker::setAutomaticTextReplacementEnabled(flag);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toggleAutomaticTextReplacement()
</span><span class="cx"> {
</span><span class="cx"> TextChecker::setAutomaticTextReplacementEnabled(!TextChecker::state().isAutomaticTextReplacementEnabled);
</span><del>- m_page.process().updateTextCheckerState();
</del><ins>+ m_page->process().updateTextCheckerState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::uppercaseWord()
</span><span class="cx"> {
</span><del>- m_page.uppercaseWord();
</del><ins>+ m_page->uppercaseWord();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::lowercaseWord()
</span><span class="cx"> {
</span><del>- m_page.lowercaseWord();
</del><ins>+ m_page->lowercaseWord();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::capitalizeWord()
</span><span class="cx"> {
</span><del>- m_page.capitalizeWord();
</del><ins>+ m_page->capitalizeWord();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::preferencesDidChange()
</span><span class="cx"> {
</span><del>- BOOL needsViewFrameInWindowCoordinates = m_page.preferences().pluginsEnabled();
</del><ins>+ BOOL needsViewFrameInWindowCoordinates = m_page->preferences().pluginsEnabled();
</ins><span class="cx">
</span><span class="cx"> if (!!needsViewFrameInWindowCoordinates == !!m_needsViewFrameInWindowCoordinates)
</span><span class="cx"> return;
</span><span class="lines">@@ -2171,7 +2217,7 @@
</span><span class="cx"> [m_immediateActionController dismissContentRelativeChildWindows];
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- m_pageClient.dismissCorrectionPanel(WebCore::ReasonForDismissingAlternativeTextIgnored);
</del><ins>+ m_pageClient->dismissCorrectionPanel(WebCore::ReasonForDismissingAlternativeTextIgnored);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::hideWordDefinitionWindow()
</span><span class="lines">@@ -2192,7 +2238,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> NSPoint locationInViewCoordinates = [m_view convertPoint:[event locationInWindow] fromView:nil];
</span><del>- m_page.performDictionaryLookupAtLocation(WebCore::FloatPoint(locationInViewCoordinates));
</del><ins>+ m_page->performDictionaryLookupAtLocation(WebCore::FloatPoint(locationInViewCoordinates));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::prepareForDictionaryLookup()
</span><span class="lines">@@ -2220,16 +2266,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void* WebViewImpl::immediateActionAnimationControllerForHitTestResult(WKHitTestResultRef hitTestResult, uint32_t type, WKTypeRef userData)
</del><ins>+void* WebViewImpl::immediateActionAnimationControllerForHitTestResult(API::HitTestResult* hitTestResult, uint32_t type, API::Object* userData)
</ins><span class="cx"> {
</span><del>- return [m_view _immediateActionAnimationControllerForHitTestResult:hitTestResult withType:type userData:userData];
</del><ins>+ return [m_view _web_immediateActionAnimationControllerForHitTestResultInternal:hitTestResult withType:type userData:userData];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void* WebViewImpl::immediateActionAnimationControllerForHitTestResultFromViewOnly(WKHitTestResultRef hitTestResult, uint32_t type, WKTypeRef userData)
-{
- return nil;
-}
-
</del><span class="cx"> void WebViewImpl::didPerformImmediateActionHitTest(const WebHitTestResultData& result, bool contentPreventsDefault, API::Object* userData)
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="lines">@@ -2252,13 +2293,18 @@
</span><span class="cx"> [m_view _completeImmediateActionAnimation];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebViewImpl::didChangeContentSize(CGSize newSize)
+{
+ [m_view _didChangeContentSize:NSSizeFromCGSize(newSize)];
+}
+
</ins><span class="cx"> void WebViewImpl::setIgnoresNonWheelEvents(bool ignoresNonWheelEvents)
</span><span class="cx"> {
</span><span class="cx"> if (m_ignoresNonWheelEvents == ignoresNonWheelEvents)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_ignoresNonWheelEvents = ignoresNonWheelEvents;
</span><del>- m_page.setShouldDispatchFakeMouseMoveEvents(!ignoresNonWheelEvents);
</del><ins>+ m_page->setShouldDispatchFakeMouseMoveEvents(!ignoresNonWheelEvents);
</ins><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> if (ignoresNonWheelEvents)
</span><span class="lines">@@ -2294,7 +2340,7 @@
</span><span class="cx"> // away, that information is not present in WebProcess
</span><span class="cx"> pid_t pid = 0;
</span><span class="cx"> if (registerProcess)
</span><del>- pid = m_page.process().processIdentifier();
</del><ins>+ pid = m_page->process().processIdentifier();
</ins><span class="cx"> else if (!registerProcess) {
</span><span class="cx"> pid = WKAXRemoteProcessIdentifier(m_remoteAccessibilityChild.get());
</span><span class="cx"> m_remoteAccessibilityChild = nil;
</span><span class="lines">@@ -2310,7 +2356,7 @@
</span><span class="cx"> NSData *remoteWindowToken = WKAXRemoteTokenForElement(m_view.window);
</span><span class="cx"> IPC::DataReference elementToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteElementToken bytes]), [remoteElementToken length]);
</span><span class="cx"> IPC::DataReference windowToken = IPC::DataReference(reinterpret_cast<const uint8_t*>([remoteWindowToken bytes]), [remoteWindowToken length]);
</span><del>- m_page.registerUIProcessAccessibilityTokens(elementToken, windowToken);
</del><ins>+ m_page->registerUIProcessAccessibilityTokens(elementToken, windowToken);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> id WebViewImpl::accessibilityFocusedUIElement()
</span><span class="lines">@@ -2462,7 +2508,7 @@
</span><span class="cx">
</span><span class="cx"> NSString *WebViewImpl::stringForToolTip(NSToolTipTag tag)
</span><span class="cx"> {
</span><del>- return nsStringFromWebCoreString(m_page.toolTip());
</del><ins>+ return nsStringFromWebCoreString(m_page->toolTip());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip)
</span><span class="lines">@@ -2560,7 +2606,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_inspectorAttachmentView = newView;
</span><del>- m_page.inspector()->attachmentViewDidChange(oldView ? oldView : m_view, newView ? newView : m_view);
</del><ins>+ m_page->inspector()->attachmentViewDidChange(oldView ? oldView : m_view, newView ? newView : m_view);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSView *WebViewImpl::inspectorAttachmentView()
</span><span class="lines">@@ -2573,26 +2619,16 @@
</span><span class="cx"> {
</span><span class="cx"> if (!m_remoteObjectRegistry) {
</span><span class="cx"> m_remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:m_page]);
</span><del>- m_page.process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page.pageID(), [m_remoteObjectRegistry remoteObjectRegistry]);
</del><ins>+ m_page->process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page->pageID(), [m_remoteObjectRegistry remoteObjectRegistry]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return m_remoteObjectRegistry.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebViewImpl::destroyRemoteObjectRegistry()
-{
- if (!m_remoteObjectRegistry)
- return;
-
- m_page.process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_page.pageID());
- [m_remoteObjectRegistry _invalidate];
- m_remoteObjectRegistry = nil;
-}
-
</del><span class="cx"> WKBrowsingContextController *WebViewImpl::browsingContextController()
</span><span class="cx"> {
</span><span class="cx"> if (!m_browsingContextController)
</span><del>- m_browsingContextController = adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:toAPI(&m_page)]);
</del><ins>+ m_browsingContextController = adoptNS([[WKBrowsingContextController alloc] _initWithPageRef:toAPI(m_page.ptr())]);
</ins><span class="cx">
</span><span class="cx"> return m_browsingContextController.get();
</span><span class="cx"> }
</span><span class="lines">@@ -2610,7 +2646,7 @@
</span><span class="cx"> // Prevent queued mouseDragged events from coming after the drag and fake mouseUp event.
</span><span class="cx"> m_ignoresMouseDraggedEvents = true;
</span><span class="cx">
</span><del>- m_page.dragEnded(WebCore::IntPoint(windowMouseLoc), WebCore::globalPoint(windowMouseLoc, m_view.window), operation);
</del><ins>+ m_page->dragEnded(WebCore::IntPoint(windowMouseLoc), WebCore::globalPoint(windowMouseLoc, m_view.window), operation);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static WebCore::DragApplicationFlags applicationFlagsForDrag(NSView *view, id <NSDraggingInfo> draggingInfo)
</span><span class="lines">@@ -2634,8 +2670,8 @@
</span><span class="cx"> WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
</span><span class="cx"> WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
</span><span class="cx">
</span><del>- m_page.resetCurrentDragInformation();
- m_page.dragEntered(dragData, draggingInfo.draggingPasteboard.name);
</del><ins>+ m_page->resetCurrentDragInformation();
+ m_page->dragEntered(dragData, draggingInfo.draggingPasteboard.name);
</ins><span class="cx"> return NSDragOperationCopy;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2644,11 +2680,11 @@
</span><span class="cx"> WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
</span><span class="cx"> WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
</span><span class="cx"> WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
</span><del>- m_page.dragUpdated(dragData, draggingInfo.draggingPasteboard.name);
</del><ins>+ m_page->dragUpdated(dragData, draggingInfo.draggingPasteboard.name);
</ins><span class="cx">
</span><del>- NSInteger numberOfValidItemsForDrop = m_page.currentDragNumberOfFilesToBeAccepted();
</del><ins>+ NSInteger numberOfValidItemsForDrop = m_page->currentDragNumberOfFilesToBeAccepted();
</ins><span class="cx"> NSDraggingFormation draggingFormation = NSDraggingFormationNone;
</span><del>- if (m_page.currentDragIsOverFileInput() && numberOfValidItemsForDrop > 0)
</del><ins>+ if (m_page->currentDragIsOverFileInput() && numberOfValidItemsForDrop > 0)
</ins><span class="cx"> draggingFormation = NSDraggingFormationList;
</span><span class="cx">
</span><span class="cx"> if (draggingInfo.numberOfValidItemsForDrop != numberOfValidItemsForDrop)
</span><span class="lines">@@ -2656,7 +2692,7 @@
</span><span class="cx"> if (draggingInfo.draggingFormation != draggingFormation)
</span><span class="cx"> [draggingInfo setDraggingFormation:draggingFormation];
</span><span class="cx">
</span><del>- return m_page.currentDragOperation();
</del><ins>+ return m_page->currentDragOperation();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::draggingExited(id <NSDraggingInfo> draggingInfo)
</span><span class="lines">@@ -2664,8 +2700,8 @@
</span><span class="cx"> WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
</span><span class="cx"> WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
</span><span class="cx"> WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
</span><del>- m_page.dragExited(dragData, draggingInfo.draggingPasteboard.name);
- m_page.resetCurrentDragInformation();
</del><ins>+ m_page->dragExited(dragData, draggingInfo.draggingPasteboard.name);
+ m_page->resetCurrentDragInformation();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebViewImpl::prepareForDragOperation(id <NSDraggingInfo>)
</span><span class="lines">@@ -2723,12 +2759,12 @@
</span><span class="cx"> SandboxExtension::Handle sandboxExtensionHandle;
</span><span class="cx"> bool createdExtension = maybeCreateSandboxExtensionFromPasteboard(draggingInfo.draggingPasteboard, sandboxExtensionHandle);
</span><span class="cx"> if (createdExtension)
</span><del>- m_page.process().willAcquireUniversalFileReadSandboxExtension();
</del><ins>+ m_page->process().willAcquireUniversalFileReadSandboxExtension();
</ins><span class="cx">
</span><span class="cx"> SandboxExtension::HandleArray sandboxExtensionForUpload;
</span><span class="cx"> createSandboxExtensionsForFileUpload(draggingInfo.draggingPasteboard, sandboxExtensionForUpload);
</span><span class="cx">
</span><del>- m_page.performDragOperation(dragData, draggingInfo.draggingPasteboard.name, sandboxExtensionHandle, sandboxExtensionForUpload);
</del><ins>+ m_page->performDragOperation(dragData, draggingInfo.draggingPasteboard.name, sandboxExtensionHandle, sandboxExtensionForUpload);
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -2959,7 +2995,7 @@
</span><span class="cx"> windowCaptureRect = boundsForCustomSwipeViews;
</span><span class="cx"> else {
</span><span class="cx"> NSRect unobscuredBounds = m_view.bounds;
</span><del>- float topContentInset = m_page.topContentInset();
</del><ins>+ float topContentInset = m_page->topContentInset();
</ins><span class="cx"> unobscuredBounds.origin.y += topContentInset;
</span><span class="cx"> unobscuredBounds.size.height -= topContentInset;
</span><span class="cx"> windowCaptureRect = [m_view convertRect:unobscuredBounds toView:nil];
</span><span class="lines">@@ -2984,12 +3020,12 @@
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::saveBackForwardSnapshotForCurrentItem()
</span><span class="cx"> {
</span><del>- m_page.recordNavigationSnapshot();
</del><ins>+ m_page->recordNavigationSnapshot();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::saveBackForwardSnapshotForItem(WebBackForwardListItem& item)
</span><span class="cx"> {
</span><del>- m_page.recordNavigationSnapshot(item);
</del><ins>+ m_page->recordNavigationSnapshot(item);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ViewGestureController& WebViewImpl::ensureGestureController()
</span><span class="lines">@@ -3002,8 +3038,8 @@
</span><span class="cx"> void WebViewImpl::setAllowsBackForwardNavigationGestures(bool allowsBackForwardNavigationGestures)
</span><span class="cx"> {
</span><span class="cx"> m_allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures;
</span><del>- m_page.setShouldRecordNavigationSnapshots(allowsBackForwardNavigationGestures);
- m_page.setShouldUseImplicitRubberBandControl(allowsBackForwardNavigationGestures);
</del><ins>+ m_page->setShouldRecordNavigationSnapshots(allowsBackForwardNavigationGestures);
+ m_page->setShouldUseImplicitRubberBandControl(allowsBackForwardNavigationGestures);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setAllowsMagnification(bool allowsMagnification)
</span><span class="lines">@@ -3018,7 +3054,7 @@
</span><span class="cx">
</span><span class="cx"> dismissContentRelativeChildWindowsWithAnimation(false);
</span><span class="cx">
</span><del>- m_page.scalePageInViewCoordinates(magnification, WebCore::roundedIntPoint(centerPoint));
</del><ins>+ m_page->scalePageInViewCoordinates(magnification, WebCore::roundedIntPoint(centerPoint));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setMagnification(double magnification)
</span><span class="lines">@@ -3029,14 +3065,14 @@
</span><span class="cx"> dismissContentRelativeChildWindowsWithAnimation(false);
</span><span class="cx">
</span><span class="cx"> WebCore::FloatPoint viewCenter(NSMidX([m_view bounds]), NSMidY([m_view bounds]));
</span><del>- m_page.scalePageInViewCoordinates(magnification, roundedIntPoint(viewCenter));
</del><ins>+ m_page->scalePageInViewCoordinates(magnification, roundedIntPoint(viewCenter));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double WebViewImpl::magnification() const
</span><span class="cx"> {
</span><span class="cx"> if (m_gestureController)
</span><span class="cx"> return m_gestureController->magnification();
</span><del>- return m_page.pageScaleFactor();
</del><ins>+ return m_page->pageScaleFactor();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setCustomSwipeViews(NSArray *customSwipeViews)
</span><span class="lines">@@ -3094,7 +3130,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> NativeWebWheelEvent webEvent = NativeWebWheelEvent(event, m_view);
</span><del>- m_page.handleWheelEvent(webEvent);
</del><ins>+ m_page->handleWheelEvent(webEvent);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::swipeWithEvent(NSEvent *event)
</span><span class="lines">@@ -3108,9 +3144,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (event.deltaX > 0.0)
</span><del>- m_page.goBack();
</del><ins>+ m_page->goBack();
</ins><span class="cx"> else if (event.deltaX < 0.0)
</span><del>- m_page.goForward();
</del><ins>+ m_page->goForward();
</ins><span class="cx"> else
</span><span class="cx"> [m_view _superSwipeWithEvent:event];
</span><span class="cx"> }
</span><span class="lines">@@ -3120,7 +3156,7 @@
</span><span class="cx"> if (!m_allowsMagnification) {
</span><span class="cx"> #if ENABLE(MAC_GESTURE_EVENTS)
</span><span class="cx"> NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, m_view);
</span><del>- m_page.handleGestureEvent(webEvent);
</del><ins>+ m_page->handleGestureEvent(webEvent);
</ins><span class="cx"> #endif
</span><span class="cx"> [m_view _superMagnifyWithEvent:event];
</span><span class="cx"> return;
</span><span class="lines">@@ -3137,7 +3173,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, m_view);
</span><del>- m_page.handleGestureEvent(webEvent);
</del><ins>+ m_page->handleGestureEvent(webEvent);
</ins><span class="cx"> #else
</span><span class="cx"> gestureController.handleMagnificationGestureEvent(event, [m_view convertPoint:event.locationInWindow fromView:nil]);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3169,7 +3205,7 @@
</span><span class="cx"> void WebViewImpl::rotateWithEvent(NSEvent *event)
</span><span class="cx"> {
</span><span class="cx"> NativeWebGestureEvent webEvent = NativeWebGestureEvent(event, m_view);
</span><del>- m_page.handleGestureEvent(webEvent);
</del><ins>+ m_page->handleGestureEvent(webEvent);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -3320,7 +3356,7 @@
</span><span class="cx"> WebCore::KeypressCommand command(NSStringFromSelector(selector));
</span><span class="cx"> keypressCommands->append(command);
</span><span class="cx"> LOG(TextInput, "...stored");
</span><del>- m_page.registerKeypressCommandName(command.commandName);
</del><ins>+ m_page->registerKeypressCommandName(command.commandName);
</ins><span class="cx"> } else {
</span><span class="cx"> // FIXME: Send the command to Editor synchronously and only send it along the
</span><span class="cx"> // responder chain if it's a selector that does not correspond to an editing command.
</span><span class="lines">@@ -3373,16 +3409,16 @@
</span><span class="cx"> WebCore::KeypressCommand command("insertText:", text);
</span><span class="cx"> keypressCommands->append(command);
</span><span class="cx"> LOG(TextInput, "...stored");
</span><del>- m_page.registerKeypressCommandName(command.commandName);
</del><ins>+ m_page->registerKeypressCommandName(command.commandName);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String eventText = text;
</span><span class="cx"> eventText.replace(NSBackTabCharacter, NSTabCharacter); // same thing is done in KeyEventMac.mm in WebCore
</span><span class="cx"> if (!dictationAlternatives.isEmpty())
</span><del>- m_page.insertDictatedTextAsync(eventText, replacementRange, dictationAlternatives, registerUndoGroup);
</del><ins>+ m_page->insertDictatedTextAsync(eventText, replacementRange, dictationAlternatives, registerUndoGroup);
</ins><span class="cx"> else
</span><del>- m_page.insertTextAsync(eventText, replacementRange, registerUndoGroup);
</del><ins>+ m_page->insertTextAsync(eventText, replacementRange, registerUndoGroup);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::selectedRangeWithCompletionHandler(void(^completionHandlerPtr)(NSRange selectedRange))
</span><span class="lines">@@ -3390,7 +3426,7 @@
</span><span class="cx"> auto completionHandler = adoptNS([completionHandlerPtr copy]);
</span><span class="cx">
</span><span class="cx"> LOG(TextInput, "selectedRange");
</span><del>- m_page.getSelectedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->getSelectedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> void (^completionHandlerBlock)(NSRange) = (void (^)(NSRange))completionHandler.get();
</span><span class="cx"> if (error != WebKit::CallbackBase::Error::None) {
</span><span class="cx"> LOG(TextInput, " ...selectedRange failed.");
</span><span class="lines">@@ -3411,7 +3447,7 @@
</span><span class="cx"> auto completionHandler = adoptNS([completionHandlerPtr copy]);
</span><span class="cx">
</span><span class="cx"> LOG(TextInput, "markedRange");
</span><del>- m_page.getMarkedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->getMarkedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> void (^completionHandlerBlock)(NSRange) = (void (^)(NSRange))completionHandler.get();
</span><span class="cx"> if (error != WebKit::CallbackBase::Error::None) {
</span><span class="cx"> LOG(TextInput, " ...markedRange failed.");
</span><span class="lines">@@ -3432,7 +3468,7 @@
</span><span class="cx"> auto completionHandler = adoptNS([completionHandlerPtr copy]);
</span><span class="cx">
</span><span class="cx"> LOG(TextInput, "hasMarkedText");
</span><del>- m_page.getMarkedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->getMarkedRangeAsync([completionHandler](const EditingRange& editingRangeResult, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> void (^completionHandlerBlock)(BOOL) = (void (^)(BOOL))completionHandler.get();
</span><span class="cx"> if (error != WebKit::CallbackBase::Error::None) {
</span><span class="cx"> LOG(TextInput, " ...hasMarkedText failed.");
</span><span class="lines">@@ -3450,7 +3486,7 @@
</span><span class="cx"> auto completionHandler = adoptNS([completionHandlerPtr copy]);
</span><span class="cx">
</span><span class="cx"> LOG(TextInput, "attributedSubstringFromRange:(%u, %u)", proposedRange.location, proposedRange.length);
</span><del>- m_page.attributedSubstringForCharacterRangeAsync(proposedRange, [completionHandler](const AttributedString& string, const EditingRange& actualRange, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->attributedSubstringForCharacterRangeAsync(proposedRange, [completionHandler](const AttributedString& string, const EditingRange& actualRange, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> void (^completionHandlerBlock)(NSAttributedString *, NSRange) = (void (^)(NSAttributedString *, NSRange))completionHandler.get();
</span><span class="cx"> if (error != WebKit::CallbackBase::Error::None) {
</span><span class="cx"> LOG(TextInput, " ...attributedSubstringFromRange failed.");
</span><span class="lines">@@ -3481,7 +3517,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto weakThis = createWeakPtr();
</span><del>- m_page.firstRectForCharacterRangeAsync(range, [weakThis, completionHandler](const WebCore::IntRect& rect, const EditingRange& actualRange, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->firstRectForCharacterRangeAsync(range, [weakThis, completionHandler](const WebCore::IntRect& rect, const EditingRange& actualRange, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> if (!weakThis)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -3515,7 +3551,7 @@
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> point = [m_view convertPoint:point fromView:nil]; // the point is relative to the main frame
</span><span class="cx">
</span><del>- m_page.characterIndexForPointAsync(WebCore::IntPoint(point), [completionHandler](uint64_t result, WebKit::CallbackBase::Error error) {
</del><ins>+ m_page->characterIndexForPointAsync(WebCore::IntPoint(point), [completionHandler](uint64_t result, WebKit::CallbackBase::Error error) {
</ins><span class="cx"> void (^completionHandlerBlock)(NSUInteger) = (void (^)(NSUInteger))completionHandler.get();
</span><span class="cx"> if (error != WebKit::CallbackBase::Error::None) {
</span><span class="cx"> LOG(TextInput, " ...characterIndexForPoint failed.");
</span><span class="lines">@@ -3537,7 +3573,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Disable text input machinery when in non-editable content. An invisible inline input area affects performance, and can prevent Expose from working.
</span><del>- if (!m_page.editorState().isContentEditable)
</del><ins>+ if (!m_page->editorState().isContentEditable)
</ins><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> return [m_view _superInputContext];
</span><span class="lines">@@ -3547,7 +3583,7 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(TextInput, "unmarkText");
</span><span class="cx">
</span><del>- m_page.confirmCompositionAsync();
</del><ins>+ m_page->confirmCompositionAsync();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setMarkedText(id string, NSRange selectedRange, NSRange replacementRange)
</span><span class="lines">@@ -3570,17 +3606,17 @@
</span><span class="cx"> if (inSecureInputState()) {
</span><span class="cx"> // In password fields, we only allow ASCII dead keys, and don't allow inline input, matching NSSecureTextInputField.
</span><span class="cx"> // Allowing ASCII dead keys is necessary to enable full Roman input when using a Vietnamese keyboard.
</span><del>- ASSERT(!m_page.editorState().hasComposition);
</del><ins>+ ASSERT(!m_page->editorState().hasComposition);
</ins><span class="cx"> notifyInputContextAboutDiscardedComposition();
</span><span class="cx"> // FIXME: We should store the command to handle it after DOM event processing, as it's regular keyboard input now, not a composition.
</span><span class="cx"> if ([text length] == 1 && isASCII([text characterAtIndex:0]))
</span><del>- m_page.insertTextAsync(text, replacementRange);
</del><ins>+ m_page->insertTextAsync(text, replacementRange);
</ins><span class="cx"> else
</span><span class="cx"> NSBeep();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.setCompositionAsync(text, underlines, selectedRange, replacementRange);
</del><ins>+ m_page->setCompositionAsync(text, underlines, selectedRange, replacementRange);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Synchronous NSTextInputClient is still implemented to catch spurious sync calls. Remove when that is no longer needed.
</span><span class="lines">@@ -3653,7 +3689,7 @@
</span><span class="cx"> // FIXME: Why is the firstResponder check needed?
</span><span class="cx"> if (m_view == m_view.window.firstResponder) {
</span><span class="cx"> interpretKeyEvent(event, ^(BOOL handledByInputMethod, const Vector<WebCore::KeypressCommand>& commands) {
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> });
</span><span class="cx"> return YES;
</span><span class="cx"> }
</span><span class="lines">@@ -3670,7 +3706,7 @@
</span><span class="cx">
</span><span class="cx"> interpretKeyEvent(event, ^(BOOL handledByInputMethod, const Vector<WebCore::KeypressCommand>& commands) {
</span><span class="cx"> ASSERT(!handledByInputMethod || commands.isEmpty());
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3697,7 +3733,7 @@
</span><span class="cx">
</span><span class="cx"> interpretKeyEvent(event, ^(BOOL handledByInputMethod, const Vector<WebCore::KeypressCommand>& commands) {
</span><span class="cx"> ASSERT(!handledByInputMethod || commands.isEmpty());
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3713,7 +3749,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> interpretKeyEvent(event, ^(BOOL handledByInputMethod, const Vector<WebCore::KeypressCommand>& commands) {
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3769,7 +3805,7 @@
</span><span class="cx"> LOG(TextInput, "Executing %u saved keypress commands...", parameters->commands->size());
</span><span class="cx">
</span><span class="cx"> parameters->executingSavedKeypressCommands = true;
</span><del>- parameters->eventInterpretationHadSideEffects |= m_page.executeKeypressCommands(*parameters->commands);
</del><ins>+ parameters->eventInterpretationHadSideEffects |= m_page->executeKeypressCommands(*parameters->commands);
</ins><span class="cx"> parameters->commands->clear();
</span><span class="cx"> parameters->executingSavedKeypressCommands = false;
</span><span class="cx">
</span><span class="lines">@@ -3785,13 +3821,13 @@
</span><span class="cx"> parameters->consumedByIM = false;
</span><span class="cx">
</span><span class="cx"> // As in insertText:replacementRange:, we assume that the call comes from an input method if there is marked text.
</span><del>- bool isFromInputMethod = m_page.editorState().hasComposition;
</del><ins>+ bool isFromInputMethod = m_page->editorState().hasComposition;
</ins><span class="cx">
</span><span class="cx"> if (parameters && !isFromInputMethod) {
</span><span class="cx"> WebCore::KeypressCommand command(NSStringFromSelector(selector));
</span><span class="cx"> parameters->commands->append(command);
</span><span class="cx"> LOG(TextInput, "...stored");
</span><del>- m_page.registerKeypressCommandName(command.commandName);
</del><ins>+ m_page->registerKeypressCommandName(command.commandName);
</ins><span class="cx"> } else {
</span><span class="cx"> // FIXME: Send the command to Editor synchronously and only send it along the
</span><span class="cx"> // responder chain if it's a selector that does not correspond to an editing command.
</span><span class="lines">@@ -3821,7 +3857,7 @@
</span><span class="cx"> parameters->consumedByIM = false;
</span><span class="cx">
</span><span class="cx"> NSString *text;
</span><del>- bool isFromInputMethod = m_page.editorState().hasComposition;
</del><ins>+ bool isFromInputMethod = m_page->editorState().hasComposition;
</ins><span class="cx">
</span><span class="cx"> Vector<WebCore::TextAlternativeWithRange> dictationAlternatives;
</span><span class="cx">
</span><span class="lines">@@ -3845,7 +3881,7 @@
</span><span class="cx"> ASSERT(replacementRange.location == NSNotFound);
</span><span class="cx"> WebCore::KeypressCommand command("insertText:", text);
</span><span class="cx"> parameters->commands->append(command);
</span><del>- m_page.registerKeypressCommandName(command.commandName);
</del><ins>+ m_page->registerKeypressCommandName(command.commandName);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3853,9 +3889,9 @@
</span><span class="cx"> eventText.replace(NSBackTabCharacter, NSTabCharacter); // same thing is done in KeyEventMac.mm in WebCore
</span><span class="cx"> bool eventHandled;
</span><span class="cx"> if (!dictationAlternatives.isEmpty())
</span><del>- eventHandled = m_page.insertDictatedText(eventText, replacementRange, dictationAlternatives);
</del><ins>+ eventHandled = m_page->insertDictatedText(eventText, replacementRange, dictationAlternatives);
</ins><span class="cx"> else
</span><del>- eventHandled = m_page.insertText(eventText, replacementRange);
</del><ins>+ eventHandled = m_page->insertText(eventText, replacementRange);
</ins><span class="cx">
</span><span class="cx"> if (parameters)
</span><span class="cx"> parameters->eventInterpretationHadSideEffects |= eventHandled;
</span><span class="lines">@@ -3869,7 +3905,7 @@
</span><span class="cx"> return [[WKTextInputWindowController sharedTextInputWindowController] inputContext];
</span><span class="cx">
</span><span class="cx"> // Disable text input machinery when in non-editable content. An invisible inline input area affects performance, and can prevent Expose from working.
</span><del>- if (!m_page.editorState().isContentEditable)
</del><ins>+ if (!m_page->editorState().isContentEditable)
</ins><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> return [m_view _superInputContext];
</span><span class="lines">@@ -3880,7 +3916,7 @@
</span><span class="cx"> executeSavedKeypressCommands();
</span><span class="cx">
</span><span class="cx"> EditingRange selectedRange;
</span><del>- m_page.getSelectedRange(selectedRange);
</del><ins>+ m_page->getSelectedRange(selectedRange);
</ins><span class="cx">
</span><span class="cx"> NSRange result = selectedRange;
</span><span class="cx"> if (result.location == NSNotFound)
</span><span class="lines">@@ -3897,15 +3933,15 @@
</span><span class="cx">
</span><span class="cx"> BOOL result;
</span><span class="cx"> if (parameters) {
</span><del>- result = m_page.editorState().hasComposition;
</del><ins>+ result = m_page->editorState().hasComposition;
</ins><span class="cx"> if (result) {
</span><span class="cx"> // A saved command can confirm a composition, but it cannot start a new one.
</span><span class="cx"> executeSavedKeypressCommands();
</span><del>- result = m_page.editorState().hasComposition;
</del><ins>+ result = m_page->editorState().hasComposition;
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> EditingRange markedRange;
</span><del>- m_page.getMarkedRange(markedRange);
</del><ins>+ m_page->getMarkedRange(markedRange);
</ins><span class="cx"> result = markedRange.location != notFound;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3926,7 +3962,7 @@
</span><span class="cx"> parameters->consumedByIM = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.confirmComposition();
</del><ins>+ m_page->confirmComposition();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setMarkedText(id string, NSRange newSelectedRange, NSRange replacementRange)
</span><span class="lines">@@ -3955,19 +3991,19 @@
</span><span class="cx"> } else
</span><span class="cx"> text = string;
</span><span class="cx">
</span><del>- if (m_page.editorState().isInPasswordField) {
</del><ins>+ if (m_page->editorState().isInPasswordField) {
</ins><span class="cx"> // In password fields, we only allow ASCII dead keys, and don't allow inline input, matching NSSecureTextInputField.
</span><span class="cx"> // Allowing ASCII dead keys is necessary to enable full Roman input when using a Vietnamese keyboard.
</span><del>- ASSERT(!m_page.editorState().hasComposition);
</del><ins>+ ASSERT(!m_page->editorState().hasComposition);
</ins><span class="cx"> notifyInputContextAboutDiscardedComposition();
</span><span class="cx"> if ([text length] == 1 && [[text decomposedStringWithCanonicalMapping] characterAtIndex:0] < 0x80) {
</span><del>- m_page.insertText(text, replacementRange);
</del><ins>+ m_page->insertText(text, replacementRange);
</ins><span class="cx"> } else
</span><span class="cx"> NSBeep();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.setComposition(text, underlines, newSelectedRange, replacementRange);
</del><ins>+ m_page->setComposition(text, underlines, newSelectedRange, replacementRange);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSRange WebViewImpl::markedRange()
</span><span class="lines">@@ -3975,7 +4011,7 @@
</span><span class="cx"> executeSavedKeypressCommands();
</span><span class="cx">
</span><span class="cx"> EditingRange markedRange;
</span><del>- m_page.getMarkedRange(markedRange);
</del><ins>+ m_page->getMarkedRange(markedRange);
</ins><span class="cx">
</span><span class="cx"> NSRange result = markedRange;
</span><span class="cx"> if (result.location == NSNotFound)
</span><span class="lines">@@ -3990,16 +4026,16 @@
</span><span class="cx"> {
</span><span class="cx"> executeSavedKeypressCommands();
</span><span class="cx">
</span><del>- if (!m_page.editorState().isContentEditable) {
</del><ins>+ if (!m_page->editorState().isContentEditable) {
</ins><span class="cx"> LOG(TextInput, "attributedSubstringFromRange:(%u, %u) -> nil", proposedRange.location, proposedRange.length);
</span><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_page.editorState().isInPasswordField)
</del><ins>+ if (m_page->editorState().isInPasswordField)
</ins><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> AttributedString result;
</span><del>- m_page.getAttributedSubstringFromRange(proposedRange, result);
</del><ins>+ m_page->getAttributedSubstringFromRange(proposedRange, result);
</ins><span class="cx">
</span><span class="cx"> if (actualRange) {
</span><span class="cx"> *actualRange = proposedRange;
</span><span class="lines">@@ -4023,7 +4059,7 @@
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> point = [m_view convertPoint:point fromView:nil]; // the point is relative to the main frame
</span><span class="cx">
</span><del>- uint64_t result = m_page.characterIndexForPoint(WebCore::IntPoint(point));
</del><ins>+ uint64_t result = m_page->characterIndexForPoint(WebCore::IntPoint(point));
</ins><span class="cx"> if (result == notFound)
</span><span class="cx"> result = NSNotFound;
</span><span class="cx"> LOG(TextInput, "characterIndexForPoint:(%f, %f) -> %u", point.x, point.y, result);
</span><span class="lines">@@ -4047,7 +4083,7 @@
</span><span class="cx"> return NSZeroRect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- NSRect resultRect = m_page.firstRectForCharacterRange(range);
</del><ins>+ NSRect resultRect = m_page->firstRectForCharacterRange(range);
</ins><span class="cx"> resultRect = [m_view convertRect:resultRect toView:nil];
</span><span class="cx"> resultRect = [m_view.window convertRectToScreen:resultRect];
</span><span class="cx">
</span><span class="lines">@@ -4093,7 +4129,7 @@
</span><span class="cx"> if (m_view == m_view.window.firstResponder) {
</span><span class="cx"> Vector<WebCore::KeypressCommand> commands;
</span><span class="cx"> bool handledByInputMethod = interpretKeyEvent(event, commands);
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4107,7 +4143,7 @@
</span><span class="cx">
</span><span class="cx"> LOG(TextInput, "keyUp:%p %@", event, event);
</span><span class="cx"> // We don't interpret the keyUp event, as this breaks key bindings (see <https://bugs.webkit.org/show_bug.cgi?id=130100>).
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::keyDown(NSEvent *event)
</span><span class="lines">@@ -4145,7 +4181,7 @@
</span><span class="cx"> handledByInputMethod = false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, handledByInputMethod, commands));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::flagsChanged(NSEvent *event)
</span><span class="lines">@@ -4164,7 +4200,7 @@
</span><span class="cx"> if (eventKeyCodeIsZeroOrNumLockOrFn(event))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_page.handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
</del><ins>+ m_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, false, { }));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // USE(ASYNC_NSTEXTINPUTCLIENT)
</span><span class="lines">@@ -4185,13 +4221,13 @@
</span><span class="cx"> LOG(TextInput, "%s was handled by text input context", String(#EventName).substring(0, String(#EventName).find("Internal")).ascii().data()); \
</span><span class="cx"> else { \
</span><span class="cx"> NativeWebMouseEvent webEvent(retainedEvent.get(), weakThis->m_lastPressureEvent.get(), weakThis->m_view); \
</span><del>- weakThis->m_page.handleMouseEvent(webEvent); \
</del><ins>+ weakThis->m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> } \
</span><span class="cx"> }]; \
</span><span class="cx"> return; \
</span><span class="cx"> } \
</span><span class="cx"> NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
</span><del>- m_page.handleMouseEvent(webEvent); \
</del><ins>+ m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> }
</span><span class="cx"> #define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(EventName) \
</span><span class="cx"> void WebViewImpl::EventName(NSEvent *event) \
</span><span class="lines">@@ -4208,13 +4244,13 @@
</span><span class="cx"> LOG(TextInput, "%s was handled by text input context", String(#EventName).substring(0, String(#EventName).find("Internal")).ascii().data()); \
</span><span class="cx"> else { \
</span><span class="cx"> NativeWebMouseEvent webEvent(retainedEvent.get(), weakThis->m_lastPressureEvent.get(), weakThis->m_view); \
</span><del>- weakThis->m_page.handleMouseEvent(webEvent); \
</del><ins>+ weakThis->m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> } \
</span><span class="cx"> }]; \
</span><span class="cx"> return; \
</span><span class="cx"> } \
</span><span class="cx"> NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
</span><del>- m_page.handleMouseEvent(webEvent); \
</del><ins>+ m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #else // USE(ASYNC_NSTEXTINPUTCLIENT)
</span><span class="lines">@@ -4228,7 +4264,7 @@
</span><span class="cx"> return; \
</span><span class="cx"> } \
</span><span class="cx"> NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
</span><del>- m_page.handleMouseEvent(webEvent); \
</del><ins>+ m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> }
</span><span class="cx"> #define NATIVE_MOUSE_EVENT_HANDLER_INTERNAL(EventName) \
</span><span class="cx"> void WebViewImpl::EventName(NSEvent *event) \
</span><span class="lines">@@ -4240,7 +4276,7 @@
</span><span class="cx"> return; \
</span><span class="cx"> } \
</span><span class="cx"> NativeWebMouseEvent webEvent(event, m_lastPressureEvent.get(), m_view); \
</span><del>- m_page.handleMouseEvent(webEvent); \
</del><ins>+ m_page->handleMouseEvent(webEvent); \
</ins><span class="cx"> }
</span><span class="cx"> #endif // USE(ASYNC_NSTEXTINPUTCLIENT)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -986,10 +986,10 @@
</span><span class="cx"> void didSaveToPageCache();
</span><span class="cx">
</span><span class="cx"> void setScrollPinningBehavior(WebCore::ScrollPinningBehavior);
</span><del>- WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
</del><ins>+ WebCore::ScrollPinningBehavior scrollPinningBehavior() const { return m_scrollPinningBehavior; }
</ins><span class="cx">
</span><span class="cx"> void setOverlayScrollbarStyle(WTF::Optional<WebCore::ScrollbarOverlayStyle>);
</span><del>- WTF::Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() { return m_scrollbarOverlayStyle; }
</del><ins>+ WTF::Optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const { return m_scrollbarOverlayStyle; }
</ins><span class="cx">
</span><span class="cx"> bool shouldRecordNavigationSnapshots() const { return m_shouldRecordNavigationSnapshots; }
</span><span class="cx"> void setShouldRecordNavigationSnapshots(bool shouldRecordSnapshots) { m_shouldRecordNavigationSnapshots = shouldRecordSnapshots; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -836,7 +836,7 @@
</span><span class="cx"> return *process;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API::PageConfiguration>&& pageConfiguration)
</del><ins>+Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API::PageConfiguration>&& pageConfiguration)
</ins><span class="cx"> {
</span><span class="cx"> if (!pageConfiguration->pageGroup())
</span><span class="cx"> pageConfiguration->setPageGroup(m_defaultPageGroup.ptr());
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">
</span><span class="cx"> API::WebsiteDataStore* websiteDataStore() const { return m_websiteDataStore.get(); }
</span><span class="cx">
</span><del>- PassRefPtr<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&);
</del><ins>+ Ref<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&);
</ins><span class="cx">
</span><span class="cx"> const String& injectedBundlePath() const { return m_configuration->injectedBundlePath(); }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> public:
</span><del>- PageClientImpl(WKView *, WKWebView *);
</del><ins>+ PageClientImpl(NSView *, WKWebView *);
</ins><span class="cx"> virtual ~PageClientImpl();
</span><span class="cx">
</span><span class="cx"> // FIXME: Eventually WebViewImpl should become the PageClient.
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> virtual _WKRemoteObjectRegistry *remoteObjectRegistry() override;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- WKView *m_wkView;
</del><ins>+ NSView *m_view;
</ins><span class="cx"> WKWebView *m_webView;
</span><span class="cx"> WebViewImpl* m_impl { nullptr };
</span><span class="cx"> #if USE(AUTOCORRECTION_PANEL)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -93,8 +93,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-PageClientImpl::PageClientImpl(WKView* wkView, WKWebView *webView)
- : m_wkView(wkView)
</del><ins>+PageClientImpl::PageClientImpl(NSView* view, WKWebView *webView)
+ : m_view(view)
</ins><span class="cx"> , m_webView(webView)
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx"> , m_alternativeTextUIController(std::make_unique<AlternativeTextUIController>())
</span><span class="lines">@@ -141,27 +141,27 @@
</span><span class="cx">
</span><span class="cx"> IntSize PageClientImpl::viewSize()
</span><span class="cx"> {
</span><del>- return IntSize([m_wkView bounds].size);
</del><ins>+ return IntSize([m_view bounds].size);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSView *PageClientImpl::activeView() const
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED
</span><del>- return m_wkView._thumbnailView ? (NSView *)m_wkView._thumbnailView : (NSView *)m_wkView;
</del><ins>+ return (m_impl && m_impl->thumbnailView()) ? (NSView *)m_impl->thumbnailView() : m_view;
</ins><span class="cx"> #else
</span><del>- return m_wkView;
</del><ins>+ return m_view;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> NSWindow *PageClientImpl::activeWindow() const
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED
</span><del>- if (m_wkView._thumbnailView)
- return m_wkView._thumbnailView.window;
</del><ins>+ if (m_impl && m_impl->thumbnailView())
+ return m_impl->thumbnailView().window;
</ins><span class="cx"> #endif
</span><span class="cx"> if (m_impl && m_impl->targetWindowForMovePreparation())
</span><span class="cx"> return m_impl->targetWindowForMovePreparation();
</span><del>- return m_wkView.window;
</del><ins>+ return m_view.window;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool PageClientImpl::isViewWindowActive()
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::makeFirstResponder()
</span><span class="cx"> {
</span><del>- [[m_wkView window] makeFirstResponder:m_wkView];
</del><ins>+ [[m_view window] makeFirstResponder:m_view];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool PageClientImpl::isViewVisible()
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::didChangeContentSize(const WebCore::IntSize& newSize)
</span><span class="cx"> {
</span><del>- [m_wkView _didChangeContentSize:newSize];
</del><ins>+ m_impl->didChangeContentSize(newSize);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::setCursor(const WebCore::Cursor& cursor)
</span><span class="lines">@@ -297,10 +297,10 @@
</span><span class="cx"> if ([NSApp _cursorRectCursor])
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!m_wkView)
</del><ins>+ if (!m_view)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- NSWindow *window = [m_wkView window];
</del><ins>+ NSWindow *window = [m_view window];
</ins><span class="cx"> if (!window)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx"> #if USE(INSERTION_UNDO_GROUPING)
</span><span class="cx"> void PageClientImpl::registerInsertionUndoGrouping()
</span><span class="cx"> {
</span><del>- registerInsertionUndoGroupingWithUndoManager([m_wkView undoManager]);
</del><ins>+ registerInsertionUndoGroupingWithUndoManager([m_view undoManager]);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -342,12 +342,12 @@
</span><span class="cx">
</span><span class="cx"> bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
</span><span class="cx"> {
</span><del>- return (undoOrRedo == WebPageProxy::Undo) ? [[m_wkView undoManager] canUndo] : [[m_wkView undoManager] canRedo];
</del><ins>+ return (undoOrRedo == WebPageProxy::Undo) ? [[m_view undoManager] canUndo] : [[m_view undoManager] canRedo];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
</span><span class="cx"> {
</span><del>- return (undoOrRedo == WebPageProxy::Undo) ? [[m_wkView undoManager] undo] : [[m_wkView undoManager] redo];
</del><ins>+ return (undoOrRedo == WebPageProxy::Undo) ? [[m_view undoManager] undo] : [[m_view undoManager] redo];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::setDragImage(const IntPoint& clientPosition, PassRefPtr<ShareableBitmap> dragImage, bool isLinkDrag)
</span><span class="lines">@@ -355,16 +355,16 @@
</span><span class="cx"> RetainPtr<CGImageRef> dragCGImage = dragImage->makeCGImage();
</span><span class="cx"> RetainPtr<NSImage> dragNSImage = adoptNS([[NSImage alloc] initWithCGImage:dragCGImage.get() size:dragImage->size()]);
</span><span class="cx"> IntSize size([dragNSImage size]);
</span><del>- size.scale(1.0 / toImpl([m_wkView pageRef])->deviceScaleFactor());
</del><ins>+ size.scale(1.0 / m_impl->page().deviceScaleFactor());
</ins><span class="cx"> [dragNSImage setSize:size];
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> if (m_webView) {
</span><del>- NSPoint webViewPosition = [m_wkView convertPoint:clientPosition toView:m_webView];
</del><ins>+ NSPoint webViewPosition = [m_view convertPoint:clientPosition toView:m_webView];
</ins><span class="cx"> m_impl->dragImageForView(m_webView, dragNSImage.get(), webViewPosition, isLinkDrag);
</span><span class="cx"> } else
</span><span class="cx"> #endif
</span><del>- m_impl->dragImageForView(m_wkView, dragNSImage.get(), clientPosition, isLinkDrag);
</del><ins>+ m_impl->dragImageForView(m_view, dragNSImage.get(), clientPosition, isLinkDrag);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::setPromisedDataForImage(const String& pasteboardName, PassRefPtr<SharedBuffer> imageBuffer, const String& filename, const String& extension, const String& title, const String& url, const String& visibleURL, PassRefPtr<SharedBuffer> archiveBuffer)
</span><span class="lines">@@ -405,30 +405,30 @@
</span><span class="cx">
</span><span class="cx"> FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& rect)
</span><span class="cx"> {
</span><del>- return toDeviceSpace(rect, [m_wkView window]);
</del><ins>+ return toDeviceSpace(rect, [m_view window]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FloatRect PageClientImpl::convertToUserSpace(const FloatRect& rect)
</span><span class="cx"> {
</span><del>- return toUserSpace(rect, [m_wkView window]);
</del><ins>+ return toUserSpace(rect, [m_view window]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
</span><span class="cx"> {
</span><span class="cx"> #pragma clang diagnostic push
</span><span class="cx"> #pragma clang diagnostic ignored "-Wdeprecated-declarations"
</span><del>- NSPoint windowCoord = [[m_wkView window] convertScreenToBase:point];
</del><ins>+ NSPoint windowCoord = [[m_view window] convertScreenToBase:point];
</ins><span class="cx"> #pragma clang diagnostic pop
</span><del>- return IntPoint([m_wkView convertPoint:windowCoord fromView:nil]);
</del><ins>+ return IntPoint([m_view convertPoint:windowCoord fromView:nil]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntRect PageClientImpl::rootViewToScreen(const IntRect& rect)
</span><span class="cx"> {
</span><span class="cx"> NSRect tempRect = rect;
</span><del>- tempRect = [m_wkView convertRect:tempRect toView:nil];
</del><ins>+ tempRect = [m_view convertRect:tempRect toView:nil];
</ins><span class="cx"> #pragma clang diagnostic push
</span><span class="cx"> #pragma clang diagnostic ignored "-Wdeprecated-declarations"
</span><del>- tempRect.origin = [[m_wkView window] convertBaseToScreen:tempRect.origin];
</del><ins>+ tempRect.origin = [[m_view window] convertBaseToScreen:tempRect.origin];
</ins><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> return enclosingIntRect(tempRect);
</span><span class="cx"> }
</span><span class="lines">@@ -440,20 +440,20 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<WebPopupMenuProxy> PageClientImpl::createPopupMenuProxy(WebPageProxy& page)
</span><span class="cx"> {
</span><del>- return WebPopupMenuProxyMac::create(m_wkView, page);
</del><ins>+ return WebPopupMenuProxyMac::create(m_view, page);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx"> std::unique_ptr<WebContextMenuProxy> PageClientImpl::createContextMenuProxy(WebPageProxy& page, const ContextMenuContextData& context, const UserData& userData)
</span><span class="cx"> {
</span><del>- return std::make_unique<WebContextMenuProxyMac>(m_wkView, page, context, userData);
</del><ins>+ return std::make_unique<WebContextMenuProxyMac>(m_view, page, context, userData);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR)
</span><span class="cx"> RefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy* page, const WebCore::Color& initialColor, const WebCore::IntRect& rect)
</span><span class="cx"> {
</span><del>- return WebColorPickerMac::create(page, initialColor, rect, m_wkView);
</del><ins>+ return WebColorPickerMac::create(page, initialColor, rect, m_view);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -531,7 +531,7 @@
</span><span class="cx"> #if ENABLE(MAC_GESTURE_EVENTS)
</span><span class="cx"> void PageClientImpl::gestureEventWasNotHandledByWebCore(const NativeWebGestureEvent& event)
</span><span class="cx"> {
</span><del>- [m_wkView _gestureEventWasNotHandledByWebCore:event.nativeEvent()];
</del><ins>+ m_impl->gestureEventWasNotHandledByWebCore(event.nativeEvent());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -549,14 +549,14 @@
</span><span class="cx"> {
</span><span class="cx"> m_impl->prepareForDictionaryLookup();
</span><span class="cx">
</span><del>- DictionaryLookup::showPopup(dictionaryPopupInfo, m_wkView, [this](TextIndicator& textIndicator) {
</del><ins>+ DictionaryLookup::showPopup(dictionaryPopupInfo, m_view, [this](TextIndicator& textIndicator) {
</ins><span class="cx"> m_impl->setTextIndicator(textIndicator, TextIndicatorWindowLifetime::Permanent);
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::dismissContentRelativeChildWindows(bool withAnimation)
</span><span class="cx"> {
</span><del>- [m_wkView _dismissContentRelativeChildWindowsWithAnimation:withAnimation];
</del><ins>+ m_impl->dismissContentRelativeChildWindowsWithAnimation(withAnimation);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::showCorrectionPanel(AlternativeTextType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
</span><span class="lines">@@ -564,7 +564,7 @@
</span><span class="cx"> #if USE(AUTOCORRECTION_PANEL)
</span><span class="cx"> if (!isViewVisible() || !isViewInWindow())
</span><span class="cx"> return;
</span><del>- m_correctionPanel.show(m_wkView, *m_impl, type, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
</del><ins>+ m_correctionPanel.show(m_view, *m_impl, type, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -587,7 +587,7 @@
</span><span class="cx"> void PageClientImpl::recordAutocorrectionResponse(AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString)
</span><span class="cx"> {
</span><span class="cx"> NSCorrectionResponse response = responseType == AutocorrectionReverted ? NSCorrectionResponseReverted : NSCorrectionResponseEdited;
</span><del>- CorrectionPanel::recordAutocorrectionResponse(m_wkView, m_impl->spellCheckerDocumentTag(), response, replacedString, replacementString);
</del><ins>+ CorrectionPanel::recordAutocorrectionResponse(m_view, m_impl->spellCheckerDocumentTag(), response, replacedString, replacementString);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::recommendedScrollbarStyleDidChange(ScrollbarStyle newStyle)
</span><span class="lines">@@ -599,7 +599,7 @@
</span><span class="cx"> else
</span><span class="cx"> options |= NSTrackingActiveInKeyWindow;
</span><span class="cx">
</span><del>- RetainPtr<NSTrackingArea> trackingArea = adoptNS([[NSTrackingArea alloc] initWithRect:[m_wkView frame] options:options owner:m_wkView userInfo:nil]);
</del><ins>+ RetainPtr<NSTrackingArea> trackingArea = adoptNS([[NSTrackingArea alloc] initWithRect:[m_view frame] options:options owner:m_view userInfo:nil]);
</ins><span class="cx"> m_impl->setPrimaryTrackingArea(trackingArea.get());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -635,7 +635,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!isViewVisible() || !isViewInWindow())
</span><span class="cx"> return;
</span><del>- m_alternativeTextUIController->showAlternatives(m_wkView, boundingBoxOfDictatedText, dictationContext, ^(NSString *acceptedAlternative) {
</del><ins>+ m_alternativeTextUIController->showAlternatives(m_view, boundingBoxOfDictatedText, dictationContext, ^(NSString *acceptedAlternative) {
</ins><span class="cx"> m_impl->handleAcceptedAlternativeText(acceptedAlternative);
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="lines">@@ -783,7 +783,7 @@
</span><span class="cx">
</span><span class="cx"> CGRect PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates(CALayer *layer) const
</span><span class="cx"> {
</span><del>- CALayer *windowContentLayer = static_cast<NSView *>(m_wkView.window.contentView).layer;
</del><ins>+ CALayer *windowContentLayer = static_cast<NSView *>(m_view.window.contentView).layer;
</ins><span class="cx"> ASSERT(windowContentLayer);
</span><span class="cx">
</span><span class="cx"> return [windowContentLayer convertRect:layer.bounds fromLayer:layer];
</span><span class="lines">@@ -802,12 +802,12 @@
</span><span class="cx"> if (m_webView)
</span><span class="cx"> return [m_webView _immediateActionAnimationControllerForHitTestResult:wrapper(*hitTestResult) withType:(_WKImmediateActionType)type userData:(id)(userData.get())];
</span><span class="cx"> #endif
</span><del>- return m_impl->immediateActionAnimationControllerForHitTestResult(toAPI(hitTestResult.get()), type, toAPI(userData.get()));
</del><ins>+ return m_impl->immediateActionAnimationControllerForHitTestResult(hitTestResult.get(), type, userData.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::showPlatformContextMenu(NSMenu *menu, IntPoint location)
</span><span class="cx"> {
</span><del>- [menu popUpMenuPositioningItem:nil atLocation:location inView:m_wkView];
</del><ins>+ [menu popUpMenuPositioningItem:nil atLocation:location inView:m_view];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><span class="lines">@@ -819,12 +819,12 @@
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::refView()
</span><span class="cx"> {
</span><del>- CFRetain(m_wkView);
</del><ins>+ CFRetain(m_view);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::derefView()
</span><span class="cx"> {
</span><del>- CFRelease(m_wkView);
</del><ins>+ CFRelease(m_view);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::startWindowDrag()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebColorPickerMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #if USE(APPKIT)
</span><span class="cx">
</span><span class="cx"> #import "WebColorPicker.h"
</span><del>-#import "WKView.h"
</del><span class="cx"> #import <WebCore/IntRect.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -60,7 +59,7 @@
</span><span class="cx">
</span><span class="cx"> class WebColorPickerMac : public WebColorPicker {
</span><span class="cx"> public:
</span><del>- static Ref<WebColorPickerMac> create(WebColorPicker::Client*, const WebCore::Color&, const WebCore::IntRect&, WKView*);
</del><ins>+ static Ref<WebColorPickerMac> create(WebColorPicker::Client*, const WebCore::Color&, const WebCore::IntRect&, NSView*);
</ins><span class="cx"> ~WebColorPickerMac();
</span><span class="cx">
</span><span class="cx"> virtual void endPicker() override;
</span><span class="lines">@@ -70,7 +69,7 @@
</span><span class="cx"> void didChooseColor(const WebCore::Color&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebColorPickerMac(WebColorPicker::Client*, const WebCore::Color&, const WebCore::IntRect&, WKView*);
</del><ins>+ WebColorPickerMac(WebColorPicker::Client*, const WebCore::Color&, const WebCore::IntRect&, NSView*);
</ins><span class="cx"> RetainPtr<NSObject<WKColorPickerUIMac> > m_colorPickerUI;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebColorPickerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebColorPickerMac.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> WebColorPickerMac *_picker;
</span><span class="cx"> RetainPtr<NSPopoverColorWell> _popoverWell;
</span><span class="cx"> }
</span><del>-- (id)initWithFrame:(const WebCore::IntRect &)rect inView:(WKView *)view;
</del><ins>+- (id)initWithFrame:(const WebCore::IntRect &)rect inView:(NSView *)view;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #else
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-Ref<WebColorPickerMac> WebColorPickerMac::create(WebColorPicker::Client* client, const WebCore::Color& initialColor, const WebCore::IntRect& rect, WKView* view)
</del><ins>+Ref<WebColorPickerMac> WebColorPickerMac::create(WebColorPicker::Client* client, const WebCore::Color& initialColor, const WebCore::IntRect& rect, NSView* view)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new WebColorPickerMac(client, initialColor, rect, view));
</span><span class="cx"> }
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> endPicker();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebColorPickerMac::WebColorPickerMac(WebColorPicker::Client* client, const WebCore::Color& initialColor, const WebCore::IntRect& rect, WKView* view)
</del><ins>+WebColorPickerMac::WebColorPickerMac(WebColorPicker::Client* client, const WebCore::Color& initialColor, const WebCore::IntRect& rect, NSView* view)
</ins><span class="cx"> : WebColorPicker(client)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR_POPOVER)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR_POPOVER)
</span><span class="cx">
</span><span class="cx"> @implementation WKColorPopoverMac
</span><del>-- (id)initWithFrame:(const WebCore::IntRect &)rect inView:(WKView *)view
</del><ins>+- (id)initWithFrame:(const WebCore::IntRect &)rect inView:(NSView *)view
</ins><span class="cx"> {
</span><span class="cx"> if(!(self = [super init]))
</span><span class="cx"> return self;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMenuProxyMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> OBJC_CLASS NSPopUpButtonCell;
</span><ins>+OBJC_CLASS NSView;
</ins><span class="cx"> OBJC_CLASS NSWindow;
</span><del>-OBJC_CLASS WKView;
</del><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">
</span><span class="cx"> class WebContextMenuProxyMac : public WebContextMenuProxy {
</span><span class="cx"> public:
</span><del>- WebContextMenuProxyMac(WKView*, WebPageProxy&, const ContextMenuContextData&, const UserData&);
</del><ins>+ WebContextMenuProxyMac(NSView*, WebPageProxy&, const ContextMenuContextData&, const UserData&);
</ins><span class="cx"> ~WebContextMenuProxyMac();
</span><span class="cx">
</span><span class="cx"> void contextMenuItemSelected(const WebContextMenuItemData&);
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">
</span><span class="cx"> RetainPtr<NSMenu> m_menu;
</span><span class="cx">
</span><del>- WKView* m_webView;
</del><ins>+ NSView* m_webView;
</ins><span class="cx"> WebPageProxy& m_page;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #import "ShareableBitmap.h"
</span><span class="cx"> #import "StringUtilities.h"
</span><span class="cx"> #import "WKSharingServicePickerDelegate.h"
</span><del>-#import "WKView.h"
</del><span class="cx"> #import "WebContextMenuItem.h"
</span><span class="cx"> #import "WebContextMenuItemData.h"
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="lines">@@ -152,7 +151,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-WebContextMenuProxyMac::WebContextMenuProxyMac(WKView* webView, WebPageProxy& page, const ContextMenuContextData& context, const UserData& userData)
</del><ins>+WebContextMenuProxyMac::WebContextMenuProxyMac(NSView* webView, WebPageProxy& page, const ContextMenuContextData& context, const UserData& userData)
</ins><span class="cx"> : WebContextMenuProxy(context, userData)
</span><span class="cx"> , m_webView(webView)
</span><span class="cx"> , m_page(page)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPopupMenuProxyMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.h        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> class WebPopupMenuProxyMac : public WebPopupMenuProxy {
</span><span class="cx"> public:
</span><del>- static Ref<WebPopupMenuProxyMac> create(WKView *webView, WebPopupMenuProxy::Client& client)
</del><ins>+ static Ref<WebPopupMenuProxyMac> create(NSView *webView, WebPopupMenuProxy::Client& client)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new WebPopupMenuProxyMac(webView, client));
</span><span class="cx"> }
</span><span class="lines">@@ -51,12 +51,12 @@
</span><span class="cx"> virtual void cancelTracking() override;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebPopupMenuProxyMac(WKView *, WebPopupMenuProxy::Client&);
</del><ins>+ WebPopupMenuProxyMac(NSView *, WebPopupMenuProxy::Client&);
</ins><span class="cx">
</span><span class="cx"> void populate(const Vector<WebPopupItem>&, NSFont *, WebCore::TextDirection);
</span><span class="cx">
</span><span class="cx"> RetainPtr<NSPopUpButtonCell> m_popup;
</span><del>- WKView *m_webView;
</del><ins>+ NSView *m_webView;
</ins><span class="cx"> bool m_wasCanceled;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPopupMenuProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm (191823 => 191824)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm        2015-10-30 22:35:22 UTC (rev 191823)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPopupMenuProxyMac.mm        2015-10-30 22:48:32 UTC (rev 191824)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import "PageClientImpl.h"
</span><span class="cx"> #import "PlatformPopupMenuData.h"
</span><span class="cx"> #import "StringUtilities.h"
</span><del>-#import "WKView.h"
</del><span class="cx"> #import "WebPopupItem.h"
</span><span class="cx"> #import <WebKitSystemInterface.h>
</span><span class="cx">
</span><span class="lines">@@ -40,7 +39,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-WebPopupMenuProxyMac::WebPopupMenuProxyMac(WKView *webView, WebPopupMenuProxy::Client& client)
</del><ins>+WebPopupMenuProxyMac::WebPopupMenuProxyMac(NSView *webView, WebPopupMenuProxy::Client& client)
</ins><span class="cx"> : WebPopupMenuProxy(client)
</span><span class="cx"> , m_webView(webView)
</span><span class="cx"> , m_wasCanceled(false)
</span></span></pre>
</div>
</div>
</body>
</html>