#ifndef MutationEvent_h
#define MutationEvent_h
#include "Event.h"
#include "Node.h"
namespace WebCore {
class MutationEvent : public Event {
public:
enum attrChangeType {
MODIFICATION = 1,
ADDITION = 2,
REMOVAL = 3
};
MutationEvent();
MutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
const String& prevValue, const String& newValue,
const String& attrName, unsigned short attrChange);
void initMutationEvent(const AtomicString& type, bool canBubble, bool cancelable, Node* relatedNode,
const String& prevValue, const String& newValue,
const String& attrName, unsigned short attrChange);
Node* relatedNode() const { return m_relatedNode.get(); }
String prevValue() const { return m_prevValue.get(); }
String newValue() const { return m_newValue.get(); }
String attrName() const { return m_attrName.get(); }
unsigned short attrChange() const { return m_attrChange; }
virtual bool isMutationEvent() const;
private:
RefPtr<Node> m_relatedNode;
RefPtr<StringImpl> m_prevValue;
RefPtr<StringImpl> m_newValue;
RefPtr<StringImpl> m_attrName;
unsigned short m_attrChange;
};
}
#endif // MutationEvent_h