| Index: Source/core/events/Event.cpp
|
| diff --git a/Source/core/events/Event.cpp b/Source/core/events/Event.cpp
|
| index fcd6644dcd569c3a27580082af10c4441f625892..205ae2b828d3de4f2911ece1104b3dafc939968f 100644
|
| --- a/Source/core/events/Event.cpp
|
| +++ b/Source/core/events/Event.cpp
|
| @@ -25,6 +25,7 @@
|
|
|
| #include "core/dom/StaticNodeList.h"
|
| #include "core/events/EventTarget.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "wtf/CurrentTime.h"
|
|
|
| namespace WebCore {
|
| @@ -101,6 +102,25 @@ void Event::initEvent(const AtomicString& eventTypeArg, bool canBubbleArg, bool
|
| m_cancelable = cancelableArg;
|
| }
|
|
|
| +bool Event::legacyReturnValue(ExecutionContext* executionContext) const
|
| +{
|
| + bool returnValue = !defaultPrevented();
|
| + if (returnValue)
|
| + UseCounter::count(executionContext, UseCounter::EventGetReturnValueTrue);
|
| + else
|
| + UseCounter::count(executionContext, UseCounter::EventGetReturnValueFalse);
|
| + return returnValue;
|
| +}
|
| +
|
| +void Event::setLegacyReturnValue(ExecutionContext* executionContext, bool returnValue)
|
| +{
|
| + if (returnValue)
|
| + UseCounter::count(executionContext, UseCounter::EventSetReturnValueTrue);
|
| + else
|
| + UseCounter::count(executionContext, UseCounter::EventSetReturnValueFalse);
|
| + setDefaultPrevented(!returnValue);
|
| +}
|
| +
|
| const AtomicString& Event::interfaceName() const
|
| {
|
| return EventNames::Event;
|
|
|