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

Unified Diff: sky/engine/core/dom/Node.cpp

Issue 693243002: Remove interactive content and form related API from HTMLElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/engine/core/dom/Node.h ('k') | sky/engine/core/dom/NodeRenderingTraversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Node.cpp
diff --git a/sky/engine/core/dom/Node.cpp b/sky/engine/core/dom/Node.cpp
index bf54bb6e2408875a8d59d0d238ddf39a8159fa76..c56762732f3a83ab15bbb0480cb555dd080afa24 100644
--- a/sky/engine/core/dom/Node.cpp
+++ b/sky/engine/core/dom/Node.cpp
@@ -752,43 +752,6 @@ bool Node::containsIncludingHostElements(const Node& node) const
return false;
}
-Node* Node::commonAncestor(const Node& other, Node* (*parent)(const Node&))
-{
- if (this == other)
- return this;
- if (document() != other.document())
- return 0;
- int thisDepth = 0;
- for (Node* node = this; node; node = parent(*node)) {
- if (node == &other)
- return node;
- thisDepth++;
- }
- int otherDepth = 0;
- for (const Node* node = &other; node; node = parent(*node)) {
- if (node == this)
- return this;
- otherDepth++;
- }
- Node* thisIterator = this;
- const Node* otherIterator = &other;
- if (thisDepth > otherDepth) {
- for (int i = thisDepth; i > otherDepth; --i)
- thisIterator = parent(*thisIterator);
- } else if (otherDepth > thisDepth) {
- for (int i = otherDepth; i > thisDepth; --i)
- otherIterator = parent(*otherIterator);
- }
- while (thisIterator) {
- if (thisIterator == otherIterator)
- return thisIterator;
- thisIterator = parent(*thisIterator);
- otherIterator = parent(*otherIterator);
- }
- ASSERT(!otherIterator);
- return 0;
-}
-
void Node::reattach(const AttachContext& context)
{
AttachContext reattachContext(context);
« no previous file with comments | « sky/engine/core/dom/Node.h ('k') | sky/engine/core/dom/NodeRenderingTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698