Skip to content

Commit c0491f7

Browse files
committed
squash 'resources/unpacked/devtools' changes from da1ed46..52c36e6
52c36e6 DevTools: Refactor Profiler domain interface 5b5a787 DevTools: Use png icon for bezier editor b95270c DevTools: Repick execution context when frames are loaded d2cdcdc [DevTools] Rename entities in js_protocol, remove deprecated ones. f75d989 DevTools: do not load workers from the cloud in the debug mode. 2fb9635 DevTools: follow up to the sources views, make setting screen apear, make shortcuts a simple view. f0784e9 DevTools: migrate sources panel sidebar to views. 077fee1 DevTools: Standardize box shadows 2673630 Revert of [DevTools] Rename entities in js_protocol, remove deprecated ones. (patchset #1 id:1 of https://codereview.chromium.org/2249743002/ ) git-subtree-dir: resources/unpacked/devtools git-subtree-split: 52c36e6
1 parent 52c4e3f commit c0491f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+587
-464
lines changed

devtools.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
'front_end/emulation/TouchModel.js',
238238
],
239239
'devtools_ui_js_files': [
240+
'front_end/ui/bezierSwatch.css',
240241
'front_end/ui/checkboxTextLabel.css',
241242
'front_end/ui/closeButton.css',
242243
'front_end/ui/colorSwatch.css',

front_end/Images/smallIcons.png

84 Bytes
Loading

front_end/Images/smallIcons_2x.png

183 Bytes
Loading

front_end/Images/src/optimize_png.hashes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"resourceGlyphs.svg": "8e1947b1fa4aac49cbc081f85f44d412",
33
"breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
44
"errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
5-
"smallIcons.svg": "502937c3d719c885acb5c18184ac3eca",
5+
"smallIcons.svg": "8a0b5c6bec69c3f17f71fb51245e00d1",
66
"settingsListRemove.svg": "ce9e7c5c5cdaef28e6ee51d9478d5485",
77
"toolbarButtonGlyphs.svg": "195b979b5677122cf2f3b65e8a4d657e",
88
"breakpoint.svg": "69cd92d807259c022791112809b97799",

front_end/Images/src/smallIcons.svg

Lines changed: 13 additions & 0 deletions
Loading

front_end/Images/src/svg2png.hashes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"resourceGlyphs.svg": "8e1947b1fa4aac49cbc081f85f44d412",
33
"breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
44
"errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
5-
"smallIcons.svg": "502937c3d719c885acb5c18184ac3eca",
5+
"smallIcons.svg": "8a0b5c6bec69c3f17f71fb51245e00d1",
66
"settingsListRemove.svg": "ce9e7c5c5cdaef28e6ee51d9478d5485",
77
"toolbarButtonGlyphs.svg": "195b979b5677122cf2f3b65e8a4d657e",
88
"breakpoint.svg": "69cd92d807259c022791112809b97799",

front_end/components/BreakpointsSidebarPaneBase.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ WebInspector.BreakpointsSidebarPaneBase = function()
4545
this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
4646

4747
this.element.appendChild(this.emptyElement);
48-
WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerPaused, this._update, this);
49-
WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebInspector.DebuggerModel.Events.DebuggerResumed, this._update, this);
50-
WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._update, this);
5148
}
5249

5350
WebInspector.BreakpointsSidebarPaneBase.prototype = {
@@ -94,19 +91,5 @@ WebInspector.BreakpointsSidebarPaneBase.prototype = {
9491
}
9592
},
9693

97-
_update: function()
98-
{
99-
var target = WebInspector.context.flavor(WebInspector.Target);
100-
var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
101-
var details = debuggerModel ? debuggerModel.debuggerPausedDetails() : null;
102-
this.highlightDetails(details);
103-
},
104-
105-
/**
106-
* @param {?WebInspector.DebuggerPausedDetails} details
107-
* @protected
108-
*/
109-
highlightDetails: function(details) { },
110-
11194
__proto__: WebInspector.VBox.prototype
11295
}

front_end/components/DOMBreakpointsSidebarPane.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
/**
3232
* @constructor
3333
* @extends {WebInspector.BreakpointsSidebarPaneBase}
34+
* @implements {WebInspector.ContextFlavorListener}
3435
*/
3536
WebInspector.DOMBreakpointsSidebarPane = function()
3637
{
@@ -55,21 +56,20 @@ WebInspector.DOMBreakpointsSidebarPane = function()
5556
this._contextMenuLabels[this._breakpointTypes.AttributeModified] = WebInspector.UIString.capitalize("Attributes ^modifications");
5657
this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UIString.capitalize("Node ^removal");
5758

58-
WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
5959
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.NodeRemoved, this._nodeRemoved, this);
60+
WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.InspectedURLChanged, this._inspectedURLChanged, this);
61+
this._inspectedURL = WebInspector.targetManager.inspectedURL();
62+
this._update();
6063
}
6164

6265
WebInspector.DOMBreakpointsSidebarPane.Marker = "breakpoint-marker";
6366

