Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1034)

Unified Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 2709793003: Expand FrameSeleciton::base() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T13:08:01 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index 9483dab469c5f2a40082349255947b8dff86d795..313bd9881ee4afa09cec937fce14ed149421d3cf 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -1150,7 +1150,10 @@ bool DragController::startDrag(LocalFrame* src,
// a user can initiate a drag on a link without having any text
// selected. In this case, we should expand the selection to
// the enclosing anchor element
- if (Node* node = enclosingAnchorElement(src->selection().base())) {
+ if (Node* node = enclosingAnchorElement(
+ src->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .base())) {
src->selection().setSelection(
SelectionInDOMTree::Builder().selectAllChildren(*node).build());
}

Powered by Google App Engine
This is Rietveld 408576698