OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 /** | 27 /** |
28 * @constructor | 28 * @constructor |
29 * @param {string} title | 29 * @param {string} title |
30 * @param {string} subtitle | 30 * @param {string} subtitle |
31 */ | 31 */ |
32 WebInspector.Placard = function(title, subtitle) | 32 WebInspector.Placard = function(title, subtitle) |
33 { | 33 { |
34 this.element = document.createElementWithClass("div", "placard"); | 34 this.element = createElementWithClass("div", "placard"); |
35 this.element.placard = this; | 35 this.element.placard = this; |
36 | 36 |
37 this.subtitleElement = this.element.createChild("div", "subtitle"); | 37 this.subtitleElement = this.element.createChild("div", "subtitle"); |
38 this.titleElement = this.element.createChild("div", "title"); | 38 this.titleElement = this.element.createChild("div", "title"); |
39 | 39 |
40 this._hidden = false; | 40 this._hidden = false; |
41 this.title = title; | 41 this.title = title; |
42 this.subtitle = subtitle; | 42 this.subtitle = subtitle; |
43 this.selected = false; | 43 this.selected = false; |
44 } | 44 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (this._hidden === x) | 123 if (this._hidden === x) |
124 return; | 124 return; |
125 this._hidden = x; | 125 this._hidden = x; |
126 this.element.classList.toggle("hidden", x); | 126 this.element.classList.toggle("hidden", x); |
127 }, | 127 }, |
128 | 128 |
129 discard: function() | 129 discard: function() |
130 { | 130 { |
131 } | 131 } |
132 } | 132 } |
OLD | NEW |