summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp4
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp5
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp4
-rw-r--r--Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp2
-rw-r--r--Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp2
-rw-r--r--Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h1
-rw-r--r--Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp2
7 files changed, 11 insertions, 9 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
index dcb73b3ff..dde8526fb 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2015-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -114,6 +114,8 @@ PassRefPtr<WebImage> InjectedBundleRangeHandle::renderedImage(SnapshotOptions op
if (!frameView)
return nullptr;
+ Ref<Frame> protector(*frame);
+
VisibleSelection oldSelection = frame->selection().selection();
frame->selection().setSelection(VisibleSelection(*m_range));
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
index 380208a46..27ad4e30a 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp
@@ -26,12 +26,13 @@
#include "config.h"
#include "WebDragClient.h"
+#if ENABLE(DRAG_SUPPORT)
+
#include "DataTransfer.h"
#include "DragData.h"
#include "GraphicsContext.h"
#include "Pasteboard.h"
#include "ShareableBitmap.h"
-#include "WebCoreArgumentCoders.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
@@ -67,3 +68,5 @@ void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosi
}
}
+
+#endif // ENABLE(DRAG_SUPPORT)
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index c8d54d523..6a69492d9 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -4493,6 +4493,8 @@ void WebPage::insertTextAsync(const String& text, const EditingRange& replacemen
{
Frame& frame = m_page->focusController().focusedOrMainFrame();
+ Ref<Frame> protector(frame);
+
if (replacementEditingRange.location != notFound) {
RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange, static_cast<EditingRangeIsRelativeTo>(editingRangeIsRelativeTo));
if (replacementRange)
@@ -4655,6 +4657,8 @@ void WebPage::setComposition(const String& text, const Vector<CompositionUnderli
return;
}
+ Ref<Frame> protector(*targetFrame);
+
if (replacementLength > 0) {
// The layout needs to be uptodate before setting a selection
targetFrame->document()->updateLayout();
diff --git a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
index 899d09a51..5dd083c7c 100644
--- a/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp
@@ -29,11 +29,9 @@
#include "NotImplemented.h"
#include "PopupMenuClient.h"
-#include "WebEditorClient.h"
#include "WebEvent.h"
#include "WebPageProxyMessages.h"
#include "WebPopupMenu.h"
-#include "WebProcess.h"
#include <QClipboard>
#include <QGuiApplication>
#include <WebCore/EventHandler.h>
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
index ae2c96fbb..2ab8adf46 100644
--- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
+++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp
@@ -28,11 +28,9 @@
#include "QtBuiltinBundle.h"
#include "QtBuiltinBundlePage.h"
-#include "WKBundlePage.h"
#include "WKData.h"
#include "WKNumber.h"
#include "WKString.h"
-#include "WKStringQt.h"
#include "WKType.h"
namespace WebKit {
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
index bf4b6c45a..b79ad418b 100644
--- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
+++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.h
@@ -28,7 +28,6 @@
#define QtBuiltinBundle_h
#include "WKBundle.h"
-#include "WKBundlePage.h"
#include <wtf/HashMap.h>
namespace WebKit {
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp b/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp
index fa368a962..92a034e89 100644
--- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp
+++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp
@@ -35,8 +35,6 @@
#include "WKRetainPtr.h"
#include "WKString.h"
#include "WKStringPrivate.h"
-#include "WKStringQt.h"
-#include <JavaScript.h>
#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSRetainPtr.h>
#include <QDebug>