mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Black box sources before deciding whether to stage them for later addition (bug 1038117). r=fitzgen
--HG-- extra : rebase_source : dfedcab97b91ae75c9ef5c63d4e1489a49576330
This commit is contained in:
parent
ae94bd1ca7
commit
c9f4e1f365
@ -1238,9 +1238,9 @@ SourceScripts.prototype = {
|
||||
const item = DebuggerView.Sources.getItemByValue(url);
|
||||
if (item) {
|
||||
if (isBlackBoxed) {
|
||||
item.target.classList.add("black-boxed");
|
||||
item.prebuiltNode.classList.add("black-boxed");
|
||||
} else {
|
||||
item.target.classList.remove("black-boxed");
|
||||
item.prebuiltNode.classList.remove("black-boxed");
|
||||
}
|
||||
}
|
||||
DebuggerView.Sources.updateToolbarButtonsState();
|
||||
|
@ -146,8 +146,13 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
|
||||
contents.setAttribute("flex", "1");
|
||||
contents.setAttribute("tooltiptext", unicodeUrl);
|
||||
|
||||
// If the source is blackboxed, apply the appropriate style.
|
||||
if (gThreadClient.source(aSource).isBlackBoxed) {
|
||||
contents.classList.add("black-boxed");
|
||||
}
|
||||
|
||||
// Append a source item to this container.
|
||||
const item = this.push([contents, fullUrl], {
|
||||
this.push([contents, fullUrl], {
|
||||
staged: aOptions.staged, /* stage the item to be appended later? */
|
||||
attachment: {
|
||||
label: label,
|
||||
@ -157,11 +162,6 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
|
||||
source: aSource
|
||||
}
|
||||
});
|
||||
|
||||
// If source is blackboxed, apply appropriate style
|
||||
if (gThreadClient.source(aSource).isBlackBoxed) {
|
||||
item.target.classList.add("black-boxed");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -752,8 +752,11 @@ function getBlackBoxButton(aPanel) {
|
||||
return aPanel.panelWin.document.getElementById("black-box");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the node that has the black-boxed class applied to it.
|
||||
*/
|
||||
function getSelectedSourceElement(aPanel) {
|
||||
return gPanel.panelWin.DebuggerView.Sources.selectedItem.target;
|
||||
return aPanel.panelWin.DebuggerView.Sources.selectedItem.prebuiltNode;
|
||||
}
|
||||
|
||||
function toggleBlackBoxing(aPanel, aSource = null) {
|
||||
|
@ -504,6 +504,7 @@ function Item(aOwnerView, aElement, aValue, aAttachment) {
|
||||
Item.prototype = {
|
||||
get value() { return this._value; },
|
||||
get target() { return this._target; },
|
||||
get prebuiltNode() { return this._prebuiltNode; },
|
||||
|
||||
/**
|
||||
* Immediately appends a child item to this item.
|
||||
|
Loading…
Reference in New Issue
Block a user