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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2708703003: Expand FrameSeleciton::isRange() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T23:48:22 rebase 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/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index be8d850597f5e6ab4ef5f7a322931aa523eaa5ea..88d9742d6b0a20624fd5ed11e354f739d06c5463 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -725,7 +725,7 @@ bool SelectionController::handleMousePressEventDoubleClick(
if (event.event().button != WebPointerProperties::Button::Left)
return false;
- if (selection().isRange()) {
+ if (selection().computeVisibleSelectionInDOMTreeDeprecated().isRange()) {
// A double-click when range is already selected
// should not change the selection. So, do not call
// selectClosestWordFromMouseEvent, but do set
@@ -853,7 +853,7 @@ bool SelectionController::handleMouseReleaseEvent(
if (m_mouseDownWasSingleClickInSelection &&
m_selectionState != SelectionState::ExtendedSelection &&
dragStartPos == flooredIntPoint(event.event().positionInRootFrame()) &&
- selection().isRange() &&
+ selection().computeVisibleSelectionInDOMTreeDeprecated().isRange() &&
event.event().button != WebPointerProperties::Button::Right) {
// TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
// needs to be audited. See http://crbug.com/590369 for more details.

Powered by Google App Engine
This is Rietveld 408576698