| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 /** | 247 /** |
| 248 * @param {!Element} element | 248 * @param {!Element} element |
| 249 */ | 249 */ |
| 250 _updateLayerElement: function(element) | 250 _updateLayerElement: function(element) |
| 251 { | 251 { |
| 252 var layer = element.__layerDetails.layer; | 252 var layer = element.__layerDetails.layer; |
| 253 var style = element.style; | 253 var style = element.style; |
| 254 var isContentRoot = layer === this._model.contentRoot(); | 254 var isContentRoot = layer === this._model.contentRoot(); |
| 255 var parentElement = isContentRoot ? this._rotatingContainerElement : thi
s._elementForLayer(layer.parent()); | 255 var parentElement = isContentRoot ? this._rotatingContainerElement : thi
s._elementForLayer(layer.parent()); |
| 256 element.__layerDetails.depth = parentElement.__layerDetails ? parentElem
ent.__layerDetails.depth + 1 : 0; | 256 element.__layerDetails.depth = parentElement.__layerDetails ? parentElem
ent.__layerDetails.depth + 1 : 0; |
| 257 element.enableStyleClass("invisible", layer.invisible()); | 257 element.classList.toggle("invisible", layer.invisible()); |
| 258 this._updateElementColor(element); | 258 this._updateElementColor(element); |
| 259 if (parentElement !== element.parentElement) | 259 if (parentElement !== element.parentElement) |
| 260 parentElement.appendChild(element); | 260 parentElement.appendChild(element); |
| 261 | 261 |
| 262 style.width = layer.width() + "px"; | 262 style.width = layer.width() + "px"; |
| 263 style.height = layer.height() + "px"; | 263 style.height = layer.height() + "px"; |
| 264 this._updatePaintRect(element); | 264 this._updatePaintRect(element); |
| 265 if (isContentRoot) | 265 if (isContentRoot) |
| 266 return; | 266 return; |
| 267 | 267 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 * @param {!WebInspector.Layer} layer | 440 * @param {!WebInspector.Layer} layer |
| 441 * @param {!Element} paintRectElement | 441 * @param {!Element} paintRectElement |
| 442 */ | 442 */ |
| 443 WebInspector.LayerDetails = function(layer, paintRectElement) | 443 WebInspector.LayerDetails = function(layer, paintRectElement) |
| 444 { | 444 { |
| 445 this.layer = layer; | 445 this.layer = layer; |
| 446 this.depth = 0; | 446 this.depth = 0; |
| 447 this.paintRectElement = paintRectElement; | 447 this.paintRectElement = paintRectElement; |
| 448 this.paintCount = 0; | 448 this.paintCount = 0; |
| 449 } | 449 } |
| OLD | NEW |