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

Unified Diff: third_party/WebKit/Source/core/editing/commands/TypingCommand.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/TypingCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 8e56bf043bffd04250b746a2b13d18410291902b..fbd532e77a9fb2f5a49da3f27929a04b4b70f583 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -147,10 +147,10 @@ static String dispatchBeforeTextInsertedEvent(const String& text, const VisibleS
String newText = text;
if (Node* startNode = selectionForInsertion.start().computeContainerNode()) {
- if (startNode->rootEditableElement()) {
+ if (rootEditableElement(*startNode)) {
// Send BeforeTextInsertedEvent. The event handler will update text if necessary.
BeforeTextInsertedEvent* evt = BeforeTextInsertedEvent::create(text);
- startNode->rootEditableElement()->dispatchEvent(evt);
+ rootEditableElement(*startNode)->dispatchEvent(evt);
newText = evt->text();
}
}

Powered by Google App Engine
This is Rietveld 408576698