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 "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class Node; | 42 class Node; |
43 class NodeList; | |
44 class QualifiedName; | 43 class QualifiedName; |
| 44 class StaticNodeList; |
45 | 45 |
46 class MutationRecord : public RefCountedWillBeGarbageCollectedFinalized<Mutation
Record>, public ScriptWrappable { | 46 class MutationRecord : public RefCountedWillBeGarbageCollectedFinalized<Mutation
Record>, public ScriptWrappable { |
47 public: | 47 public: |
48 static PassRefPtrWillBeRawPtr<MutationRecord> createChildList(PassRefPtrWill
BeRawPtr<Node> target, PassRefPtrWillBeRawPtr<NodeList> added, PassRefPtrWillBeR
awPtr<NodeList> removed, PassRefPtrWillBeRawPtr<Node> previousSibling, PassRefPt
rWillBeRawPtr<Node> nextSibling); | 48 static PassRefPtrWillBeRawPtr<MutationRecord> createChildList(PassRefPtrWill
BeRawPtr<Node> target, PassRefPtrWillBeRawPtr<StaticNodeList> added, PassRefPtrW
illBeRawPtr<StaticNodeList> removed, PassRefPtrWillBeRawPtr<Node> previousSiblin
g, PassRefPtrWillBeRawPtr<Node> nextSibling); |
49 static PassRefPtrWillBeRawPtr<MutationRecord> createAttributes(PassRefPtrWil
lBeRawPtr<Node> target, const QualifiedName&, const AtomicString& oldValue); | 49 static PassRefPtrWillBeRawPtr<MutationRecord> createAttributes(PassRefPtrWil
lBeRawPtr<Node> target, const QualifiedName&, const AtomicString& oldValue); |
50 static PassRefPtrWillBeRawPtr<MutationRecord> createCharacterData(PassRefPtr
WillBeRawPtr<Node> target, const String& oldValue); | 50 static PassRefPtrWillBeRawPtr<MutationRecord> createCharacterData(PassRefPtr
WillBeRawPtr<Node> target, const String& oldValue); |
51 static PassRefPtrWillBeRawPtr<MutationRecord> createWithNullOldValue(PassRef
PtrWillBeRawPtr<MutationRecord>); | 51 static PassRefPtrWillBeRawPtr<MutationRecord> createWithNullOldValue(PassRef
PtrWillBeRawPtr<MutationRecord>); |
52 | 52 |
53 MutationRecord() | 53 MutationRecord() |
54 { | 54 { |
55 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
56 } | 56 } |
57 | 57 |
58 virtual ~MutationRecord(); | 58 virtual ~MutationRecord(); |
59 | 59 |
60 virtual const AtomicString& type() = 0; | 60 virtual const AtomicString& type() = 0; |
61 virtual Node* target() = 0; | 61 virtual Node* target() = 0; |
62 | 62 |
63 virtual NodeList* addedNodes() = 0; | 63 virtual StaticNodeList* addedNodes() = 0; |
64 virtual NodeList* removedNodes() = 0; | 64 virtual StaticNodeList* removedNodes() = 0; |
65 virtual Node* previousSibling() { return 0; } | 65 virtual Node* previousSibling() { return 0; } |
66 virtual Node* nextSibling() { return 0; } | 66 virtual Node* nextSibling() { return 0; } |
67 | 67 |
68 virtual const AtomicString& attributeName() { return nullAtom; } | 68 virtual const AtomicString& attributeName() { return nullAtom; } |
69 virtual const AtomicString& attributeNamespace() { return nullAtom; } | 69 virtual const AtomicString& attributeNamespace() { return nullAtom; } |
70 | 70 |
71 virtual String oldValue() { return String(); } | 71 virtual String oldValue() { return String(); } |
72 | 72 |
73 virtual void trace(Visitor*) { } | 73 virtual void trace(Visitor*) { } |
74 | 74 |
75 }; | 75 }; |
76 | 76 |
77 } // namespace WebCore | 77 } // namespace WebCore |
78 | 78 |
79 #endif // MutationRecord_h | 79 #endif // MutationRecord_h |
OLD | NEW |