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

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

Issue 2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T16:27:43 rebase to resolve conflict with DOMSelection in r452402 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 8e933ff8d4ed5ae6b7db52593b869ece872f59d3..052f0448b98d96bf119a7574803cb230dec43f2c 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -465,7 +465,9 @@ static bool setSelectionToDragCaret(LocalFrame* frame,
Range*& range,
const IntPoint& point) {
frame->selection().setSelection(dragCaret);
- if (frame->selection().isNone()) {
+ if (frame->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isNone()) {
// TODO(editing-dev): The use of
// updateStyleAndLayoutIgnorePendingStylesheets
// needs to be audited. See http://crbug.com/590369 for more details.
@@ -480,7 +482,9 @@ static bool setSelectionToDragCaret(LocalFrame* frame,
dragCaret = frame->selection().computeVisibleSelectionInDOMTreeDeprecated();
range = createRange(dragCaret.toNormalizedEphemeralRange());
}
- return !frame->selection().isNone() &&
+ return !frame->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isNone() &&
frame->selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.isContentEditable();
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandlerTest.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698