Changeset 159889 in webkit
- Timestamp:
- Nov 30, 2013 11:14:13 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r159888 r159889 1 2013-11-30 Sam Weinig <sam@webkit.org> 2 3 [CTTE] WebPageProxy should store the PageClient as a reference 4 https://bugs.webkit.org/show_bug.cgi?id=125030 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 9 (webkitWebViewBaseCreateWebPage): 10 * UIProcess/API/ios/WKContentView.mm: 11 (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): 12 * UIProcess/API/mac/WKView.mm: 13 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 14 * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: 15 (WebKit::WebPageProxy::didFindZoomableArea): 16 * UIProcess/CoordinatedGraphics/WebView.cpp: 17 (WebKit::WebView::WebView): 18 * UIProcess/WebContext.cpp: 19 (WebKit::WebContext::createWebPage): 20 * UIProcess/WebContext.h: 21 * UIProcess/WebPageProxy.cpp: 22 (WebKit::WebPageProxy::create): 23 (WebKit::WebPageProxy::WebPageProxy): 24 (WebKit::WebPageProxy::reattachToWebProcess): 25 (WebKit::WebPageProxy::initializeWebPage): 26 (WebKit::WebPageProxy::close): 27 (WebKit::WebPageProxy::setViewNeedsDisplay): 28 (WebKit::WebPageProxy::displayView): 29 (WebKit::WebPageProxy::canScrollView): 30 (WebKit::WebPageProxy::scrollView): 31 (WebKit::WebPageProxy::updateViewState): 32 (WebKit::WebPageProxy::viewStateDidChange): 33 (WebKit::WebPageProxy::viewSize): 34 (WebKit::WebPageProxy::startDrag): 35 (WebKit::WebPageProxy::handleTouchEvent): 36 (WebKit::WebPageProxy::preferencesDidChange): 37 (WebKit::WebPageProxy::didCommitLoadForFrame): 38 (WebKit::WebPageProxy::closePage): 39 (WebKit::WebPageProxy::setWindowFrame): 40 (WebKit::WebPageProxy::getWindowFrame): 41 (WebKit::WebPageProxy::screenToWindow): 42 (WebKit::WebPageProxy::windowToScreen): 43 (WebKit::WebPageProxy::pageDidRequestScroll): 44 (WebKit::WebPageProxy::pageTransitionViewportReady): 45 (WebKit::WebPageProxy::didRenderFrame): 46 (WebKit::WebPageProxy::didChangeViewportProperties): 47 (WebKit::WebPageProxy::handleDownloadRequest): 48 (WebKit::WebPageProxy::didChangeContentSize): 49 (WebKit::WebPageProxy::showColorPicker): 50 (WebKit::WebPageProxy::editorStateChanged): 51 (WebKit::WebPageProxy::canUndoRedo): 52 (WebKit::WebPageProxy::executeUndoRedo): 53 (WebKit::WebPageProxy::clearAllEditCommands): 54 (WebKit::WebPageProxy::setFindIndicator): 55 (WebKit::WebPageProxy::showPopupMenu): 56 (WebKit::WebPageProxy::internalShowContextMenu): 57 (WebKit::WebPageProxy::registerEditCommand): 58 (WebKit::WebPageProxy::setToolTip): 59 (WebKit::WebPageProxy::setCursor): 60 (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves): 61 (WebKit::WebPageProxy::didReceiveEvent): 62 (WebKit::WebPageProxy::processDidCrash): 63 (WebKit::WebPageProxy::resetStateAfterProcessExited): 64 (WebKit::WebPageProxy::initializeCreationParameters): 65 (WebKit::WebPageProxy::enterAcceleratedCompositingMode): 66 (WebKit::WebPageProxy::exitAcceleratedCompositingMode): 67 (WebKit::WebPageProxy::updateAcceleratedCompositingMode): 68 (WebKit::WebPageProxy::requestGeolocationPermissionForFrame): 69 (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange): 70 (WebKit::WebPageProxy::updateBackingStoreDiscardableState): 71 (WebKit::WebPageProxy::showCorrectionPanel): 72 (WebKit::WebPageProxy::dismissCorrectionPanel): 73 (WebKit::WebPageProxy::dismissCorrectionPanelSoon): 74 (WebKit::WebPageProxy::recordAutocorrectionResponse): 75 (WebKit::WebPageProxy::showDictationAlternativeUI): 76 (WebKit::WebPageProxy::removeDictationAlternatives): 77 (WebKit::WebPageProxy::dictationAlternatives): 78 * UIProcess/WebPageProxy.h: 79 * UIProcess/WebProcessProxy.cpp: 80 (WebKit::WebProcessProxy::createWebPage): 81 * UIProcess/WebProcessProxy.h: 82 * UIProcess/gtk/WebPageProxyGtk.cpp: 83 (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): 84 * UIProcess/ios/WebPageProxyIOS.mm: 85 (WebKit::WebPageProxy::interpretKeyEvent): 86 (WebKit::WebPageProxy::mainDocumentDidReceiveMobileDocType): 87 (WebKit::WebPageProxy::didGetTapHighlightGeometries): 88 (WebKit::WebPageProxy::didChangeViewportArguments): 89 (WebKit::WebPageProxy::startAssistingNode): 90 (WebKit::WebPageProxy::stopAssistingNode): 91 (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer): 92 * UIProcess/mac/WebPageProxyMac.mm: 93 (WebKit::WebPageProxy::windowAndViewFramesChanged): 94 (WebKit::WebPageProxy::insertDictatedText): 95 (WebKit::WebPageProxy::setDragImage): 96 (WebKit::WebPageProxy::setPromisedData): 97 (WebKit::WebPageProxy::interpretQueuedKeyEvent): 98 (WebKit::WebPageProxy::didPerformDictionaryLookup): 99 (WebKit::WebPageProxy::registerWebProcessAccessibilityToken): 100 (WebKit::WebPageProxy::makeFirstResponder): 101 (WebKit::WebPageProxy::colorSpace): 102 (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged): 103 (WebKit::WebPageProxy::setPluginComplexTextInputState): 104 (WebKit::WebPageProxy::executeSavedCommandBySelector): 105 (WebKit::WebPageProxy::wkView): 106 (WebKit::WebPageProxy::intrinsicContentSizeDidChange): 107 (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer): 108 1 109 2013-11-30 Sam Weinig <sam@webkit.org> 2 110 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r158033 r159889 932 932 WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv; 933 933 934 priv->pageProxy = context->createWebPage( priv->pageClient.get(), pageGroup);934 priv->pageProxy = context->createWebPage(*priv->pageClient, pageGroup); 935 935 priv->pageProxy->initializeWebPage(); 936 936 -
trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm
r159877 r159889 148 148 149 149 _pageClient = std::make_unique<PageClientImpl>(self); 150 _page = toImpl(contextRef)->createWebPage( _pageClient.get(), toImpl(pageGroupRef), toImpl(relatedPage));150 _page = toImpl(contextRef)->createWebPage(*_pageClient, toImpl(pageGroupRef), toImpl(relatedPage)); 151 151 _page->initializeWebPage(); 152 152 _page->setIntrinsicDeviceScaleFactor([UIScreen mainScreen].scale); -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r159877 r159889 2909 2909 2910 2910 _data->_pageClient = std::make_unique<PageClientImpl>(self); 2911 _data->_page = toImpl(contextRef)->createWebPage( _data->_pageClient.get(), toImpl(pageGroupRef), toImpl(relatedPage));2911 _data->_page = toImpl(contextRef)->createWebPage(*_data->_pageClient, toImpl(pageGroupRef), toImpl(relatedPage)); 2912 2912 _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]); 2913 2913 _data->_page->initializeWebPage(); -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp
r152878 r159889 48 48 void WebPageProxy::didFindZoomableArea(const IntPoint& target, const IntRect& area) 49 49 { 50 m_pageClient ->didFindZoomableArea(target, area);50 m_pageClient.didFindZoomableArea(target, area); 51 51 } 52 52 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
r159864 r159889 53 53 { 54 54 // Need to call createWebPage after other data members, specifically m_visible, are initialized. 55 m_page = context->createWebPage( this, pageGroup);55 m_page = context->createWebPage(*this, pageGroup); 56 56 57 57 m_page->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true); -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r159829 r159889 741 741 } 742 742 743 PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient *pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)743 PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage) 744 744 { 745 745 RefPtr<WebProcessProxy> process; -
trunk/Source/WebKit2/UIProcess/WebContext.h
r159829 r159889 159 159 StorageManager& storageManager() const { return *m_storageManager; } 160 160 161 PassRefPtr<WebPageProxy> createWebPage(PageClient *, WebPageGroup*, WebPageProxy* relatedPage = 0);161 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageGroup*, WebPageProxy* relatedPage = 0); 162 162 163 163 const String& injectedBundlePath() const { return m_injectedBundlePath; } -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r159888 r159889 223 223 #endif // !LOG_DISABLED 224 224 225 PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient *pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)225 PassRefPtr<WebPageProxy> WebPageProxy::create(PageClient& pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID) 226 226 { 227 227 return adoptRef(new WebPageProxy(pageClient, process, pageGroup, pageID)); 228 228 } 229 229 230 WebPageProxy::WebPageProxy(PageClient *pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID)230 WebPageProxy::WebPageProxy(PageClient& pageClient, PassRefPtr<WebProcessProxy> process, WebPageGroup* pageGroup, uint64_t pageID) 231 231 : m_pageClient(pageClient) 232 232 , m_process(process) … … 491 491 initializeWebPage(); 492 492 493 m_pageClient ->didRelaunchProcess();493 m_pageClient.didRelaunchProcess(); 494 494 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 495 495 } … … 517 517 m_process->registerNewWebBackForwardListItem(items[i].get()); 518 518 519 m_drawingArea = m_pageClient ->createDrawingAreaProxy();519 m_drawingArea = m_pageClient.createDrawingAreaProxy(); 520 520 ASSERT(m_drawingArea); 521 521 … … 547 547 548 548 m_backForwardList->pageClosed(); 549 m_pageClient ->pageClosed();549 m_pageClient.pageClosed(); 550 550 551 551 m_process->disconnectFramesFromPage(this); … … 911 911 void WebPageProxy::setViewNeedsDisplay(const IntRect& rect) 912 912 { 913 m_pageClient ->setViewNeedsDisplay(rect);913 m_pageClient.setViewNeedsDisplay(rect); 914 914 } 915 915 916 916 void WebPageProxy::displayView() 917 917 { 918 m_pageClient ->displayView();918 m_pageClient.displayView(); 919 919 } 920 920 921 921 bool WebPageProxy::canScrollView() 922 922 { 923 return m_pageClient ->canScrollView();923 return m_pageClient.canScrollView(); 924 924 } 925 925 926 926 void WebPageProxy::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset) 927 927 { 928 m_pageClient ->scrollView(scrollRect, scrollOffset);928 m_pageClient.scrollView(scrollRect, scrollOffset); 929 929 } 930 930 … … 932 932 { 933 933 m_viewState &= ~flagsToUpdate; 934 if (flagsToUpdate & ViewState::WindowIsVisible && m_pageClient ->isWindowVisible())934 if (flagsToUpdate & ViewState::WindowIsVisible && m_pageClient.isWindowVisible()) 935 935 m_viewState |= ViewState::WindowIsVisible; 936 if (flagsToUpdate & ViewState::IsFocused && m_pageClient ->isViewFocused())936 if (flagsToUpdate & ViewState::IsFocused && m_pageClient.isViewFocused()) 937 937 m_viewState |= ViewState::IsFocused; 938 if (flagsToUpdate & ViewState::WindowIsActive && m_pageClient ->isViewWindowActive())938 if (flagsToUpdate & ViewState::WindowIsActive && m_pageClient.isViewWindowActive()) 939 939 m_viewState |= ViewState::WindowIsActive; 940 if (flagsToUpdate & ViewState::IsVisible && m_pageClient ->isViewVisible())940 if (flagsToUpdate & ViewState::IsVisible && m_pageClient.isViewVisible()) 941 941 m_viewState |= ViewState::IsVisible; 942 if (flagsToUpdate & ViewState::IsInWindow && m_pageClient ->isViewInWindow())942 if (flagsToUpdate & ViewState::IsInWindow && m_pageClient.isViewInWindow()) 943 943 m_viewState |= ViewState::IsInWindow; 944 944 } … … 979 979 if (mayHaveChanged & ViewState::IsInWindow) { 980 980 if (m_viewState & ViewState::IsInWindow) { 981 LayerHostingMode layerHostingMode = m_pageClient ->viewLayerHostingMode();981 LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode(); 982 982 if (m_layerHostingMode != layerHostingMode) { 983 983 m_layerHostingMode = layerHostingMode; … … 1016 1016 IntSize WebPageProxy::viewSize() const 1017 1017 { 1018 return m_pageClient ->viewSize();1018 return m_pageClient.viewSize(); 1019 1019 } 1020 1020 … … 1132 1132 } 1133 1133 1134 m_pageClient ->startDrag(dragData, dragImage.release());1134 m_pageClient.startDrag(dragData, dragImage.release()); 1135 1135 } 1136 1136 #endif … … 1377 1377 if (m_touchEventQueue.isEmpty()) { 1378 1378 bool isEventHandled = false; 1379 m_pageClient ->doneWithTouchEvent(event, isEventHandled);1379 m_pageClient.doneWithTouchEvent(event, isEventHandled); 1380 1380 } else { 1381 1381 // We attach the incoming events to the newest queued event so that all … … 2011 2011 m_process->pagePreferencesChanged(this); 2012 2012 2013 m_pageClient ->preferencesDidChange();2013 m_pageClient.preferencesDidChange(); 2014 2014 2015 2015 // FIXME: It probably makes more sense to send individual preference changes. … … 2161 2161 if (frame->isMainFrame()) { 2162 2162 m_pageLoadState.didCommitLoad(); 2163 m_pageClient ->didCommitLoadForMainFrame();2163 m_pageClient.didCommitLoadForMainFrame(); 2164 2164 } 2165 2165 … … 2167 2167 // FIXME (bug 59111): didCommitLoadForFrame comes too late when restoring a page from b/f cache, making us disable secure event mode in password fields. 2168 2168 // FIXME: A load going on in one frame shouldn't affect text editing in other frames on the page. 2169 m_pageClient ->resetSecureInputState();2169 m_pageClient.resetSecureInputState(); 2170 2170 dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored); 2171 m_pageClient ->dismissDictionaryLookupPanel();2171 m_pageClient.dismissDictionaryLookupPanel(); 2172 2172 #endif 2173 2173 … … 2530 2530 m_process->responsivenessTimer()->stop(); 2531 2531 2532 m_pageClient ->clearAllEditCommands();2532 m_pageClient.clearAllEditCommands(); 2533 2533 m_uiClient.close(this); 2534 2534 } … … 2680 2680 void WebPageProxy::setWindowFrame(const FloatRect& newWindowFrame) 2681 2681 { 2682 m_uiClient.setWindowFrame(this, m_pageClient ->convertToDeviceSpace(newWindowFrame));2682 m_uiClient.setWindowFrame(this, m_pageClient.convertToDeviceSpace(newWindowFrame)); 2683 2683 } 2684 2684 2685 2685 void WebPageProxy::getWindowFrame(FloatRect& newWindowFrame) 2686 2686 { 2687 newWindowFrame = m_pageClient ->convertToUserSpace(m_uiClient.windowFrame(this));2687 newWindowFrame = m_pageClient.convertToUserSpace(m_uiClient.windowFrame(this)); 2688 2688 } 2689 2689 2690 2690 void WebPageProxy::screenToWindow(const IntPoint& screenPoint, IntPoint& windowPoint) 2691 2691 { 2692 windowPoint = m_pageClient ->screenToWindow(screenPoint);2692 windowPoint = m_pageClient.screenToWindow(screenPoint); 2693 2693 } 2694 2694 2695 2695 void WebPageProxy::windowToScreen(const IntRect& viewRect, IntRect& result) 2696 2696 { 2697 result = m_pageClient ->windowToScreen(viewRect);2697 result = m_pageClient.windowToScreen(viewRect); 2698 2698 } 2699 2699 … … 2712 2712 void WebPageProxy::pageDidRequestScroll(const IntPoint& point) 2713 2713 { 2714 m_pageClient ->pageDidRequestScroll(point);2714 m_pageClient.pageDidRequestScroll(point); 2715 2715 } 2716 2716 2717 2717 void WebPageProxy::pageTransitionViewportReady() 2718 2718 { 2719 m_pageClient ->pageTransitionViewportReady();2719 m_pageClient.pageTransitionViewportReady(); 2720 2720 } 2721 2721 2722 2722 void WebPageProxy::didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect) 2723 2723 { 2724 m_pageClient ->didRenderFrame(contentsSize, coveredRect);2724 m_pageClient.didRenderFrame(contentsSize, coveredRect); 2725 2725 } 2726 2726 … … 2729 2729 void WebPageProxy::didChangeViewportProperties(const ViewportAttributes& attr) 2730 2730 { 2731 m_pageClient ->didChangeViewportProperties(attr);2731 m_pageClient.didChangeViewportProperties(attr); 2732 2732 } 2733 2733 … … 2808 2808 void WebPageProxy::handleDownloadRequest(DownloadProxy* download) 2809 2809 { 2810 m_pageClient ->handleDownloadRequest(download);2810 m_pageClient.handleDownloadRequest(download); 2811 2811 } 2812 2812 #endif // PLATFORM(EFL) || PLATFORM(GTK) … … 2815 2815 void WebPageProxy::didChangeContentSize(const IntSize& size) 2816 2816 { 2817 m_pageClient ->didChangeContentSize(size);2817 m_pageClient.didChangeContentSize(size); 2818 2818 } 2819 2819 #endif … … 2835 2835 #endif 2836 2836 if (!m_colorPicker) 2837 m_colorPicker = m_pageClient ->createColorPicker(this, initialColor, elementRect);2837 m_colorPicker = m_pageClient.createColorPicker(this, initialColor, elementRect); 2838 2838 m_colorPicker->showColorPicker(initialColor); 2839 2839 } … … 2948 2948 // Selection being none is a temporary state when editing. Flipping secure input state too quickly was causing trouble (not fully understood). 2949 2949 if (couldChangeSecureInputState && !editorState.selectionIsNone) 2950 m_pageClient ->updateSecureInputState();2950 m_pageClient.updateSecureInputState(); 2951 2951 2952 2952 if (editorState.shouldIgnoreCompositionSelectionChange) … … 2954 2954 2955 2955 if (closedComposition) 2956 m_pageClient ->notifyInputContextAboutDiscardedComposition();2956 m_pageClient.notifyInputContextAboutDiscardedComposition(); 2957 2957 if (editorState.hasComposition) { 2958 2958 // Abandon the current inline input session if selection changed for any other reason but an input method changing the composition. 2959 2959 // FIXME: This logic should be in WebCore, no need to round-trip to UI process to cancel the composition. 2960 2960 cancelComposition(); 2961 m_pageClient ->notifyInputContextAboutDiscardedComposition();2961 m_pageClient.notifyInputContextAboutDiscardedComposition(); 2962 2962 } 2963 2963 #if PLATFORM(IOS) 2964 2964 else { 2965 2965 // We need to notify the client on iOS to make sure the selection is redrawn. 2966 m_pageClient ->selectionDidChange();2966 m_pageClient.selectionDidChange(); 2967 2967 } 2968 2968 #endif 2969 2969 #elif PLATFORM(EFL) || PLATFORM(GTK) 2970 m_pageClient ->updateTextInputState();2970 m_pageClient.updateTextInputState(); 2971 2971 #endif 2972 2972 } … … 2981 2981 void WebPageProxy::canUndoRedo(uint32_t action, bool& result) 2982 2982 { 2983 result = m_pageClient ->canUndoRedo(static_cast<UndoOrRedo>(action));2983 result = m_pageClient.canUndoRedo(static_cast<UndoOrRedo>(action)); 2984 2984 } 2985 2985 2986 2986 void WebPageProxy::executeUndoRedo(uint32_t action, bool& result) 2987 2987 { 2988 m_pageClient ->executeUndoRedo(static_cast<UndoOrRedo>(action));2988 m_pageClient.executeUndoRedo(static_cast<UndoOrRedo>(action)); 2989 2989 result = true; 2990 2990 } … … 2992 2992 void WebPageProxy::clearAllEditCommands() 2993 2993 { 2994 m_pageClient ->clearAllEditCommands();2994 m_pageClient.clearAllEditCommands(); 2995 2995 } 2996 2996 … … 3008 3008 { 3009 3009 RefPtr<FindIndicator> findIndicator = FindIndicator::create(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, contentImageScaleFactor, contentImageHandle); 3010 m_pageClient ->setFindIndicator(findIndicator.release(), fadeOut, animate);3010 m_pageClient.setFindIndicator(findIndicator.release(), fadeOut, animate); 3011 3011 } 3012 3012 … … 3078 3078 } 3079 3079 3080 m_activePopupMenu = m_pageClient ->createPopupMenuProxy(this);3080 m_activePopupMenu = m_pageClient.createPopupMenuProxy(this); 3081 3081 3082 3082 if (!m_activePopupMenu) … … 3138 3138 } 3139 3139 3140 m_activeContextMenu = m_pageClient ->createContextMenuProxy(this);3140 m_activeContextMenu = m_pageClient.createContextMenuProxy(this); 3141 3141 if (!m_activeContextMenu) 3142 3142 return; … … 3281 3281 void WebPageProxy::registerEditCommand(PassRefPtr<WebEditCommandProxy> commandProxy, UndoOrRedo undoOrRedo) 3282 3282 { 3283 m_pageClient ->registerEditCommand(commandProxy, undoOrRedo);3283 m_pageClient.registerEditCommand(commandProxy, undoOrRedo); 3284 3284 } 3285 3285 … … 3399 3399 String oldToolTip = m_toolTip; 3400 3400 m_toolTip = toolTip; 3401 m_pageClient ->toolTipChanged(oldToolTip, m_toolTip);3401 m_pageClient.toolTipChanged(oldToolTip, m_toolTip); 3402 3402 } 3403 3403 … … 3406 3406 // The Web process may have asked to change the cursor when the view was in an active window, but 3407 3407 // if it is no longer in a window or the window is not active, then the cursor should not change. 3408 if (m_pageClient ->isViewWindowActive())3409 m_pageClient ->setCursor(cursor);3408 if (m_pageClient.isViewWindowActive()) 3409 m_pageClient.setCursor(cursor); 3410 3410 } 3411 3411 3412 3412 void WebPageProxy::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves) 3413 3413 { 3414 m_pageClient ->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);3414 m_pageClient.setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves); 3415 3415 } 3416 3416 … … 3485 3485 m_process->send(Messages::WebPage::KeyEvent(m_keyEventQueue.first()), m_pageID); 3486 3486 3487 m_pageClient ->doneWithKeyEvent(event, handled);3487 m_pageClient.doneWithKeyEvent(event, handled); 3488 3488 if (handled) 3489 3489 break; … … 3502 3502 m_touchEventQueue.removeFirst(); 3503 3503 3504 m_pageClient ->doneWithTouchEvent(queuedEvents.forwardedEvent, handled);3504 m_pageClient.doneWithTouchEvent(queuedEvents.forwardedEvent, handled); 3505 3505 for (size_t i = 0; i < queuedEvents.deferredTouchEvents.size(); ++i) { 3506 3506 bool isEventHandled = false; 3507 m_pageClient ->doneWithTouchEvent(queuedEvents.deferredTouchEvents.at(i), isEventHandled);3507 m_pageClient.doneWithTouchEvent(queuedEvents.deferredTouchEvents.at(i), isEventHandled); 3508 3508 } 3509 3509 break; … … 3680 3680 m_pageLoadState.reset(); 3681 3681 3682 m_pageClient ->processDidCrash();3682 m_pageClient.processDidCrash(); 3683 3683 m_loaderClient.processDidCrash(this); 3684 3684 } … … 3770 3770 return; 3771 3771 3772 ASSERT(m_pageClient);3773 3772 m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID); 3774 3773 … … 3784 3783 resetState(); 3785 3784 3786 m_pageClient ->clearAllEditCommands();3785 m_pageClient.clearAllEditCommands(); 3787 3786 m_pendingLearnOrIgnoreWordMessageCount = 0; 3788 3787 … … 3808 3807 #if !PLATFORM(IOS) && PLATFORM(MAC) 3809 3808 dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored); 3810 m_pageClient ->dismissDictionaryLookupPanel();3809 m_pageClient.dismissDictionaryLookupPanel(); 3811 3810 #endif 3812 3811 } … … 3814 3813 void WebPageProxy::initializeCreationParameters() 3815 3814 { 3816 m_creationParameters.viewSize = m_pageClient ->viewSize();3815 m_creationParameters.viewSize = m_pageClient.viewSize(); 3817 3816 m_creationParameters.viewState = m_viewState; 3818 3817 m_creationParameters.drawingAreaType = m_drawingArea->type(); … … 3845 3844 m_creationParameters.layerHostingMode = m_layerHostingMode; 3846 3845 #if !PLATFORM(IOS) 3847 m_creationParameters.colorSpace = m_pageClient ->colorSpace();3846 m_creationParameters.colorSpace = m_pageClient.colorSpace(); 3848 3847 #endif // !PLATFORM(IOS) 3849 3848 #endif … … 3853 3852 void WebPageProxy::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext) 3854 3853 { 3855 m_pageClient ->enterAcceleratedCompositingMode(layerTreeContext);3854 m_pageClient.enterAcceleratedCompositingMode(layerTreeContext); 3856 3855 } 3857 3856 3858 3857 void WebPageProxy::exitAcceleratedCompositingMode() 3859 3858 { 3860 m_pageClient ->exitAcceleratedCompositingMode();3859 m_pageClient.exitAcceleratedCompositingMode(); 3861 3860 } 3862 3861 3863 3862 void WebPageProxy::updateAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext) 3864 3863 { 3865 m_pageClient ->updateAcceleratedCompositingMode(layerTreeContext);3864 m_pageClient.updateAcceleratedCompositingMode(layerTreeContext); 3866 3865 } 3867 3866 #endif // USE(ACCELERATED_COMPOSITING) … … 3937 3936 return; 3938 3937 3939 if (m_pageClient ->decidePolicyForGeolocationPermissionRequest(*frame, *origin, *request))3938 if (m_pageClient.decidePolicyForGeolocationPermissionRequest(*frame, *origin, *request)) 3940 3939 return; 3941 3940 … … 4025 4024 { 4026 4025 #if USE(APPKIT) 4027 m_pageClient ->recommendedScrollbarStyleDidChange(newStyle);4026 m_pageClient.recommendedScrollbarStyleDidChange(newStyle); 4028 4027 #else 4029 4028 UNUSED_PARAM(newStyle); … … 4186 4185 isDiscardable = false; 4187 4186 else 4188 isDiscardable = !m_pageClient ->isViewWindowActive() || !isViewVisible();4187 isDiscardable = !m_pageClient.isViewWindowActive() || !isViewVisible(); 4189 4188 4190 4189 m_drawingArea->setBackingStoreIsDiscardable(isDiscardable); … … 4252 4251 void WebPageProxy::showCorrectionPanel(int32_t panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) 4253 4252 { 4254 m_pageClient ->showCorrectionPanel((AlternativeTextType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);4253 m_pageClient.showCorrectionPanel((AlternativeTextType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings); 4255 4254 } 4256 4255 4257 4256 void WebPageProxy::dismissCorrectionPanel(int32_t reason) 4258 4257 { 4259 m_pageClient ->dismissCorrectionPanel((ReasonForDismissingAlternativeText)reason);4258 m_pageClient.dismissCorrectionPanel((ReasonForDismissingAlternativeText)reason); 4260 4259 } 4261 4260 4262 4261 void WebPageProxy::dismissCorrectionPanelSoon(int32_t reason, String& result) 4263 4262 { 4264 result = m_pageClient ->dismissCorrectionPanelSoon((ReasonForDismissingAlternativeText)reason);4263 result = m_pageClient.dismissCorrectionPanelSoon((ReasonForDismissingAlternativeText)reason); 4265 4264 } 4266 4265 4267 4266 void WebPageProxy::recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString) 4268 4267 { 4269 m_pageClient ->recordAutocorrectionResponse((AutocorrectionResponseType)responseType, replacedString, replacementString);4268 m_pageClient.recordAutocorrectionResponse((AutocorrectionResponseType)responseType, replacedString, replacementString); 4270 4269 } 4271 4270 … … 4279 4278 void WebPageProxy::showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext) 4280 4279 { 4281 m_pageClient ->showDictationAlternativeUI(boundingBoxOfDictatedText, dictationContext);4280 m_pageClient.showDictationAlternativeUI(boundingBoxOfDictatedText, dictationContext); 4282 4281 } 4283 4282 4284 4283 void WebPageProxy::removeDictationAlternatives(uint64_t dictationContext) 4285 4284 { 4286 m_pageClient ->removeDictationAlternatives(dictationContext);4285 m_pageClient.removeDictationAlternatives(dictationContext); 4287 4286 } 4288 4287 4289 4288 void WebPageProxy::dictationAlternatives(uint64_t dictationContext, Vector<String>& result) 4290 4289 { 4291 result = m_pageClient ->dictationAlternatives(dictationContext);4290 result = m_pageClient.dictationAlternatives(dictationContext); 4292 4291 } 4293 4292 #endif -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r159765 r159889 323 323 public: 324 324 325 static PassRefPtr<WebPageProxy> create(PageClient *, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);325 static PassRefPtr<WebPageProxy> create(PageClient&, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID); 326 326 virtual ~WebPageProxy(); 327 327 … … 848 848 849 849 private: 850 WebPageProxy(PageClient *, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);850 WebPageProxy(PageClient&, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID); 851 851 void platformInitialize(); 852 852 void initializeCreationParameters(); … … 1139 1139 #endif 1140 1140 1141 PageClient *m_pageClient;1141 PageClient& m_pageClient; 1142 1142 WebLoaderClient m_loaderClient; 1143 1143 WebPolicyClient m_policyClient; -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r159765 r159889 161 161 } 162 162 163 PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient *pageClient, WebContext*, WebPageGroup* pageGroup)163 PassRefPtr<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, WebContext*, WebPageGroup* pageGroup) 164 164 { 165 165 uint64_t pageID = generatePageID(); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r159765 r159889 78 78 79 79 static WebPageProxy* webPage(uint64_t pageID); 80 PassRefPtr<WebPageProxy> createWebPage(PageClient *, WebContext*, WebPageGroup*);80 PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebContext*, WebPageGroup*); 81 81 void addExistingWebPage(WebPageProxy*, uint64_t pageID); 82 82 void removeWebPage(uint64_t pageID); -
trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp
r156973 r159889 58 58 // it will arrive without a GdkEvent associated, so the keyEventQueue will be empty. 59 59 if (!m_keyEventQueue.isEmpty()) 60 m_pageClient ->getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList);60 m_pageClient.getEditorCommandsForKeyEvent(m_keyEventQueue.first(), eventType, commandsList); 61 61 } 62 62 -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r159724 r159889 276 276 { 277 277 m_editorState = state; 278 handled = m_pageClient ->interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);278 handled = m_pageClient.interpretKeyEvent(m_keyEventQueue.first(), isCharEvent); 279 279 } 280 280 … … 357 357 void WebPageProxy::mainDocumentDidReceiveMobileDocType() 358 358 { 359 m_pageClient ->mainDocumentDidReceiveMobileDocType();359 m_pageClient.mainDocumentDidReceiveMobileDocType(); 360 360 } 361 361 362 362 void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) 363 363 { 364 m_pageClient ->didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);364 m_pageClient.didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius); 365 365 } 366 366 367 367 void WebPageProxy::didChangeViewportArguments(const WebCore::ViewportArguments& viewportArguments) 368 368 { 369 m_pageClient ->didChangeViewportArguments(viewportArguments);369 m_pageClient.didChangeViewportArguments(viewportArguments); 370 370 } 371 371 372 372 void WebPageProxy::startAssistingNode(const WebCore::IntRect& scrollRect, bool hasNextFocusable, bool hasPreviousFocusable) 373 373 { 374 m_pageClient ->startAssistingNode(scrollRect, hasNextFocusable, hasPreviousFocusable);374 m_pageClient.startAssistingNode(scrollRect, hasNextFocusable, hasPreviousFocusable); 375 375 } 376 376 377 377 void WebPageProxy::stopAssistingNode() 378 378 { 379 m_pageClient ->stopAssistingNode();379 m_pageClient.stopAssistingNode(); 380 380 } 381 381 … … 402 402 void WebPageProxy::setAcceleratedCompositingRootLayer(PlatformLayer* rootLayer) 403 403 { 404 m_pageClient ->setAcceleratedCompositingRootLayer(rootLayer);404 m_pageClient.setAcceleratedCompositingRootLayer(rootLayer); 405 405 } 406 406 -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r159877 r159889 151 151 // In case the UI client overrides getWindowFrame(), we call it here to make sure we send the appropriate window frame. 152 152 FloatRect windowFrameInScreenCoordinates = m_uiClient.windowFrame(this); 153 FloatRect windowFrameInUnflippedScreenCoordinates = m_pageClient ->convertToUserSpace(windowFrameInScreenCoordinates);153 FloatRect windowFrameInUnflippedScreenCoordinates = m_pageClient.convertToUserSpace(windowFrameInScreenCoordinates); 154 154 155 155 process()->send(Messages::WebPage::WindowAndViewFramesChanged(windowFrameInScreenCoordinates, windowFrameInUnflippedScreenCoordinates, viewFrameInWindowCoordinates, accessibilityViewCoordinates), m_pageID); … … 241 241 for (size_t i = 0; i < dictationAlternativesWithRange.size(); ++i) { 242 242 const TextAlternativeWithRange& alternativeWithRange = dictationAlternativesWithRange[i]; 243 uint64_t dictationContext = m_pageClient ->addDictationAlternatives(alternativeWithRange.alternatives);243 uint64_t dictationContext = m_pageClient.addDictationAlternatives(alternativeWithRange.alternatives); 244 244 if (dictationContext) 245 245 dictationAlternatives.append(DictationAlternative(alternativeWithRange.range.location, alternativeWithRange.range.length, dictationContext)); … … 360 360 return; 361 361 362 m_pageClient ->setDragImage(clientPosition, dragImage.release(), isLinkDrag);362 m_pageClient.setDragImage(clientPosition, dragImage.release(), isLinkDrag); 363 363 } 364 364 … … 374 374 archiveBuffer = SharedBuffer::create(static_cast<unsigned char*>(sharedMemoryArchive->data()), archiveSize); 375 375 } 376 m_pageClient ->setPromisedData(pasteboardName, imageBuffer, filename, extension, title, url, visibleURL, archiveBuffer);376 m_pageClient.setPromisedData(pasteboardName, imageBuffer, filename, extension, title, url, visibleURL, archiveBuffer); 377 377 } 378 378 #endif … … 389 389 { 390 390 m_editorState = state; 391 handled = m_pageClient ->interpretKeyEvent(m_keyEventQueue.first(), commands);391 handled = m_pageClient.interpretKeyEvent(m_keyEventQueue.first(), commands); 392 392 } 393 393 … … 428 428 void WebPageProxy::didPerformDictionaryLookup(const AttributedString& text, const DictionaryPopupInfo& dictionaryPopupInfo) 429 429 { 430 m_pageClient ->didPerformDictionaryLookup(text, dictionaryPopupInfo);430 m_pageClient.didPerformDictionaryLookup(text, dictionaryPopupInfo); 431 431 } 432 432 433 433 void WebPageProxy::registerWebProcessAccessibilityToken(const CoreIPC::DataReference& data) 434 434 { 435 m_pageClient ->accessibilityWebProcessTokenReceived(data);435 m_pageClient.accessibilityWebProcessTokenReceived(data); 436 436 } 437 437 438 438 void WebPageProxy::makeFirstResponder() 439 439 { 440 m_pageClient ->makeFirstResponder();440 m_pageClient.makeFirstResponder(); 441 441 } 442 442 443 443 ColorSpaceData WebPageProxy::colorSpace() 444 444 { 445 return m_pageClient ->colorSpace();445 return m_pageClient.colorSpace(); 446 446 } 447 447 … … 456 456 void WebPageProxy::pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) 457 457 { 458 m_pageClient ->pluginFocusOrWindowFocusChanged(pluginComplexTextInputIdentifier, pluginHasFocusAndWindowHasFocus);458 m_pageClient.pluginFocusOrWindowFocusChanged(pluginComplexTextInputIdentifier, pluginHasFocusAndWindowHasFocus); 459 459 } 460 460 … … 463 463 MESSAGE_CHECK(isValidPluginComplexTextInputState(pluginComplexTextInputState)); 464 464 465 m_pageClient ->setPluginComplexTextInputState(pluginComplexTextInputIdentifier, static_cast<PluginComplexTextInputState>(pluginComplexTextInputState));465 m_pageClient.setPluginComplexTextInputState(pluginComplexTextInputIdentifier, static_cast<PluginComplexTextInputState>(pluginComplexTextInputState)); 466 466 } 467 467 … … 470 470 MESSAGE_CHECK(isValidKeypressCommandName(selector)); 471 471 472 handled = m_pageClient ->executeSavedCommandBySelector(selector);472 handled = m_pageClient.executeSavedCommandBySelector(selector); 473 473 } 474 474 … … 497 497 WKView* WebPageProxy::wkView() const 498 498 { 499 return m_pageClient ->wkView();499 return m_pageClient.wkView(); 500 500 } 501 501 502 502 void WebPageProxy::intrinsicContentSizeDidChange(const IntSize& intrinsicContentSize) 503 503 { 504 m_pageClient ->intrinsicContentSizeDidChange(intrinsicContentSize);504 m_pageClient.intrinsicContentSizeDidChange(intrinsicContentSize); 505 505 } 506 506 507 507 void WebPageProxy::setAcceleratedCompositingRootLayer(PlatformLayer* rootLayer) 508 508 { 509 m_pageClient ->setAcceleratedCompositingRootLayer(rootLayer);509 m_pageClient.setAcceleratedCompositingRootLayer(rootLayer); 510 510 } 511 511
Note: See TracChangeset
for help on using the changeset viewer.