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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2712223002: Get rid of redundant functions updateIfNeeded() in FrameSelection and SelectionEditor (Closed)
Patch Set: 2017-02-27T11:10:27 Remove updateIfNeeded() from FrameSeleciton.h 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionEditor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index 21ce048ff2a3167b49e90e9835612d993f93580a..4ebc60731de04e8574e5f5c22c8e9e1a906a5f53 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -1884,10 +1884,6 @@ static bool enabledInEditableText(LocalFrame& frame,
Event* event,
EditorCommandSource) {
frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
- // We should update selection to canonicalize with current layout and style,
- // before accessing |FrameSelection::selection()|.
- frame.selection().updateIfNeeded();
return frame.editor().selectionForCommand(event).rootEditableElement();
}
@@ -1910,10 +1906,6 @@ static bool enabledInRichlyEditableText(LocalFrame& frame,
Event*,
EditorCommandSource) {
frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
- // We should update selection to canonicalize with current layout and style,
- // before accessing |FrameSelection::selection()|.
- frame.selection().updateIfNeeded();
return !frame.selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.isNone() &&
@@ -1937,10 +1929,6 @@ static bool enabledRangeInEditableText(LocalFrame& frame,
Event*,
EditorCommandSource) {
frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
- // We should update selection to canonicalize with current layout and style,
- // before accessing |FrameSelection::selection()|.
- frame.selection().updateIfNeeded();
return frame.selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.isRange() &&
@@ -1953,10 +1941,6 @@ static bool enabledRangeInRichlyEditableText(LocalFrame& frame,
Event*,
EditorCommandSource) {
frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
- // We should update selection to canonicalize with current layout and style,
- // before accessing |FrameSelection::selection()|.
- frame.selection().updateIfNeeded();
return frame.selection()
.computeVisibleSelectionInDOMTreeDeprecated()
.isRange() &&
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionEditor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698