OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 { | 70 { |
71 #if !ENABLE(OILPAN) | 71 #if !ENABLE(OILPAN) |
72 ASSERT(m_registrations.isEmpty()); | 72 ASSERT(m_registrations.isEmpty()); |
73 #endif | 73 #endif |
74 if (!m_records.isEmpty()) | 74 if (!m_records.isEmpty()) |
75 InspectorInstrumentation::didClearAllMutationRecords(m_callback->executi
onContext(), this); | 75 InspectorInstrumentation::didClearAllMutationRecords(m_callback->executi
onContext(), this); |
76 } | 76 } |
77 | 77 |
78 void MutationObserver::observe(Node* node, const MutationObserverInit& observerI
nit, ExceptionState& exceptionState) | 78 void MutationObserver::observe(Node* node, const MutationObserverInit& observerI
nit, ExceptionState& exceptionState) |
79 { | 79 { |
80 if (!node) { | 80 ASSERT(node); |
81 exceptionState.throwDOMException(NotFoundError, "The provided node was n
ull."); | |
82 return; | |
83 } | |
84 | 81 |
85 MutationObserverOptions options = 0; | 82 MutationObserverOptions options = 0; |
86 | 83 |
87 if (observerInit.hasAttributeOldValue() && observerInit.attributeOldValue()) | 84 if (observerInit.hasAttributeOldValue() && observerInit.attributeOldValue()) |
88 options |= AttributeOldValue; | 85 options |= AttributeOldValue; |
89 | 86 |
90 HashSet<AtomicString> attributeFilter; | 87 HashSet<AtomicString> attributeFilter; |
91 if (observerInit.hasAttributeFilter()) { | 88 if (observerInit.hasAttributeFilter()) { |
92 const Vector<String>& sequence = observerInit.attributeFilter(); | 89 const Vector<String>& sequence = observerInit.attributeFilter(); |
93 for (unsigned i = 0; i < sequence.size(); ++i) | 90 for (unsigned i = 0; i < sequence.size(); ++i) |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 { | 273 { |
277 #if ENABLE(OILPAN) | 274 #if ENABLE(OILPAN) |
278 visitor->trace(m_callback); | 275 visitor->trace(m_callback); |
279 visitor->trace(m_records); | 276 visitor->trace(m_records); |
280 visitor->trace(m_registrations); | 277 visitor->trace(m_registrations); |
281 visitor->trace(m_callback); | 278 visitor->trace(m_callback); |
282 #endif | 279 #endif |
283 } | 280 } |
284 | 281 |
285 } // namespace blink | 282 } // namespace blink |
OLD | NEW |