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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.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/ApplyStyleCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
index a2982225f5a44cdfe7bfe5dddffd14aa687f5f2c..20e114a0d7dbdabb58c38dff6667c7567276eafb 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
@@ -763,7 +763,7 @@ void ApplyStyleCommand::fixRangeAndApplyInlineStyle(EditingStyle* style, const P
// e.g. When applying font-size: large on <font color="blue">hello</font>, we need to include the font element in our run
// to generate <font color="blue" size="4">hello</font> instead of <font color="blue"><font size="4">hello</font></font>
Range* range = Range::create(startNode->document(), start, end);
- Element* editableRoot = startNode->rootEditableElement();
+ Element* editableRoot = rootEditableElement(*startNode);
if (startNode != editableRoot) {
while (editableRoot && startNode->parentNode() != editableRoot && isNodeVisiblyContainedWithin(*startNode->parentNode(), *range))
startNode = startNode->parentNode();

Powered by Google App Engine
This is Rietveld 408576698