| 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);
|
|
|