6467
WebInspector.DOMBreakpointsSidebarPane.prototype = {
65-
_inspectedURLChanged: function(event)
68+
_inspectedURLChanged: function()
6669
{
67-
var target = /** @type {!WebInspector.Target} */ (event.data);
68-
if (target !== WebInspector.targetManager.mainTarget())
69-
return;
7070
this._breakpointElements = {};
7171
this.reset();
72-
this._inspectedURL = target.inspectedURL().removeURLFragment();
72+
this._inspectedURL = WebInspector.targetManager.inspectedURL();
7373
},
7474

7575
/**
@@ -322,10 +322,16 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
322322

323323
/**
324324
* @override
325-
* @param {?WebInspector.DebuggerPausedDetails} details
325+
* @param {?Object} object
326326
*/
327-
highlightDetails: function(details)
327+
flavorChanged: function(object)
328+
{
329+
this._update();
330+
},
331+
332+
_update: function()
328333
{
334+
var details = WebInspector.context.flavor(WebInspector.DebuggerPausedDetails);
329335
if (!details || details.reason !== WebInspector.DebuggerModel.BreakReason.DOM) {
330336
if (this._highlightedElement) {
331337
this._highlightedElement.classList.remove("breakpoint-hit");
@@ -338,7 +344,7 @@ WebInspector.DOMBreakpointsSidebarPane.prototype = {
338344
var element = this._breakpointElements[breakpointId];
339345
if (!element)
340346
return;
341-
WebInspector.viewManager.revealViewWithWidget(this);
347+
WebInspector.viewManager.showView("sources.domBreakpoints");
342348
element.classList.add("breakpoint-hit");
343349
this._highlightedElement = element;
344350
},

front_end/components/ExecutionContextSelector.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ WebInspector.ExecutionContextSelector = function(targetManager, context)
1616

1717
targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextCreated, this._onExecutionContextCreated, this);
1818
targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextDestroyed, this._onExecutionContextDestroyed, this);
19+
targetManager.addModelListener(WebInspector.RuntimeModel, WebInspector.RuntimeModel.Events.ExecutionContextOrderChanged, this._onExecutionContextOrderChanged, this);
1920
this._targetManager = targetManager;
2021
this._context = context;
2122
}
@@ -141,12 +142,7 @@ WebInspector.ExecutionContextSelector.prototype = {
141142
*/
142143
_onExecutionContextCreated: function(event)
143144
{
144-
var executionContext = /** @type {!WebInspector.ExecutionContext} */ (event.data);
145-
if (!this._context.flavor(WebInspector.ExecutionContext) || this._shouldSwitchToContext(executionContext)) {
146-
this._ignoreContextChanged = true;
147-
this._context.setFlavor(WebInspector.ExecutionContext, executionContext);
148-
this._ignoreContextChanged = false;
149-
}
145+
this._switchContextIfNecessary(/** @type {!WebInspector.ExecutionContext} */ (event.data));
150146
},
151147

152148
/**
@@ -159,6 +155,34 @@ WebInspector.ExecutionContextSelector.prototype = {
159155
this._currentExecutionContextGone();
160156
},
161157

158+
/**
159+
* @param {!WebInspector.Event} event
160+
*/
161+
_onExecutionContextOrderChanged: function(event)
162+
{
163+
var runtimeModel = /** @type {!WebInspector.RuntimeModel} */ (event.data);
164+
var executionContexts = runtimeModel.executionContexts();
165+
for (var i = 0; i < executionContexts.length; i++) {
166+
if (this._switchContextIfNecessary(executionContexts[i]))
167+
break;
168+
}
169+
},
170+
171+
/**
172+
* @param {!WebInspector.ExecutionContext} executionContext
173+
* @return {boolean}
174+
*/
175+
_switchContextIfNecessary: function(executionContext)
176+
{
177+
if (!this._context.flavor(WebInspector.ExecutionContext) || this._shouldSwitchToContext(executionContext)) {
178+
this._ignoreContextChanged = true;
179+
this._context.setFlavor(WebInspector.ExecutionContext, executionContext);
180+
this._ignoreContextChanged = false;
181+
return true;
182+
}
183+
return false;
184+
},
185+
162186
_currentExecutionContextGone: function()
163187
{
164188
var targets = this._targetManager.targets(WebInspector.Target.Capability.JS);

front_end/elements/ColorSwatchPopoverIcon.js

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ WebInspector.BezierPopoverIcon = function(treeElement, swatchPopoverHelper, text
1212
{
1313
this._treeElement = treeElement;
1414
this._swatchPopoverHelper = swatchPopoverHelper;
15-
this._createDOM(text);
15+
16+
this._element = createElement("span");
17+
this._iconElement = WebInspector.BezierSwatch.create();
18+
this._iconElement.title = WebInspector.UIString("Open cubic bezier editor");
19+
this._iconElement.addEventListener("click", this._iconClick.bind(this), false);
20+
this._element.appendChild(this._iconElement);
21+
this._bezierValueElement = this._element.createChild("span");
22+
this._bezierValueElement.textContent = text;
1623

1724
this._boundBezierChanged = this._bezierChanged.bind(this);
1825
this._boundOnScroll = this._onScroll.bind(this);
@@ -27,27 +34,6 @@ WebInspector.BezierPopoverIcon.prototype = {
2734
return this._element;
2835
},
2936

30-
/**
31-
* @param {string} text
32-
*/
33-
_createDOM: function(text)
34-
{
35-
this._element = createElement("nobr");
36-
37-
this._iconElement = this._element.createChild("div", "popover-icon bezier-icon");
38-
this._iconElement.title = WebInspector.UIString("Open cubic bezier editor");
39-
var svg = this._iconElement.createSVGChild("svg");
40-
svg.setAttribute("height", 10);
41-
svg.setAttribute("width", 10);
42-
this._iconElement.addEventListener("click", this._iconClick.bind(this), false);
43-
var g = svg.createSVGChild("g");
44-
var path = g.createSVGChild("path");
45-
path.setAttribute("d", "M2,8 C2,3 8,7 8,2");
46-
47-
this._bezierValueElement = this._element.createChild("span");
48-
this._bezierValueElement.textContent = text;
49-
},
50-
5137
/**
5238
* @param {!Event} event
5339
*/

0 commit comments

Comments
 (0)