Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: third_party/WebKit/Source/core/events/Event.cpp

Issue 2656343002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Few more Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/Event.cpp
diff --git a/third_party/WebKit/Source/core/events/Event.cpp b/third_party/WebKit/Source/core/events/Event.cpp
index 3b27344d18f2bc32c0bc7bcfa66a1f8fc208276a..8799cc033b1c1d8d2904765ff0619ecea3bf3158 100644
--- a/third_party/WebKit/Source/core/events/Event.cpp
+++ b/third_party/WebKit/Source/core/events/Event.cpp
@@ -22,6 +22,7 @@
#include "core/events/Event.h"
+#include "bindings/core/v8/ScriptState.h"
#include "core/dom/StaticNodeList.h"
#include "core/events/EventDispatchMediator.h"
#include "core/events/EventTarget.h"
@@ -134,21 +135,26 @@ void Event::initEvent(const AtomicString& eventTypeArg,
m_cancelable = cancelableArg;
}
-bool Event::legacyReturnValue(ExecutionContext* executionContext) const {
+bool Event::legacyReturnValue(ScriptState* scriptState) const {
bool returnValue = !defaultPrevented();
- if (returnValue)
- UseCounter::count(executionContext, UseCounter::EventGetReturnValueTrue);
- else
- UseCounter::count(executionContext, UseCounter::EventGetReturnValueFalse);
+ if (returnValue) {
+ UseCounter::count(scriptState->getExecutionContext(),
+ UseCounter::EventGetReturnValueTrue);
+ } else {
+ UseCounter::count(scriptState->getExecutionContext(),
+ UseCounter::EventGetReturnValueFalse);
+ }
return returnValue;
}
-void Event::setLegacyReturnValue(ExecutionContext* executionContext,
- bool returnValue) {
- if (returnValue)
- UseCounter::count(executionContext, UseCounter::EventSetReturnValueTrue);
- else
- UseCounter::count(executionContext, UseCounter::EventSetReturnValueFalse);
+void Event::setLegacyReturnValue(ScriptState* scriptState, bool returnValue) {
+ if (returnValue) {
+ UseCounter::count(scriptState->getExecutionContext(),
+ UseCounter::EventSetReturnValueTrue);
+ } else {
+ UseCounter::count(scriptState->getExecutionContext(),
+ UseCounter::EventSetReturnValueFalse);
+ }
setDefaultPrevented(!returnValue);
}
@@ -335,7 +341,7 @@ double Event::timeStamp(ScriptState* scriptState) const {
return timeStamp;
}
-void Event::setCancelBubble(ExecutionContext* context, bool cancel) {
+void Event::setCancelBubble(ScriptState* scriptState, bool cancel) {
if (cancel)
m_propagationStopped = true;
}
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.h ('k') | third_party/WebKit/Source/core/events/Event.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698