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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a49ef639f5d79ea62091a133211aff1bd8104ad3..a528dbf86a852f09a4ddda6d6d8443d35b94c358 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -361,7 +361,7 @@ static bool acceptsEditingFocus(const Element& element)
{
DCHECK(element.hasEditableStyle());
- return element.document().frame() && element.rootEditableElement();
+ return element.document().frame() && rootEditableElement(element);
}
uint64_t Document::s_globalTreeVersion = 0;
@@ -3565,7 +3565,7 @@ bool Document::setFocusedElement(Element* prpNewFocusedElement, const FocusParam
if (newFocusedElement)
updateStyleAndLayoutTreeForNode(newFocusedElement);
if (newFocusedElement && newFocusedElement->isFocusable()) {
- if (newFocusedElement->isRootEditableElement() && !acceptsEditingFocus(*newFocusedElement)) {
+ if (isRootEditableElement(*newFocusedElement) && !acceptsEditingFocus(*newFocusedElement)) {
// delegate blocks focus change
focusChangeBlocked = true;
goto SetFocusedElementDone;
@@ -3613,7 +3613,7 @@ bool Document::setFocusedElement(Element* prpNewFocusedElement, const FocusParam
}
}
- if (m_focusedElement->isRootEditableElement())
+ if (isRootEditableElement(*m_focusedElement))
frame()->spellChecker().didBeginEditing(m_focusedElement.get());
// eww, I suck. set the qt focus correctly
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698