Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: Source/devtools/front_end/Layers3DView.js

Issue 182113004: DevTools: Get rid of Element.prototype.enableStyleClass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/LayerTree.js ('k') | Source/devtools/front_end/NetworkPanel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/LayerTree.js ('k') | Source/devtools/front_end/NetworkPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698