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

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

Issue 2704933006: Expand FrameSeleciton::rootEditableElement() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T15:42:51 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/commands/RemoveFormatCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/RemoveFormatCommand.cpp b/third_party/WebKit/Source/core/editing/commands/RemoveFormatCommand.cpp
index 8132dae22d5680ce2c349d066324299463698d29..f57bda0704f29213d06f1c977c37ed7f533eba4f 100644
--- a/third_party/WebKit/Source/core/editing/commands/RemoveFormatCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/RemoveFormatCommand.cpp
@@ -65,7 +65,9 @@ void RemoveFormatCommand::doApply(EditingState* editingState) {
// Get the default style for this editable root, it's the style that we'll
// give the content that we're operating on.
- Element* root = frame->selection().rootEditableElement();
+ Element* root = frame->selection()
+ .computeVisibleSelectionInDOMTreeDeprecated()
+ .rootEditableElement();
EditingStyle* defaultStyle = EditingStyle::create(root);
// We want to remove everything but transparent background.

Powered by Google App Engine
This is Rietveld 408576698