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

Unified Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 2786573002: Use EphemeralRange instead of Range in Range::isNodeFullyContainded (Closed)
Patch Set: update Created 3 years, 9 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/dom/Range.cpp
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index 338d8ff652ec60caeccb9ed18642b30384831cd8..452024df8567c1af088677d2d31139fdda3e4d33 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -284,20 +284,6 @@ void Range::collapse(bool toStart) {
m_start = m_end;
}
-bool Range::isNodeFullyContained(Node& node) const {
- ContainerNode* parentNode = node.parentNode();
- unsigned nodeIndex = node.nodeIndex();
- return isPointInRange(
- parentNode, nodeIndex,
- IGNORE_EXCEPTION_FOR_TESTING) // starts in the middle of this
- // range, or on the boundary points.
- && isPointInRange(
- parentNode, nodeIndex + 1,
- IGNORE_EXCEPTION_FOR_TESTING); // ends in the middle of this
- // range, or on the boundary
- // points.
-}
-
bool Range::hasSameRoot(const Node& node) const {
if (node.document() != m_ownerDocument)
return false;

Powered by Google App Engine
This is Rietveld 408576698