| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bottom: this._margins.bottom ? marginValue : 0}; | 77 bottom: this._margins.bottom ? marginValue : 0}; |
| 78 | 78 |
| 79 var minSize = { | 79 var minSize = { |
| 80 width: WebInspector.InspectedPagePlaceholder.Constraints.Width - Mat
h.round(insets.left * zoomFactor) - Math.round(insets.right * zoomFactor), | 80 width: WebInspector.InspectedPagePlaceholder.Constraints.Width - Mat
h.round(insets.left * zoomFactor) - Math.round(insets.right * zoomFactor), |
| 81 height: WebInspector.InspectedPagePlaceholder.Constraints.Height - M
ath.round(insets.top * zoomFactor) - Math.round(insets.bottom * zoomFactor)}; | 81 height: WebInspector.InspectedPagePlaceholder.Constraints.Height - M
ath.round(insets.top * zoomFactor) - Math.round(insets.bottom * zoomFactor)}; |
| 82 | 82 |
| 83 // This view assumes it's always inside the main split view element, not
a sidebar. | 83 // This view assumes it's always inside the main split view element, not
a sidebar. |
| 84 var view = this; | 84 var view = this; |
| 85 while (view) { | 85 while (view) { |
| 86 if ((view instanceof WebInspector.SplitView) && view.sidebarSide()) | 86 if ((view instanceof WebInspector.SplitView) && view.sidebarSide()) |
| 87 insets[view.sidebarSide()] += view.desiredSidebarSize(); | 87 insets[view.sidebarSide()] += view.preferredSidebarSize(); |
| 88 view = view.parentView(); | 88 view = view.parentView(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 var zoomedInsets = { | 91 var zoomedInsets = { |
| 92 top: Math.round(insets.top * zoomFactor), | 92 top: Math.round(insets.top * zoomFactor), |
| 93 left: Math.round(insets.left * zoomFactor), | 93 left: Math.round(insets.left * zoomFactor), |
| 94 bottom: Math.round(insets.bottom * zoomFactor), | 94 bottom: Math.round(insets.bottom * zoomFactor), |
| 95 right: Math.round(insets.right * zoomFactor)}; | 95 right: Math.round(insets.right * zoomFactor)}; |
| 96 | 96 |
| 97 InspectorFrontendHost.setContentsResizingStrategy(zoomedInsets, minSize)
; | 97 InspectorFrontendHost.setContentsResizingStrategy(zoomedInsets, minSize)
; |
| 98 }, | 98 }, |
| 99 | 99 |
| 100 __proto__: WebInspector.View.prototype | 100 __proto__: WebInspector.View.prototype |
| 101 }; | 101 }; |
| OLD | NEW |