| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 "layerForScrollbar": WebInspector.UIString("Layer for scrollbar."), | 81 "layerForScrollbar": WebInspector.UIString("Layer for scrollbar."), |
| 82 "layerForScrollingContainer": WebInspector.UIString("Layer for scrolling con
tainer."), | 82 "layerForScrollingContainer": WebInspector.UIString("Layer for scrolling con
tainer."), |
| 83 "layerForForeground": WebInspector.UIString("Layer for foreground."), | 83 "layerForForeground": WebInspector.UIString("Layer for foreground."), |
| 84 "layerForBackground": WebInspector.UIString("Layer for background."), | 84 "layerForBackground": WebInspector.UIString("Layer for background."), |
| 85 "layerForMask": WebInspector.UIString("Layer for mask."), | 85 "layerForMask": WebInspector.UIString("Layer for mask."), |
| 86 "layerForVideoOverlay": WebInspector.UIString("Layer for video overlay.") | 86 "layerForVideoOverlay": WebInspector.UIString("Layer for video overlay.") |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 WebInspector.LayerDetailsView.prototype = { | 89 WebInspector.LayerDetailsView.prototype = { |
| 90 /** | 90 /** |
| 91 * @param {!WebInspector.Layers3DView.ActiveObject} activeObject | 91 * @param {?WebInspector.Layers3DView.ActiveObject} activeObject |
| 92 */ | 92 */ |
| 93 setObject: function(activeObject) | 93 setObject: function(activeObject) |
| 94 { | 94 { |
| 95 this._layer = activeObject ? activeObject.layer : null; | 95 this._layer = activeObject ? activeObject.layer : null; |
| 96 this._scrollRectIndex = activeObject ? activeObject.scrollRectIndex : nu
ll; | 96 this._scrollRectIndex = activeObject ? activeObject.scrollRectIndex : nu
ll; |
| 97 if (this.isShowing()) | 97 if (this.isShowing()) |
| 98 this.update(); | 98 this.update(); |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 wasShown: function() | 101 wasShown: function() |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 /** | 175 /** |
| 176 * @param {!Array.<string>} compositingReasons | 176 * @param {!Array.<string>} compositingReasons |
| 177 */ | 177 */ |
| 178 _updateCompositingReasons: function(compositingReasons) | 178 _updateCompositingReasons: function(compositingReasons) |
| 179 { | 179 { |
| 180 if (!compositingReasons || !compositingReasons.length) { | 180 if (!compositingReasons || !compositingReasons.length) { |
| 181 this._compositingReasonsCell.textContent = "n/a"; | 181 this._compositingReasonsCell.textContent = "n/a"; |
| 182 return; | 182 return; |
| 183 } | 183 } |
| 184 var fragment = createDocumentFragment(); | 184 this._compositingReasonsCell.removeChildren(); |
| 185 var list = this._compositingReasonsCell.createChild("ul"); |
| 185 for (var i = 0; i < compositingReasons.length; ++i) { | 186 for (var i = 0; i < compositingReasons.length; ++i) { |
| 186 if (i) | 187 var text = WebInspector.LayerDetailsView.CompositingReasonDetail[com
positingReasons[i]] || compositingReasons[i]; |
| 187 fragment.createTextChild(","); | 188 // If the text is more than one word but does not terminate with per
iod, add the period. |
| 188 var span = createElement("span"); | 189 if (/\s.*[^.]$/.test(text)) |
| 189 span.title = WebInspector.LayerDetailsView.CompositingReasonDetail[c
ompositingReasons[i]] || ""; | 190 text += "."; |
| 190 span.textContent = compositingReasons[i]; | 191 list.createChild("li").textContent = text; |
| 191 fragment.appendChild(span); | |
| 192 } | 192 } |
| 193 this._compositingReasonsCell.removeChildren(); | |
| 194 this._compositingReasonsCell.appendChild(fragment); | |
| 195 }, | 193 }, |
| 196 | 194 |
| 197 __proto__: WebInspector.VBox.prototype | 195 __proto__: WebInspector.VBox.prototype |
| 198 } | 196 } |
| OLD | NEW |