| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 * @param {number=} defaultSidebarHeight | 35 * @param {number=} defaultSidebarHeight |
| 36 */ | 36 */ |
| 37 WebInspector.SplitView = function(isVertical, sidebarSizeSettingName, defaultSid
ebarWidth, defaultSidebarHeight) | 37 WebInspector.SplitView = function(isVertical, sidebarSizeSettingName, defaultSid
ebarWidth, defaultSidebarHeight) |
| 38 { | 38 { |
| 39 WebInspector.View.call(this); | 39 WebInspector.View.call(this); |
| 40 | 40 |
| 41 this.registerRequiredCSS("splitView.css"); | 41 this.registerRequiredCSS("splitView.css"); |
| 42 | 42 |
| 43 this.element.className = "split-view"; | 43 this.element.className = "split-view"; |
| 44 | 44 |
| 45 this._firstElement = this.element.createChild("div", "split-view-contents"); | 45 this._firstElement = this.element.createChild("div", "split-view-contents sc
roll-target"); |
| 46 this._secondElement = this.element.createChild("div", "split-view-contents")
; | 46 this._secondElement = this.element.createChild("div", "split-view-contents s
croll-target"); |
| 47 | 47 |
| 48 this._resizerElement = this.element.createChild("div", "split-view-resizer")
; | 48 this._resizerElement = this.element.createChild("div", "split-view-resizer")
; |
| 49 this.installResizer(this._resizerElement); | 49 this.installResizer(this._resizerElement); |
| 50 this._resizable = true; | 50 this._resizable = true; |
| 51 | 51 |
| 52 this._savedSidebarWidth = defaultSidebarWidth || 200; | 52 this._savedSidebarWidth = defaultSidebarWidth || 200; |
| 53 this._savedSidebarHeight = defaultSidebarHeight || this._savedSidebarWidth; | 53 this._savedSidebarHeight = defaultSidebarHeight || this._savedSidebarWidth; |
| 54 | 54 |
| 55 this._sidebarSizeSettingName = sidebarSizeSettingName; | 55 this._sidebarSizeSettingName = sidebarSizeSettingName; |
| 56 | 56 |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 else | 427 else |
| 428 this._savedSidebarHeight = size; | 428 this._savedSidebarHeight = size; |
| 429 | 429 |
| 430 var sizeSetting = this._sizeSetting(); | 430 var sizeSetting = this._sizeSetting(); |
| 431 if (sizeSetting) | 431 if (sizeSetting) |
| 432 sizeSetting.set(size); | 432 sizeSetting.set(size); |
| 433 }, | 433 }, |
| 434 | 434 |
| 435 __proto__: WebInspector.View.prototype | 435 __proto__: WebInspector.View.prototype |
| 436 } | 436 } |
| OLD | NEW |