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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 11 matching lines...) Expand all Loading... |
22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
25 */ | 25 */ |
26 | 26 |
27 #include "core/dom/Node.h" | 27 #include "core/dom/Node.h" |
28 | 28 |
29 #include "bindings/core/v8/DOMDataStore.h" | 29 #include "bindings/core/v8/DOMDataStore.h" |
30 #include "bindings/core/v8/ExceptionState.h" | 30 #include "bindings/core/v8/ExceptionState.h" |
31 #include "bindings/core/v8/Microtask.h" | 31 #include "bindings/core/v8/Microtask.h" |
| 32 #include "bindings/core/v8/ScriptWrappableVisitor.h" |
32 #include "bindings/core/v8/V8DOMWrapper.h" | 33 #include "bindings/core/v8/V8DOMWrapper.h" |
33 #include "core/HTMLNames.h" | 34 #include "core/HTMLNames.h" |
34 #include "core/MathMLNames.h" | 35 #include "core/MathMLNames.h" |
35 #include "core/css/CSSSelector.h" | 36 #include "core/css/CSSSelector.h" |
36 #include "core/css/resolver/StyleResolver.h" | 37 #include "core/css/resolver/StyleResolver.h" |
37 #include "core/dom/AXObjectCache.h" | 38 #include "core/dom/AXObjectCache.h" |
38 #include "core/dom/Attr.h" | 39 #include "core/dom/Attr.h" |
39 #include "core/dom/Attribute.h" | 40 #include "core/dom/Attribute.h" |
40 #include "core/dom/ChildListMutationScope.h" | 41 #include "core/dom/ChildListMutationScope.h" |
41 #include "core/dom/ChildNodeList.h" | 42 #include "core/dom/ChildNodeList.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 NodeRareData& Node::ensureRareData() { | 288 NodeRareData& Node::ensureRareData() { |
288 if (hasRareData()) | 289 if (hasRareData()) |
289 return *rareData(); | 290 return *rareData(); |
290 | 291 |
291 if (isElementNode()) | 292 if (isElementNode()) |
292 m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject); | 293 m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject); |
293 else | 294 else |
294 m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject); | 295 m_data.m_rareData = NodeRareData::create(m_data.m_layoutObject); |
295 | 296 |
296 DCHECK(m_data.m_rareData); | 297 DCHECK(m_data.m_rareData); |
297 | |
298 setFlag(HasRareDataFlag); | 298 setFlag(HasRareDataFlag); |
| 299 ScriptWrappableVisitor::writeBarrier(this, rareData()); |
299 return *rareData(); | 300 return *rareData(); |
300 } | 301 } |
301 | 302 |
302 Node* Node::toNode() { | 303 Node* Node::toNode() { |
303 return this; | 304 return this; |
304 } | 305 } |
305 | 306 |
306 short Node::tabIndex() const { | 307 short Node::tabIndex() const { |
307 return 0; | 308 return 0; |
308 } | 309 } |
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1966 if (®istry[i]->observer() == &observer) { | 1967 if (®istry[i]->observer() == &observer) { |
1967 registration = registry[i].get(); | 1968 registration = registry[i].get(); |
1968 registration->resetObservation(options, attributeFilter); | 1969 registration->resetObservation(options, attributeFilter); |
1969 } | 1970 } |
1970 } | 1971 } |
1971 | 1972 |
1972 if (!registration) { | 1973 if (!registration) { |
1973 registry.append(MutationObserverRegistration::create( | 1974 registry.append(MutationObserverRegistration::create( |
1974 observer, this, options, attributeFilter)); | 1975 observer, this, options, attributeFilter)); |
1975 registration = registry.last().get(); | 1976 registration = registry.last().get(); |
| 1977 ScriptWrappableVisitor::writeBarrier(this, registration); |
1976 } | 1978 } |
1977 | 1979 |
1978 document().addMutationObserverTypes(registration->mutationTypes()); | 1980 document().addMutationObserverTypes(registration->mutationTypes()); |
1979 } | 1981 } |
1980 | 1982 |
1981 void Node::unregisterMutationObserver( | 1983 void Node::unregisterMutationObserver( |
1982 MutationObserverRegistration* registration) { | 1984 MutationObserverRegistration* registration) { |
1983 HeapVector<Member<MutationObserverRegistration>>* registry = | 1985 HeapVector<Member<MutationObserverRegistration>>* registry = |
1984 mutationObserverRegistry(); | 1986 mutationObserverRegistry(); |
1985 DCHECK(registry); | 1987 DCHECK(registry); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2465 if (node) { | 2467 if (node) { |
2466 std::stringstream stream; | 2468 std::stringstream stream; |
2467 node->printNodePathTo(stream); | 2469 node->printNodePathTo(stream); |
2468 LOG(INFO) << stream.str(); | 2470 LOG(INFO) << stream.str(); |
2469 } else { | 2471 } else { |
2470 LOG(INFO) << "Cannot showNodePath for <null>"; | 2472 LOG(INFO) << "Cannot showNodePath for <null>"; |
2471 } | 2473 } |
2472 } | 2474 } |
2473 | 2475 |
2474 #endif | 2476 #endif |
OLD | NEW |