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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelection.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/editing/FrameSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.cpp b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
index e63d68bea411ac67e8396e9ed4b85b96bcd9ed8b..e64e78de969f5615c9e4ab38f5702af910c7b31b 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
@@ -829,7 +829,7 @@ static bool isFrameElement(const Node* n) {
}
void FrameSelection::setFocusedNodeIfNeeded() {
- if (isNone() || !isFocused())
+ if (computeVisibleSelectionInDOMTreeDeprecated().isNone() || !isFocused())
return;
if (Element* target =
@@ -1002,7 +1002,8 @@ void FrameSelection::setSelectionFromNone() {
// entire WebView is editable or designMode is on for this document).
Document* document = m_frame->document();
- if (!isNone() || !(blink::hasEditableStyle(*document)))
+ if (!computeVisibleSelectionInDOMTreeDeprecated().isNone() ||
+ !(blink::hasEditableStyle(*document)))
return;
Element* documentElement = document->documentElement();
@@ -1103,7 +1104,7 @@ GranularityStrategy* FrameSelection::granularityStrategy() {
}
void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) {
- if (isNone())
+ if (computeVisibleSelectionInDOMTreeDeprecated().isNone())
return;
VisibleSelection newSelection =
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698