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 23 matching lines...) Expand all Loading... |
34 #include <algorithm> | 34 #include <algorithm> |
35 #include "bindings/v8/Dictionary.h" | 35 #include "bindings/v8/Dictionary.h" |
36 #include "bindings/v8/ExceptionMessages.h" | 36 #include "bindings/v8/ExceptionMessages.h" |
37 #include "bindings/v8/ExceptionState.h" | 37 #include "bindings/v8/ExceptionState.h" |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/dom/ExceptionCode.h" | 39 #include "core/dom/ExceptionCode.h" |
40 #include "core/dom/MutationCallback.h" | 40 #include "core/dom/MutationCallback.h" |
41 #include "core/dom/MutationObserverRegistration.h" | 41 #include "core/dom/MutationObserverRegistration.h" |
42 #include "core/dom/MutationRecord.h" | 42 #include "core/dom/MutationRecord.h" |
43 #include "core/dom/Node.h" | 43 #include "core/dom/Node.h" |
44 #include "wtf/HashSet.h" | |
45 #include "wtf/MainThread.h" | 44 #include "wtf/MainThread.h" |
46 #include "wtf/Vector.h" | |
47 | 45 |
48 namespace WebCore { | 46 namespace WebCore { |
49 | 47 |
50 static unsigned s_observerPriority = 0; | 48 static unsigned s_observerPriority = 0; |
51 | 49 |
52 struct MutationObserver::ObserverLessThan { | 50 struct MutationObserver::ObserverLessThan { |
53 bool operator()(const RefPtr<MutationObserver>& lhs, const RefPtr<MutationOb
server>& rhs) | 51 bool operator()(const RefPtr<MutationObserver>& lhs, const RefPtr<MutationOb
server>& rhs) |
54 { | 52 { |
55 return lhs->m_priority < rhs->m_priority; | 53 return lhs->m_priority < rhs->m_priority; |
56 } | 54 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 observers[i]->deliver(); | 257 observers[i]->deliver(); |
260 else | 258 else |
261 suspendedMutationObservers().add(observers[i]); | 259 suspendedMutationObservers().add(observers[i]); |
262 } | 260 } |
263 } | 261 } |
264 | 262 |
265 deliveryInProgress = false; | 263 deliveryInProgress = false; |
266 } | 264 } |
267 | 265 |
268 } // namespace WebCore | 266 } // namespace WebCore |
OLD | NEW |