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

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

Issue 2140733003: [Editing][CodeHealth] Make Node::rootEditableElement static (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/FormatBlockCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp b/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
index 131dbf6dd07a0fed6d51a59ea87a61eda55dcec8..55aad76828a74138f08b7098007fc82c742a79ae 100644
--- a/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
@@ -124,8 +124,8 @@ Element* FormatBlockCommand::elementForFormatBlockCommand(Range* range)
if (!commonAncestor)
return 0;
- Element* rootEditableElement = range->startContainer()->rootEditableElement();
- if (!rootEditableElement || commonAncestor->contains(rootEditableElement))
+ Element* element = rootEditableElement(*range->startContainer());
+ if (!element || commonAncestor->contains(element))
return 0;
return commonAncestor->isElementNode() ? toElement(commonAncestor) : 0;

Powered by Google App Engine
This is Rietveld 408576698