| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 importScript("LayerTreeModel.js"); | 31 importScript("LayerTreeModel.js"); |
| 32 importScript("LayerTree.js"); | 32 importScript("LayerTree.js"); |
| 33 importScript("Layers3DView.js"); |
| 33 | 34 |
| 34 /** | 35 /** |
| 35 * @constructor | 36 * @constructor |
| 36 * @extends {WebInspector.Panel} | 37 * @extends {WebInspector.Panel} |
| 37 */ | 38 */ |
| 38 WebInspector.LayersPanel = function() | 39 WebInspector.LayersPanel = function() |
| 39 { | 40 { |
| 40 WebInspector.Panel.call(this, "layers"); | 41 WebInspector.Panel.call(this, "layers"); |
| 41 this.registerRequiredCSS("layersPanel.css"); | 42 this.registerRequiredCSS("layersPanel.css"); |
| 42 | 43 |
| 43 const initialLayerTreeSidebarWidth = 225; | 44 const initialLayerTreeSidebarWidth = 225; |
| 44 const minimumMainWidthPercent = 0.5; | 45 const minimumMainWidthPercent = 0.5; |
| 45 this.createSidebarViewWithTree(); | 46 this.createSidebarViewWithTree(); |
| 46 this.sidebarElement.addStyleClass("outline-disclosure"); | 47 this.sidebarElement.addStyleClass("outline-disclosure"); |
| 47 this._model = new WebInspector.LayerTreeModel(); | 48 this._model = new WebInspector.LayerTreeModel(); |
| 48 this._layerTree = new WebInspector.LayerTree(this._model, this.sidebarTree); | 49 this._layerTree = new WebInspector.LayerTree(this._model, this.sidebarTree); |
| 49 this._layerDetailsSplitView = new WebInspector.SplitView(false, "layerDetail
sSplitView"); | 50 this._layerDetailsSplitView = new WebInspector.SplitView(false, "layerDetail
sSplitView"); |
| 50 this._layerDetailsSplitView.show(this.splitView.mainElement); | 51 this._layerDetailsSplitView.show(this.splitView.mainElement); |
| 52 this._layers3DView = new WebInspector.Layers3DView(this._model); |
| 53 this._layers3DView.show(this._layerDetailsSplitView.mainElement); |
| 51 } | 54 } |
| 52 | 55 |
| 53 WebInspector.LayersPanel.prototype = { | 56 WebInspector.LayersPanel.prototype = { |
| 54 wasShown: function() | 57 wasShown: function() |
| 55 { | 58 { |
| 56 WebInspector.Panel.prototype.wasShown.call(this); | 59 WebInspector.Panel.prototype.wasShown.call(this); |
| 57 this._layerTree.setVisible(true); | 60 this._layerTree.setVisible(true); |
| 58 this.sidebarTreeElement.focus(); | 61 this.sidebarTreeElement.focus(); |
| 59 }, | 62 }, |
| 60 | 63 |
| 61 willHide: function() | 64 willHide: function() |
| 62 { | 65 { |
| 63 this._layerTree.setVisible(false); | 66 this._layerTree.setVisible(false); |
| 64 WebInspector.Panel.prototype.willHide.call(this); | 67 WebInspector.Panel.prototype.willHide.call(this); |
| 65 }, | 68 }, |
| 66 | 69 |
| 67 __proto__: WebInspector.Panel.prototype | 70 __proto__: WebInspector.Panel.prototype |
| 68 } | 71 } |
| OLD | NEW |