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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 e552937f93862693dd0f8926ac4cf707b92df801..127a973e91f98bc956626dc9aeeebac1dcf96c51 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(RawPtr<HTMLElement> eleme
static void swapInNodePreservingAttributesAndChildren(HTMLElement* newElement, HTMLElement& elementToReplace)
{
- ASSERT(elementToReplace.inDocument());
+ ASSERT(elementToReplace.inShadowIncludingDocument());
RawPtr<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->inDocument())
+ if (!m_elementToReplace->inShadowIncludingDocument())
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->inDocument())
+ if (!m_spanElement->inShadowIncludingDocument())
return;
swapInNodePreservingAttributesAndChildren(m_elementToReplace.get(), *m_spanElement);
}

Powered by Google App Engine
This is Rietveld 408576698