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

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

Issue 2706023003: Expand FrameSeleciton::isContentRichlyEditable() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T11:28:21 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/FrameSelection.h ('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 7587722432c4d74d6a6b3aefb67630bd90c3e756..f82a1556d910cbb48df6375030a969108819d13e 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -1915,7 +1915,9 @@ static bool enabledInRichlyEditableText(LocalFrame& frame,
// before accessing |FrameSelection::selection()|.
frame.selection().updateIfNeeded();
return !frame.selection().isNone() &&
- frame.selection().isContentRichlyEditable() &&
+ frame.selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isContentRichlyEditable() &&
frame.selection().rootEditableElement();
}
@@ -1947,7 +1949,9 @@ static bool enabledRangeInRichlyEditableText(LocalFrame& frame,
// before accessing |FrameSelection::selection()|.
frame.selection().updateIfNeeded();
return frame.selection().isRange() &&
- frame.selection().isContentRichlyEditable();
+ frame.selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isContentRichlyEditable();
}
static bool enabledRedo(LocalFrame& frame, Event*, EditorCommandSource) {
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698