| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2211 } | 2211 } |
| 2212 | 2212 |
| 2213 void Node::unregisterMutationObserver(MutationObserverRegistration* registration
) | 2213 void Node::unregisterMutationObserver(MutationObserverRegistration* registration
) |
| 2214 { | 2214 { |
| 2215 Vector<OwnPtr<MutationObserverRegistration> >* registry = mutationObserverRe
gistry(); | 2215 Vector<OwnPtr<MutationObserverRegistration> >* registry = mutationObserverRe
gistry(); |
| 2216 ASSERT(registry); | 2216 ASSERT(registry); |
| 2217 if (!registry) | 2217 if (!registry) |
| 2218 return; | 2218 return; |
| 2219 | 2219 |
| 2220 size_t index = registry->find(registration); | 2220 size_t index = registry->find(registration); |
| 2221 ASSERT(index != notFound); | 2221 ASSERT(index != kNotFound); |
| 2222 if (index == notFound) | 2222 if (index == kNotFound) |
| 2223 return; | 2223 return; |
| 2224 | 2224 |
| 2225 // Deleting the registration may cause this node to be derefed, so we must m
ake sure the Vector operation completes | 2225 // Deleting the registration may cause this node to be derefed, so we must m
ake sure the Vector operation completes |
| 2226 // before that, in case |this| is destroyed (see MutationObserverRegistratio
n::m_registrationNodeKeepAlive). | 2226 // before that, in case |this| is destroyed (see MutationObserverRegistratio
n::m_registrationNodeKeepAlive). |
| 2227 // FIXME: Simplify the registration/transient registration logic to make thi
s understandable by humans. | 2227 // FIXME: Simplify the registration/transient registration logic to make thi
s understandable by humans. |
| 2228 RefPtr<Node> protect(this); | 2228 RefPtr<Node> protect(this); |
| 2229 registry->remove(index); | 2229 registry->remove(index); |
| 2230 } | 2230 } |
| 2231 | 2231 |
| 2232 void Node::registerTransientMutationObserver(MutationObserverRegistration* regis
tration) | 2232 void Node::registerTransientMutationObserver(MutationObserverRegistration* regis
tration) |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2655 node->showTreeForThis(); | 2655 node->showTreeForThis(); |
| 2656 } | 2656 } |
| 2657 | 2657 |
| 2658 void showNodePath(const WebCore::Node* node) | 2658 void showNodePath(const WebCore::Node* node) |
| 2659 { | 2659 { |
| 2660 if (node) | 2660 if (node) |
| 2661 node->showNodePathForThis(); | 2661 node->showNodePathForThis(); |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 #endif | 2664 #endif |
| OLD | NEW |