summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebKit2/WebProcess/WebPage/WebPage.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp')
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp23
1 files changed, 18 insertions, 5 deletions
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 <WebCore/Intent.h>
#endif
#if ENABLE(VIBRATION)
@@ -432,8 +433,8 @@ PassRefPtr<Plugin> 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<WebImage> 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)