diff options
Diffstat (limited to 'Source/WebKit2/WebProcess')
3 files changed, 11 insertions, 1 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..8b93b2903 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "WebDragClient.h" +#if ENABLE(DRAG_SUPPORT) + #include "DataTransfer.h" #include "DragData.h" #include "GraphicsContext.h" @@ -67,3 +69,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(); |