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

Unified Diff: Source/core/dom/Node.h

Issue 21123005: Node.contains should return true for nodes in Shadow DOM. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make contains-something condition clearer. Created 7 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 | « LayoutTests/fast/dom/shadow/contains-with-shadow-dom-expected.txt ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 24338a14e45ed19e2864ac17a805fad0a5938c42..4f45fc7f47a41a55c7c924e0821189e45831dec9 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -517,6 +517,9 @@ public:
bool containsIncludingShadowDOM(const Node*) const;
bool containsIncludingHostElements(const Node*) const;
+ // FIXME: Remove this when crbug.com/265716 cleans up contains semantics.
+ bool bindingsContains(const Node* node) const { return containsIncludingShadowDOM(node); }
+
// Used to determine whether range offsets use characters or node indices.
virtual bool offsetInCharacters() const;
// Number of DOM 16-bit units contained in node. Note that rendered text length can be different - e.g. because of
« no previous file with comments | « LayoutTests/fast/dom/shadow/contains-with-shadow-dom-expected.txt ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698