From 5ef7c8a6a70875d4430752d146bdcb069605d71d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 21 Aug 2012 10:57:44 +0200 Subject: Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147) New snapshot including various build fixes for newer Qt 5 --- Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp') diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index 59617dfd3..947a06a43 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -140,6 +140,7 @@ #if ENABLE(WEB_INTENTS) #include "IntentData.h" +#include #endif #if ENABLE(VIBRATION) @@ -432,8 +433,8 @@ PassRefPtr WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* plu bool blocked; if (!WebProcess::shared().connection()->sendSync( - Messages::WebContext::GetPluginPath(parameters.mimeType, parameters.url.string()), - Messages::WebContext::GetPluginPath::Reply(pluginPath, blocked), 0)) { + Messages::WebProcessProxy::GetPluginPath(parameters.mimeType, parameters.url.string()), + Messages::WebProcessProxy::GetPluginPath::Reply(pluginPath, blocked), 0)) { return 0; } @@ -484,7 +485,7 @@ EditorState WebPage::editorState() const size_t location = 0; size_t length = 0; - Element* selectionRoot = frame->selection()->rootEditableElement(); + Element* selectionRoot = frame->selection()->rootEditableElementRespectingShadowTree(); Element* scope = selectionRoot ? selectionRoot : frame->document()->documentElement(); if (!scope) @@ -1114,7 +1115,9 @@ void WebPage::setFixedLayoutSize(const IntSize& size) return; view->setFixedLayoutSize(size); - view->forceLayout(); + // Do not force it until the first layout, this would then become our first layout prematurely. + if (view->didFirstLayout()) + view->forceLayout(); } void WebPage::setPaginationMode(uint32_t mode) @@ -1224,7 +1227,11 @@ PassRefPtr WebPage::scaledSnapshotWithOptions(const IntRect& rect, dou if (options & SnapshotOptionsExcludeSelectionHighlighting) shouldPaintSelection = FrameView::ExcludeSelection; - frameView->paintContentsForSnapshot(graphicsContext.get(), rect, shouldPaintSelection); + FrameView::CoordinateSpaceForSnapshot coordinateSpace = FrameView::DocumentCoordinates; + if (options & SnapshotOptionsInViewCoordinates) + coordinateSpace = FrameView::ViewCoordinates; + + frameView->paintContentsForSnapshot(graphicsContext.get(), rect, shouldPaintSelection, coordinateSpace); return snapshot.release(); } @@ -1959,6 +1966,12 @@ void WebPage::deliverIntentToFrame(uint64_t frameID, const IntentData& intentDat frame->deliverIntent(intentData); } + +void WebPage::deliverCoreIntentToFrame(uint64_t frameID, Intent* coreIntent) +{ + if (WebFrame* frame = WebProcess::shared().webFrame(frameID)) + frame->deliverIntent(coreIntent); +} #endif void WebPage::preferencesDidChange(const WebPreferencesStore& store) -- cgit v1.2.1