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 { |
11 WebInspector.View.call(this); | 11 WebInspector.View.call(this); |
12 WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.Zo
omChanged, this._onZoomChanged, this); | 12 WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.Zo
omChanged, this._onZoomChanged, this); |
13 this._margins = { top: false, right: false, bottom: false, left: false }; | 13 this._margins = { top: false, right: false, bottom: false, left: false }; |
14 this.setMinimumSize(WebInspector.InspectedPagePlaceholder.Constraints.Width,
WebInspector.InspectedPagePlaceholder.Constraints.Height); | 14 this.setConstraints(WebInspector.InspectedPagePlaceholder.Constraints.Width,
WebInspector.InspectedPagePlaceholder.Constraints.Height); |
15 }; | 15 }; |
16 | 16 |
17 WebInspector.InspectedPagePlaceholder.Constraints = { | 17 WebInspector.InspectedPagePlaceholder.Constraints = { |
18 Width: 50, | 18 Width: 50, |
19 Height: 50 | 19 Height: 50 |
20 }; | 20 }; |
21 | 21 |
22 WebInspector.InspectedPagePlaceholder.MarginValue = 3; | 22 WebInspector.InspectedPagePlaceholder.MarginValue = 3; |
23 | 23 |
24 WebInspector.InspectedPagePlaceholder.prototype = { | 24 WebInspector.InspectedPagePlaceholder.prototype = { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 top: Math.ceil(insets.top), | 107 top: Math.ceil(insets.top), |
108 left: Math.ceil(insets.left), | 108 left: Math.ceil(insets.left), |
109 right: Math.ceil(insets.right), | 109 right: Math.ceil(insets.right), |
110 bottom: Math.ceil(insets.bottom)}; | 110 bottom: Math.ceil(insets.bottom)}; |
111 | 111 |
112 InspectorFrontendHost.setContentsResizingStrategy(roundedInsets, minSize
); | 112 InspectorFrontendHost.setContentsResizingStrategy(roundedInsets, minSize
); |
113 }, | 113 }, |
114 | 114 |
115 __proto__: WebInspector.View.prototype | 115 __proto__: WebInspector.View.prototype |
116 }; | 116 }; |
OLD | NEW |