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

Side by Side Diff: Source/devtools/front_end/timeline/LayerDetailsView.js

Issue 711423002: DevTools: better visual feedback for hovered objects is Layers3DView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.Selection} selection
92 */ 92 */
93 setObject: function(activeObject) 93 setObject: function(selection)
94 { 94 {
95 this._layer = activeObject ? activeObject.layer : null; 95 this._layer = selection ? selection.layer : null;
96 this._scrollRectIndex = activeObject ? activeObject.scrollRectIndex : nu ll; 96 this._scrollRectIndex = selection ? selection.scrollRectIndex : null;
97 if (this.isShowing()) 97 if (this.isShowing())
98 this.update(); 98 this.update();
99 }, 99 },
100 100
101 wasShown: function() 101 wasShown: function()
102 { 102 {
103 WebInspector.View.prototype.wasShown.call(this); 103 WebInspector.View.prototype.wasShown.call(this);
104 this.update(); 104 this.update();
105 }, 105 },
106 106
107 /** 107 /**
108 * @param {number} index 108 * @param {number} index
109 * @param {!Event} event 109 * @param {!Event} event
110 */ 110 */
111 _onScrollRectClicked: function(index, event) 111 _onScrollRectClicked: function(index, event)
112 { 112 {
113 if (event.which !== 1) 113 if (event.which !== 1)
114 return; 114 return;
115 this.dispatchEventToListeners(WebInspector.LayerDetailsView.Events.Objec tSelected, {layer: this._layer, scrollRectIndex: index}); 115 this.dispatchEventToListeners(WebInspector.LayerDetailsView.Events.Objec tSelected, new WebInspector.Layers3DView.ScrollRectSelection(this._layer, index) );
116 }, 116 },
117 117
118 /** 118 /**
119 * @param {!LayerTreeAgent.ScrollRect} scrollRect 119 * @param {!LayerTreeAgent.ScrollRect} scrollRect
120 * @param {number} index 120 * @param {number} index
121 */ 121 */
122 _createScrollRectElement: function(scrollRect, index) 122 _createScrollRectElement: function(scrollRect, index)
123 { 123 {
124 if (index) 124 if (index)
125 this._scrollRectsCell.createTextChild(", "); 125 this._scrollRectsCell.createTextChild(", ");
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 var text = WebInspector.LayerDetailsView.CompositingReasonDetail[com positingReasons[i]] || compositingReasons[i]; 187 var text = WebInspector.LayerDetailsView.CompositingReasonDetail[com positingReasons[i]] || compositingReasons[i];
188 // If the text is more than one word but does not terminate with per iod, add the period. 188 // If the text is more than one word but does not terminate with per iod, add the period.
189 if (/\s.*[^.]$/.test(text)) 189 if (/\s.*[^.]$/.test(text))
190 text += "."; 190 text += ".";
191 list.createChild("li").textContent = text; 191 list.createChild("li").textContent = text;
192 } 192 }
193 }, 193 },
194 194
195 __proto__: WebInspector.VBox.prototype 195 __proto__: WebInspector.VBox.prototype
196 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698