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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed 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/ReplaceNodeWithSpanCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
index 8a945b5b121461bb725b9ee84caef28a8a322670..66e2b6536d2aed6dba86a00329b4e56741a70513 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceNodeWithSpanCommand.cpp
@@ -50,7 +50,7 @@ ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand(HTMLElement* element)
static void swapInNodePreservingAttributesAndChildren(HTMLElement* newElement, HTMLElement& elementToReplace)
{
- DCHECK(elementToReplace.inShadowIncludingDocument()) << elementToReplace;
+ DCHECK(elementToReplace.isConnected()) << elementToReplace;
ContainerNode* parentNode = elementToReplace.parentNode();
parentNode->insertBefore(newElement, &elementToReplace);
@@ -67,7 +67,7 @@ static void swapInNodePreservingAttributesAndChildren(HTMLElement* newElement, H
void ReplaceNodeWithSpanCommand::doApply(EditingState*)
{
- if (!m_elementToReplace->inShadowIncludingDocument())
+ if (!m_elementToReplace->isConnected())
return;
if (!m_spanElement)
m_spanElement = HTMLSpanElement::create(m_elementToReplace->document());
@@ -76,7 +76,7 @@ void ReplaceNodeWithSpanCommand::doApply(EditingState*)
void ReplaceNodeWithSpanCommand::doUnapply()
{
- if (!m_spanElement->inShadowIncludingDocument())
+ if (!m_spanElement->isConnected())
return;
swapInNodePreservingAttributesAndChildren(m_elementToReplace.get(), *m_spanElement);
}

Powered by Google App Engine
This is Rietveld 408576698