| Index: third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js b/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
|
| index a3f74fce548b2d4641ab845d848af06e54db5beb..ee314ff5a3c077e71bee362ad4fd3245b68f57a4 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/emulation/InspectedPagePlaceholder.js
|
| @@ -1,6 +1,7 @@
|
| // Copyright 2014 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
| +
|
| /**
|
| * @unrestricted
|
| */
|
| @@ -18,7 +19,7 @@ Emulation.InspectedPagePlaceholder = class extends UI.Widget {
|
| onResize() {
|
| if (this._updateId)
|
| this.element.window().cancelAnimationFrame(this._updateId);
|
| - this._updateId = this.element.window().requestAnimationFrame(this.update.bind(this));
|
| + this._updateId = this.element.window().requestAnimationFrame(this.update.bind(this, false));
|
| }
|
|
|
| restoreMinimumSize() {
|
| @@ -42,19 +43,30 @@ Emulation.InspectedPagePlaceholder = class extends UI.Widget {
|
| return {x: left, y: top, width: right - left, height: bottom - top};
|
| }
|
|
|
| - update() {
|
| + /**
|
| + * @param {boolean=} force
|
| + */
|
| + update(force) {
|
| delete this._updateId;
|
| var rect = this._dipPageRect();
|
| var bounds = {
|
| x: Math.round(rect.x),
|
| y: Math.round(rect.y),
|
| height: Math.max(1, Math.round(rect.height)),
|
| - width: Math.max(1, Math.round(rect.width))
|
| + width: Math.max(1, Math.round(rect.width)),
|
| + force: force
|
| };
|
| this.dispatchEventToListeners(Emulation.InspectedPagePlaceholder.Events.Update, bounds);
|
| }
|
| };
|
|
|
| +/**
|
| + * @return {!Emulation.InspectedPagePlaceholder}
|
| + */
|
| +Emulation.InspectedPagePlaceholder.instance = function() {
|
| + return singleton(Emulation.InspectedPagePlaceholder);
|
| +};
|
| +
|
| /** @enum {symbol} */
|
| Emulation.InspectedPagePlaceholder.Events = {
|
| Update: Symbol('Update')
|
|
|