| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "base/gtest_prod_util.h" | 34 #include "base/gtest_prod_util.h" |
| 35 #include "bindings/core/v8/ScriptWrappable.h" | 35 #include "bindings/core/v8/ScriptWrappable.h" |
| 36 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
| 37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
| 38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
| 39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class Document; |
| 43 class ExceptionState; | 44 class ExceptionState; |
| 45 class HTMLSlotElement; |
| 44 class MutationCallback; | 46 class MutationCallback; |
| 45 class MutationObserver; | 47 class MutationObserver; |
| 46 class MutationObserverInit; | 48 class MutationObserverInit; |
| 47 class MutationObserverRegistration; | 49 class MutationObserverRegistration; |
| 48 class MutationRecord; | 50 class MutationRecord; |
| 49 class Node; | 51 class Node; |
| 50 | 52 |
| 51 typedef unsigned char MutationObserverOptions; | 53 typedef unsigned char MutationObserverOptions; |
| 52 typedef unsigned char MutationRecordDeliveryOptions; | 54 typedef unsigned char MutationRecordDeliveryOptions; |
| 53 | 55 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 74 enum ObservationFlags { Subtree = 1 << 3, AttributeFilter = 1 << 4 }; | 76 enum ObservationFlags { Subtree = 1 << 3, AttributeFilter = 1 << 4 }; |
| 75 | 77 |
| 76 enum DeliveryFlags { | 78 enum DeliveryFlags { |
| 77 AttributeOldValue = 1 << 5, | 79 AttributeOldValue = 1 << 5, |
| 78 CharacterDataOldValue = 1 << 6, | 80 CharacterDataOldValue = 1 << 6, |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 static MutationObserver* create(MutationCallback*); | 83 static MutationObserver* create(MutationCallback*); |
| 82 static void resumeSuspendedObservers(); | 84 static void resumeSuspendedObservers(); |
| 83 static void deliverMutations(); | 85 static void deliverMutations(); |
| 86 static void enqueueSlotChange(HTMLSlotElement&); |
| 87 static void cleanSlotChangeList(Document&); |
| 84 | 88 |
| 85 ~MutationObserver(); | 89 ~MutationObserver(); |
| 86 | 90 |
| 87 void observe(Node*, const MutationObserverInit&, ExceptionState&); | 91 void observe(Node*, const MutationObserverInit&, ExceptionState&); |
| 88 MutationRecordVector takeRecords(); | 92 MutationRecordVector takeRecords(); |
| 89 void disconnect(); | 93 void disconnect(); |
| 90 void observationStarted(MutationObserverRegistration*); | 94 void observationStarted(MutationObserverRegistration*); |
| 91 void observationEnded(MutationObserverRegistration*); | 95 void observationEnded(MutationObserverRegistration*); |
| 92 void enqueueMutationRecord(MutationRecord*); | 96 void enqueueMutationRecord(MutationRecord*); |
| 93 void setHasTransientRegistration(); | 97 void setHasTransientRegistration(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 110 MutationRecordVector m_records; | 114 MutationRecordVector m_records; |
| 111 MutationObserverRegistrationSet m_registrations; | 115 MutationObserverRegistrationSet m_registrations; |
| 112 unsigned m_priority; | 116 unsigned m_priority; |
| 113 | 117 |
| 114 FRIEND_TEST_ALL_PREFIXES(MutationObserverTest, DisconnectCrash); | 118 FRIEND_TEST_ALL_PREFIXES(MutationObserverTest, DisconnectCrash); |
| 115 }; | 119 }; |
| 116 | 120 |
| 117 } // namespace blink | 121 } // namespace blink |
| 118 | 122 |
| 119 #endif // MutationObserver_h | 123 #endif // MutationObserver_h |
| OLD | NEW |