summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/DragController.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-07-04 15:29:25 +0200
committerLiang Qi <liang.qi@qt.io>2017-07-04 15:30:15 +0200
commitdb2ecc45564609f940ff564e777f76a1a4b734d4 (patch)
treed4756dffb486a2a1c64f13402bafd0327b7ddbb3 /Source/WebCore/page/DragController.cpp
parent8231f9776c2e4028937411bd2a0886aa72c97831 (diff)
parentd10511e0a3f655ab2b1dfebfd9c17ade151a7cfe (diff)
downloadqtwebkit-db2ecc45564609f940ff564e777f76a1a4b734d4.tar.gz
Merge remote-tracking branch 'origin/5.212' into dev
Change-Id: I006cd9023fadc5407bbaa2ddfda45cb8e88b548b
Diffstat (limited to 'Source/WebCore/page/DragController.cpp')
-rw-r--r--Source/WebCore/page/DragController.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/page/DragController.cpp b/Source/WebCore/page/DragController.cpp
index c4cbb67ef..7a874db56 100644
--- a/Source/WebCore/page/DragController.cpp
+++ b/Source/WebCore/page/DragController.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009, 2010, 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009-2010, 2013, 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
@@ -432,6 +432,7 @@ DragOperation DragController::operationForLoad(DragData& dragData)
static bool setSelectionToDragCaret(Frame* frame, VisibleSelection& dragCaret, RefPtr<Range>& range, const IntPoint& point)
{
+ Ref<Frame> protector(*frame);
frame->selection().setSelection(dragCaret);
if (frame->selection().selection().isNone()) {
dragCaret = frame->visiblePositionForPoint(point);
@@ -752,6 +753,7 @@ bool DragController::startDrag(Frame& src, const DragState& state, DragOperation
if (!src.view() || !src.contentRenderer() || !state.source)
return false;
+ Ref<Frame> protector(src);
HitTestResult hitTestResult = src.eventHandler().hitTestResultAtPoint(dragOrigin, HitTestRequest::ReadOnly | HitTestRequest::Active);
// FIXME(136836): Investigate whether all elements should use the containsIncludingShadowDOM() path here.