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

Unified Diff: third_party/WebKit/Source/core/editing/DOMSelection.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/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index cdc69cee04afe11f8fc7636b43acebdfd256224b..ec00796eac860bb88bac0c7a98c36516a69cb14c 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -417,7 +417,7 @@ void DOMSelection::addRange(Range* newRange)
if (newRange->ownerDocument() != m_frame->document())
return;
- if (!newRange->inShadowIncludingDocument()) {
+ if (!newRange->isConnected()) {
addConsoleError("The given range isn't in document.");
return;
}
@@ -577,7 +577,7 @@ bool DOMSelection::isValidForPosition(Node* node) const
DCHECK(m_frame);
if (!node)
return true;
- return node->document() == m_frame->document() && node->inShadowIncludingDocument();
+ return node->document() == m_frame->document() && node->isConnected();
}
void DOMSelection::addConsoleError(const String& message)
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp ('k') | third_party/WebKit/Source/core/editing/EphemeralRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698