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

Side by Side Diff: sky/engine/core/dom/MutationObserverRegistration.cpp

Issue 698123002: Remove more API from Node and ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/MutationObserverRegistration.h ('k') | sky/engine/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 : m_observer(observer) 46 : m_observer(observer)
47 , m_registrationNode(registrationNode) 47 , m_registrationNode(registrationNode)
48 , m_options(options) 48 , m_options(options)
49 , m_attributeFilter(attributeFilter) 49 , m_attributeFilter(attributeFilter)
50 { 50 {
51 m_observer->observationStarted(this); 51 m_observer->observationStarted(this);
52 } 52 }
53 53
54 MutationObserverRegistration::~MutationObserverRegistration() 54 MutationObserverRegistration::~MutationObserverRegistration()
55 { 55 {
56 #if !ENABLE(OILPAN)
57 dispose(); 56 dispose();
58 #endif
59 } 57 }
60 58
61 void MutationObserverRegistration::dispose() 59 void MutationObserverRegistration::dispose()
62 { 60 {
63 clearTransientRegistrations(); 61 clearTransientRegistrations();
64 m_observer->observationEnded(this); 62 m_observer->observationEnded(this);
65 m_observer.clear(); 63 m_observer.clear();
66 } 64 }
67 65
68 void MutationObserverRegistration::resetObservation(MutationObserverOptions opti ons, const HashSet<AtomicString>& attributeFilter) 66 void MutationObserverRegistration::resetObservation(MutationObserverOptions opti ons, const HashSet<AtomicString>& attributeFilter)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void MutationObserverRegistration::addRegistrationNodesToSet(HashSet<RawPtr<Node > >& nodes) const 129 void MutationObserverRegistration::addRegistrationNodesToSet(HashSet<RawPtr<Node > >& nodes) const
132 { 130 {
133 ASSERT(m_registrationNode); 131 ASSERT(m_registrationNode);
134 nodes.add(m_registrationNode.get()); 132 nodes.add(m_registrationNode.get());
135 if (!m_transientRegistrationNodes) 133 if (!m_transientRegistrationNodes)
136 return; 134 return;
137 for (NodeHashSet::const_iterator iter = m_transientRegistrationNodes->begin( ); iter != m_transientRegistrationNodes->end(); ++iter) 135 for (NodeHashSet::const_iterator iter = m_transientRegistrationNodes->begin( ); iter != m_transientRegistrationNodes->end(); ++iter)
138 nodes.add(iter->get()); 136 nodes.add(iter->get());
139 } 137 }
140 138
141 void MutationObserverRegistration::trace(Visitor* visitor)
142 {
143 visitor->trace(m_observer);
144 visitor->trace(m_registrationNode);
145 visitor->trace(m_registrationNodeKeepAlive);
146 #if ENABLE(OILPAN)
147 visitor->trace(m_transientRegistrationNodes);
148 #endif
149 }
150
151 } // namespace blink 139 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/MutationObserverRegistration.h ('k') | sky/engine/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698