| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.View} | 7 * @extends {WebInspector.View} |
| 8 */ | 8 */ |
| 9 WebInspector.InspectedPagePlaceholder = function() | 9 WebInspector.InspectedPagePlaceholder = function() |
| 10 { | 10 { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 var bottom = Math.min(rect.bottom * zoomFactor - this._margins.bottom, b
odyRect.bottom * zoomFactor); | 108 var bottom = Math.min(rect.bottom * zoomFactor - this._margins.bottom, b
odyRect.bottom * zoomFactor); |
| 109 var right = Math.min(rect.right * zoomFactor - this._margins.right, body
Rect.right * zoomFactor); | 109 var right = Math.min(rect.right * zoomFactor - this._margins.right, body
Rect.right * zoomFactor); |
| 110 | 110 |
| 111 return { x: left, y: top, width: right - left, height: bottom - top }; | 111 return { x: left, y: top, width: right - left, height: bottom - top }; |
| 112 }, | 112 }, |
| 113 | 113 |
| 114 update: function() | 114 update: function() |
| 115 { | 115 { |
| 116 delete this._updateId; | 116 delete this._updateId; |
| 117 var rect = this._dipPageRect(); | 117 var rect = this._dipPageRect(); |
| 118 var bounds = { x: Math.round(rect.x), y: Math.round(rect.y), height: Mat
h.round(rect.height), width: Math.round(rect.width) }; | 118 var bounds = { x: Math.round(rect.x), y: Math.round(rect.y), height: Mat
h.max(1, Math.round(rect.height)), width: Math.max(1, Math.round(rect.width)) }; |
| 119 this.dispatchEventToListeners(WebInspector.InspectedPagePlaceholder.Even
ts.Update, bounds); | 119 this.dispatchEventToListeners(WebInspector.InspectedPagePlaceholder.Even
ts.Update, bounds); |
| 120 }, | 120 }, |
| 121 | 121 |
| 122 __proto__: WebInspector.View.prototype | 122 __proto__: WebInspector.View.prototype |
| 123 }; | 123 }; |
| OLD | NEW |