| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 if (!((options & CharacterData) || !(options & CharacterDataOldValue))) { | 130 if (!((options & CharacterData) || !(options & CharacterDataOldValue))) { |
| 131 exceptionState.throwTypeError("The options object may only set 'characte
rDataOldValue' to true when 'characterData' is true or not present."); | 131 exceptionState.throwTypeError("The options object may only set 'characte
rDataOldValue' to true when 'characterData' is true or not present."); |
| 132 return; | 132 return; |
| 133 } | 133 } |
| 134 | 134 |
| 135 if (!(options & (Attributes | CharacterData | ChildList))) { | 135 if (!(options & (Attributes | CharacterData | ChildList))) { |
| 136 exceptionState.throwTypeError("The options object must set at least one
of 'attributes', 'characterData', or 'childList' to true."); | 136 exceptionState.throwTypeError("The options object must set at least one
of 'attributes', 'characterData', or 'childList' to true."); |
| 137 return; | 137 return; |
| 138 } | 138 } |
| 139 | 139 |
| 140 node->registerMutationObserver(this, options, attributeFilter); | 140 node->registerMutationObserver(*this, options, attributeFilter); |
| 141 } | 141 } |
| 142 | 142 |
| 143 Vector<RefPtr<MutationRecord> > MutationObserver::takeRecords() | 143 Vector<RefPtr<MutationRecord> > MutationObserver::takeRecords() |
| 144 { | 144 { |
| 145 Vector<RefPtr<MutationRecord> > records; | 145 Vector<RefPtr<MutationRecord> > records; |
| 146 records.swap(m_records); | 146 records.swap(m_records); |
| 147 InspectorInstrumentation::didClearAllMutationRecords(m_callback->executionCo
ntext(), this); | 147 InspectorInstrumentation::didClearAllMutationRecords(m_callback->executionCo
ntext(), this); |
| 148 return records; | 148 return records; |
| 149 } | 149 } |
| 150 | 150 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 std::sort(observers.begin(), observers.end(), ObserverLessThan()); | 268 std::sort(observers.begin(), observers.end(), ObserverLessThan()); |
| 269 for (size_t i = 0; i < observers.size(); ++i) { | 269 for (size_t i = 0; i < observers.size(); ++i) { |
| 270 if (observers[i]->canDeliver()) | 270 if (observers[i]->canDeliver()) |
| 271 observers[i]->deliver(); | 271 observers[i]->deliver(); |
| 272 else | 272 else |
| 273 suspendedMutationObservers().add(observers[i]); | 273 suspendedMutationObservers().add(observers[i]); |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace WebCore | 277 } // namespace WebCore |
| OLD | NEW |