| Index: chrome/browser/resources/pdf/gesture_detector.js
|
| diff --git a/chrome/browser/resources/pdf/gesture_detector.js b/chrome/browser/resources/pdf/gesture_detector.js
|
| index fde4650d92bbbc6db1d8ed7aa7259c90a9e144c3..e5fbccffb108a945c0567eec29e35c8908ea8170 100644
|
| --- a/chrome/browser/resources/pdf/gesture_detector.js
|
| +++ b/chrome/browser/resources/pdf/gesture_detector.js
|
| @@ -17,22 +17,19 @@ class GestureDetector {
|
| this.element_ = element;
|
|
|
| this.element_.addEventListener(
|
| - 'touchstart', this.onTouchStart_.bind(this), { passive: false });
|
| + 'touchstart', this.onTouchStart_.bind(this), {passive: false});
|
| this.element_.addEventListener(
|
| - 'touchmove', this.onTouch_.bind(this), { passive: true });
|
| + 'touchmove', this.onTouch_.bind(this), {passive: true});
|
| this.element_.addEventListener(
|
| - 'touchend', this.onTouch_.bind(this), { passive: true });
|
| + 'touchend', this.onTouch_.bind(this), {passive: true});
|
| this.element_.addEventListener(
|
| - 'touchcancel', this.onTouch_.bind(this), { passive: true });
|
| + 'touchcancel', this.onTouch_.bind(this), {passive: true});
|
|
|
| this.pinchStartEvent_ = null;
|
| this.lastEvent_ = null;
|
|
|
| - this.listeners_ = new Map([
|
| - ['pinchstart', []],
|
| - ['pinchupdate', []],
|
| - ['pinchend', []]
|
| - ]);
|
| + this.listeners_ =
|
| + new Map([['pinchstart', []], ['pinchupdate', []], ['pinchend', []]]);
|
| }
|
|
|
| /**
|
| @@ -70,10 +67,8 @@ class GestureDetector {
|
| event.preventDefault();
|
| this.pinchStartEvent_ = event;
|
| this.lastEvent_ = event;
|
| - this.notify_({
|
| - type: 'pinchstart',
|
| - center: GestureDetector.center_(event)
|
| - });
|
| + this.notify_(
|
| + {type: 'pinchstart', center: GestureDetector.center_(event)});
|
| }
|
| }
|
|
|
| @@ -104,8 +99,8 @@ class GestureDetector {
|
| }
|
|
|
| let scaleRatio = GestureDetector.pinchScaleRatio_(event, this.lastEvent_);
|
| - let startScaleRatio = GestureDetector.pinchScaleRatio_(
|
| - event, this.pinchStartEvent_);
|
| + let startScaleRatio =
|
| + GestureDetector.pinchScaleRatio_(event, this.pinchStartEvent_);
|
| let center = GestureDetector.center_(event);
|
| this.notify_({
|
| type: 'pinchupdate',
|
|
|