diff options
author | Steve Block <steveblock@google.com> | 2010-04-27 16:31:00 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-11 14:42:12 +0100 |
commit | dcc8cf2e65d1aa555cce12431a16547e66b469ee (patch) | |
tree | 92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/dom/Event.cpp | |
parent | ccac38a6b48843126402088a309597e682f40fe6 (diff) | |
download | external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2 |
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/dom/Event.cpp')
-rw-r--r-- | WebCore/dom/Event.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/WebCore/dom/Event.cpp b/WebCore/dom/Event.cpp index b6abb2a..506d945 100644 --- a/WebCore/dom/Event.cpp +++ b/WebCore/dom/Event.cpp @@ -24,6 +24,7 @@ #include "Event.h" #include "AtomicString.h" +#include "UserGestureIndicator.h" #include <wtf/CurrentTime.h> namespace WebCore { @@ -32,10 +33,10 @@ Event::Event() : m_canBubble(false) , m_cancelable(false) , m_propagationStopped(false) + , m_immediatePropagationStopped(false) , m_defaultPrevented(false) , m_defaultHandled(false) , m_cancelBubble(false) - , m_createdByDOM(false) , m_eventPhase(0) , m_currentTarget(0) , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0)) @@ -47,10 +48,10 @@ Event::Event(const AtomicString& eventType, bool canBubbleArg, bool cancelableAr , m_canBubble(canBubbleArg) , m_cancelable(cancelableArg) , m_propagationStopped(false) + , m_immediatePropagationStopped(false) , m_defaultPrevented(false) , m_defaultHandled(false) , m_cancelBubble(false) - , m_createdByDOM(false) , m_eventPhase(0) , m_currentTarget(0) , m_createTime(static_cast<DOMTimeStamp>(currentTime() * 1000.0)) @@ -71,6 +72,11 @@ void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool m_cancelable = cancelableArg; } +bool Event::isCustomEvent() const +{ + return false; +} + bool Event::isUIEvent() const { return false; @@ -196,7 +202,7 @@ bool Event::isTouchEvent() const bool Event::fromUserGesture() { - if (createdByDOM()) + if (!UserGestureIndicator::processingUserGesture()) return false; const AtomicString& type = this->type(); @@ -247,4 +253,25 @@ void Event::setUnderlyingEvent(PassRefPtr<Event> ue) m_underlyingEvent = ue; } +const AtomicString& Event::aliasedType() const +{ + if (type() == eventNames().focusinEvent) + return eventNames().DOMFocusInEvent; + if (type() == eventNames().focusoutEvent) + return eventNames().DOMFocusOutEvent; + if (type() == eventNames().DOMFocusInEvent) + return eventNames().focusinEvent; + if (type() == eventNames().DOMFocusOutEvent) + return eventNames().focusoutEvent; + + ASSERT_NOT_REACHED(); + return type(); +} + +bool Event::hasAliasedType() const +{ + return type() == eventNames().focusinEvent || type() == eventNames().focusoutEvent || + type() == eventNames().DOMFocusInEvent || type() == eventNames().DOMFocusOutEvent; +} + } // namespace WebCore |