Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| index ee63ffe5098f3d38bc11c4c324cce5675df8611c..09e49930e7496c9e7e8cda1742ede18f00c2d3c1 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js |
| @@ -591,7 +591,7 @@ WebInspector.RemoteObjectImpl.prototype = { |
| /** |
| * @suppressReceiverCheck |
| * @this {Node} |
| - * @return {function(this:Node, string, function(), boolean=): undefined} |
| + * @return {function(this:Node, string, function(), boolean=, boolean=): undefined} |
| */ |
| function nodeRemoveEventListener() |
| { |
| @@ -600,11 +600,19 @@ WebInspector.RemoteObjectImpl.prototype = { |
| * @param {string} type |
| * @param {function()} handler |
| * @param {boolean=} useCapture |
| + * @param {boolean=} passive |
| * @this {Node} |
| */ |
| - function removeEventListenerWrapper(type, handler, useCapture) |
| + function removeEventListenerWrapper(type, handler, useCapture, passive) |
| { |
| - this.removeEventListener(type, handler, useCapture); |
| + function eventListenerOptions() { |
|
pfeldman
2016/03/30 17:43:05
{ goes next line.
dtapuska
2016/03/30 20:59:48
Done.
|
| + if (passive) { |
|
pfeldman
2016/03/30 17:43:04
drop {}
dtapuska
2016/03/30 20:59:48
Done.
|
| + return {"capture": useCapture, "passive": passive}; |
| + } else { |
| + return useCapture; |
|
pfeldman
2016/03/30 17:43:04
JSDoc return type. Can we always use the {"capture
dtapuska
2016/03/30 17:47:16
We might temporarily disable passive event listene
dtapuska
2016/03/30 20:59:47
If I JSDoc this it fails passing it into the remov
|
| + } |
| + } |
| + this.removeEventListener(type, handler, eventListenerOptions()); |
| if (this["on" + type]) |
| this["on" + type] = null; |
| } |
| @@ -619,6 +627,7 @@ WebInspector.RemoteObjectImpl.prototype = { |
| return new WebInspector.EventListener(this._target, |
| payload.type, |
| payload.useCapture, |
| + payload.passive, |
| payload.handler ? this.target().runtimeModel.createRemoteObject(payload.handler) : null, |
| payload.originalHandler ? this.target().runtimeModel.createRemoteObject(payload.originalHandler) : null, |
| WebInspector.DebuggerModel.Location.fromPayload(this._debuggerModel, payload.location), |