| 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 "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 ExceptionState; | 43 class ExceptionState; |
| 44 class HTMLSlotElement; |
| 44 class MutationCallback; | 45 class MutationCallback; |
| 45 class MutationObserver; | 46 class MutationObserver; |
| 46 class MutationObserverInit; | 47 class MutationObserverInit; |
| 47 class MutationObserverRegistration; | 48 class MutationObserverRegistration; |
| 48 class MutationRecord; | 49 class MutationRecord; |
| 49 class Node; | 50 class Node; |
| 50 | 51 |
| 51 typedef unsigned char MutationObserverOptions; | 52 typedef unsigned char MutationObserverOptions; |
| 52 typedef unsigned char MutationRecordDeliveryOptions; | 53 typedef unsigned char MutationRecordDeliveryOptions; |
| 53 | 54 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 74 enum ObservationFlags { Subtree = 1 << 3, AttributeFilter = 1 << 4 }; | 75 enum ObservationFlags { Subtree = 1 << 3, AttributeFilter = 1 << 4 }; |
| 75 | 76 |
| 76 enum DeliveryFlags { | 77 enum DeliveryFlags { |
| 77 AttributeOldValue = 1 << 5, | 78 AttributeOldValue = 1 << 5, |
| 78 CharacterDataOldValue = 1 << 6, | 79 CharacterDataOldValue = 1 << 6, |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 static MutationObserver* create(MutationCallback*); | 82 static MutationObserver* create(MutationCallback*); |
| 82 static void resumeSuspendedObservers(); | 83 static void resumeSuspendedObservers(); |
| 83 static void deliverMutations(); | 84 static void deliverMutations(); |
| 85 static void enqueueSlotChange(HTMLSlotElement&); |
| 84 | 86 |
| 85 ~MutationObserver(); | 87 ~MutationObserver(); |
| 86 | 88 |
| 87 void observe(Node*, const MutationObserverInit&, ExceptionState&); | 89 void observe(Node*, const MutationObserverInit&, ExceptionState&); |
| 88 MutationRecordVector takeRecords(); | 90 MutationRecordVector takeRecords(); |
| 89 void disconnect(); | 91 void disconnect(); |
| 90 void observationStarted(MutationObserverRegistration*); | 92 void observationStarted(MutationObserverRegistration*); |
| 91 void observationEnded(MutationObserverRegistration*); | 93 void observationEnded(MutationObserverRegistration*); |
| 92 void enqueueMutationRecord(MutationRecord*); | 94 void enqueueMutationRecord(MutationRecord*); |
| 93 void setHasTransientRegistration(); | 95 void setHasTransientRegistration(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 110 MutationRecordVector m_records; | 112 MutationRecordVector m_records; |
| 111 MutationObserverRegistrationSet m_registrations; | 113 MutationObserverRegistrationSet m_registrations; |
| 112 unsigned m_priority; | 114 unsigned m_priority; |
| 113 | 115 |
| 114 FRIEND_TEST_ALL_PREFIXES(MutationObserverTest, DisconnectCrash); | 116 FRIEND_TEST_ALL_PREFIXES(MutationObserverTest, DisconnectCrash); |
| 115 }; | 117 }; |
| 116 | 118 |
| 117 } // namespace blink | 119 } // namespace blink |
| 118 | 120 |
| 119 #endif // MutationObserver_h | 121 #endif // MutationObserver_h |
| OLD | NEW |