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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.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 | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index e312d48a79480e1c336c6d0945fcc7e521daa577..af6c0c9ee6be81a70fe3c60681a4781ea6f58736 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -267,7 +267,10 @@ bool Editor::canEdit() const {
}
bool Editor::canEditRichly() const {
- return frame().selection().isContentRichlyEditable();
+ return frame()
+ .selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isContentRichlyEditable();
}
// WinIE uses onbeforecut and onbeforepaste to enables the cut and paste menu
@@ -1146,7 +1149,9 @@ void Editor::paste(EditorCommandSource source) {
ResourceFetcher* loader = frame().document()->fetcher();
ResourceCacheValidationSuppressor validationSuppressor(loader);
- PasteMode pasteMode = frame().selection().isContentRichlyEditable()
+ PasteMode pasteMode = frame().selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .isContentRichlyEditable()
? AllMimeTypes
: PlainTextOnly;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698