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

Unified Diff: Source/devtools/front_end/LayersPanel.js

Issue 224843014: DevTools: support importing layer tree from trace snapshots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased, removed redundant transform handling code Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/LayerTreeModel.js ('k') | Source/devtools/front_end/TimelineTracingView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/LayersPanel.js
diff --git a/Source/devtools/front_end/LayersPanel.js b/Source/devtools/front_end/LayersPanel.js
index 577245a60b8925f9b5f248898dedaa0b76b7c021..c280ecdda9a1b55b67dcd2ff38a3aead45740af0 100644
--- a/Source/devtools/front_end/LayersPanel.js
+++ b/Source/devtools/front_end/LayersPanel.js
@@ -101,6 +101,14 @@ WebInspector.LayersPanel.prototype = {
this._model.setSnapshot(snapshot);
},
+ /**
+ * @param {!WebInspector.TracingLayerSnapshot} snapshot
+ */
+ _showTracingSnapshot: function(snapshot)
+ {
+ this._model.setTracingSnapshot(snapshot);
+ },
+
_onLayerTreeUpdated: function()
{
if (this._currentlySelectedLayer && !this._model.layerById(this._currentlySelectedLayer.id()))
@@ -185,11 +193,13 @@ WebInspector.LayersPanel.LayerTreeRevealer = function()
WebInspector.LayersPanel.LayerTreeRevealer.prototype = {
/**
- * @param {!Object} layerTree
+ * @param {!Object} snapshotData
*/
- reveal: function(layerTree)
+ reveal: function(snapshotData)
{
- if (layerTree instanceof WebInspector.LayerTreeSnapshot)
- /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView.showPanel("layers"))._showSnapshot(layerTree);
+ if (snapshotData instanceof WebInspector.LayerTreeSnapshot)
+ /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView.showPanel("layers"))._showSnapshot(snapshotData);
+ else if (snapshotData instanceof WebInspector.TracingLayerSnapshot)
+ /** @type {!WebInspector.LayersPanel} */ (WebInspector.inspectorView.showPanel("layers"))._showTracingSnapshot(snapshotData);
}
}
« no previous file with comments | « Source/devtools/front_end/LayerTreeModel.js ('k') | Source/devtools/front_end/TimelineTracingView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698