зеркало из https://github.com/mozilla/gecko-dev.git
Merge latest green inbound changeset to mozilla-central
This commit is contained in:
Коммит
87b7821302
|
@ -1025,7 +1025,7 @@ SourceScripts.prototype = {
|
||||||
connect: function SS_connect() {
|
connect: function SS_connect() {
|
||||||
dumpn("SourceScripts is connecting...");
|
dumpn("SourceScripts is connecting...");
|
||||||
this.debuggerClient.addListener("newGlobal", this._onNewGlobal);
|
this.debuggerClient.addListener("newGlobal", this._onNewGlobal);
|
||||||
this.activeThread.addListener("newSource", this._onNewSource);
|
this.debuggerClient.addListener("newSource", this._onNewSource);
|
||||||
this._handleTabNavigation();
|
this._handleTabNavigation();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1039,7 +1039,7 @@ SourceScripts.prototype = {
|
||||||
dumpn("SourceScripts is disconnecting...");
|
dumpn("SourceScripts is disconnecting...");
|
||||||
window.clearTimeout(this._newSourceTimeout);
|
window.clearTimeout(this._newSourceTimeout);
|
||||||
this.debuggerClient.removeListener("newGlobal", this._onNewGlobal);
|
this.debuggerClient.removeListener("newGlobal", this._onNewGlobal);
|
||||||
this.activeThread.removeListener("newSource", this._onNewSource);
|
this.debuggerClient.removeListener("newSource", this._onNewSource);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1110,7 +1110,7 @@ SourceScripts.prototype = {
|
||||||
*/
|
*/
|
||||||
_onSourcesAdded: function SS__onSourcesAdded(aResponse) {
|
_onSourcesAdded: function SS__onSourcesAdded(aResponse) {
|
||||||
if (aResponse.error) {
|
if (aResponse.error) {
|
||||||
Cu.reportError("Error getting sources: " + aResponse.error);
|
Cu.reportError("Error getting sources: " + aResponse.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1175,8 +1175,8 @@ SourceScripts.prototype = {
|
||||||
window.clearTimeout(fetchTimeout);
|
window.clearTimeout(fetchTimeout);
|
||||||
|
|
||||||
if (aResponse.error) {
|
if (aResponse.error) {
|
||||||
Cu.reportError("Error loading: " + aSource.url + "\n" + aResponse.error);
|
Cu.reportError("Error loading: " + aSource.url + "\n" + aResponse.message);
|
||||||
return void aCallback(aSource.url, "");
|
return void aCallback(aSource.url, "", aResponse.error);
|
||||||
}
|
}
|
||||||
aSource.loaded = true;
|
aSource.loaded = true;
|
||||||
aSource.text = aResponse.source;
|
aSource.text = aResponse.source;
|
||||||
|
|
|
@ -1706,7 +1706,11 @@ create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, {
|
||||||
* @param string aContents
|
* @param string aContents
|
||||||
* The text contents of the source.
|
* The text contents of the source.
|
||||||
*/
|
*/
|
||||||
_onFetchSourceFinished: function DVGS__onFetchSourceFinished(aLocation, aContents) {
|
_onFetchSourceFinished: function DVGS__onFetchSourceFinished(aLocation, aContents, aError) {
|
||||||
|
if (aError) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Remember the source in a cache so we don't have to fetch it again.
|
// Remember the source in a cache so we don't have to fetch it again.
|
||||||
this._cache.set(aLocation, aContents);
|
this._cache.set(aLocation, aContents);
|
||||||
|
|
||||||
|
|
|
@ -484,7 +484,14 @@ function clickAndSwitch() {
|
||||||
ok(false, "How did you get here?");
|
ok(false, "How did you get here?");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, gFilteredSources.visibleItems[0].target);
|
|
||||||
|
ok(gFilteredSources._container._parent.querySelectorAll(".dbg-source-item")[0]
|
||||||
|
.classList.contains("dbg-source-item"),
|
||||||
|
"The first visible item target isn't the correct one.");
|
||||||
|
|
||||||
|
EventUtils.sendMouseEvent({ type: "click" },
|
||||||
|
gFilteredSources._container._parent.querySelector(".dbg-source-item"),
|
||||||
|
gDebugger);
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickAndSwitchAgain() {
|
function clickAndSwitchAgain() {
|
||||||
|
@ -564,7 +571,14 @@ function clickAndSwitchAgain() {
|
||||||
ok(false, "How did you get here?");
|
ok(false, "How did you get here?");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
EventUtils.sendMouseEvent({ type: "click" }, gFilteredSources.visibleItems[2].target);
|
|
||||||
|
ok(gFilteredSources._container._parent.querySelectorAll(".dbg-source-item")[2]
|
||||||
|
.classList.contains("dbg-source-item"),
|
||||||
|
"The first visible item target isn't the correct one.");
|
||||||
|
|
||||||
|
EventUtils.sendMouseEvent({ type: "click" },
|
||||||
|
gFilteredSources._container._parent.querySelectorAll(".dbg-source-item")[2],
|
||||||
|
gDebugger);
|
||||||
}
|
}
|
||||||
|
|
||||||
function switchFocusWithEscape() {
|
function switchFocusWithEscape() {
|
||||||
|
|
|
@ -154,6 +154,7 @@ function ResponsiveUI(aWindow, aTab)
|
||||||
this.bound_addPreset = this.addPreset.bind(this);
|
this.bound_addPreset = this.addPreset.bind(this);
|
||||||
this.bound_removePreset = this.removePreset.bind(this);
|
this.bound_removePreset = this.removePreset.bind(this);
|
||||||
this.bound_rotate = this.rotate.bind(this);
|
this.bound_rotate = this.rotate.bind(this);
|
||||||
|
this.bound_close = this.close.bind(this);
|
||||||
this.bound_startResizing = this.startResizing.bind(this);
|
this.bound_startResizing = this.startResizing.bind(this);
|
||||||
this.bound_stopResizing = this.stopResizing.bind(this);
|
this.bound_stopResizing = this.stopResizing.bind(this);
|
||||||
this.bound_onDrag = this.onDrag.bind(this);
|
this.bound_onDrag = this.onDrag.bind(this);
|
||||||
|
@ -183,7 +184,7 @@ function ResponsiveUI(aWindow, aTab)
|
||||||
|
|
||||||
ResponsiveUI.prototype = {
|
ResponsiveUI.prototype = {
|
||||||
_transitionsEnabled: true,
|
_transitionsEnabled: true,
|
||||||
_floatingScrollbars: false, // See bug 799471
|
_floatingScrollbars: true,
|
||||||
get transitionsEnabled() this._transitionsEnabled,
|
get transitionsEnabled() this._transitionsEnabled,
|
||||||
set transitionsEnabled(aValue) {
|
set transitionsEnabled(aValue) {
|
||||||
this._transitionsEnabled = aValue;
|
this._transitionsEnabled = aValue;
|
||||||
|
@ -222,6 +223,7 @@ ResponsiveUI.prototype = {
|
||||||
this.tab.removeEventListener("TabClose", this);
|
this.tab.removeEventListener("TabClose", this);
|
||||||
this.tabContainer.removeEventListener("TabSelect", this);
|
this.tabContainer.removeEventListener("TabSelect", this);
|
||||||
this.rotatebutton.removeEventListener("command", this.bound_rotate, true);
|
this.rotatebutton.removeEventListener("command", this.bound_rotate, true);
|
||||||
|
this.closebutton.removeEventListener("command", this.bound_close, true);
|
||||||
this.addbutton.removeEventListener("command", this.bound_addPreset, true);
|
this.addbutton.removeEventListener("command", this.bound_addPreset, true);
|
||||||
this.removebutton.removeEventListener("command", this.bound_removePreset, true);
|
this.removebutton.removeEventListener("command", this.bound_removePreset, true);
|
||||||
|
|
||||||
|
@ -292,6 +294,7 @@ ResponsiveUI.prototype = {
|
||||||
* <toolbar class="devtools-toolbar devtools-responsiveui-toolbar">
|
* <toolbar class="devtools-toolbar devtools-responsiveui-toolbar">
|
||||||
* <menulist class="devtools-menulist"/> // presets
|
* <menulist class="devtools-menulist"/> // presets
|
||||||
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" label="rotate"/> // rotate
|
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" label="rotate"/> // rotate
|
||||||
|
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton devtools-closebutton" tooltiptext="Leave Responsive Design View"/> // close
|
||||||
* </toolbar>
|
* </toolbar>
|
||||||
* <stack class="browserStack"> From tabbrowser.xml
|
* <stack class="browserStack"> From tabbrowser.xml
|
||||||
* <browser/>
|
* <browser/>
|
||||||
|
@ -334,6 +337,13 @@ ResponsiveUI.prototype = {
|
||||||
this.rotatebutton.className = "devtools-toolbarbutton";
|
this.rotatebutton.className = "devtools-toolbarbutton";
|
||||||
this.rotatebutton.addEventListener("command", this.bound_rotate, true);
|
this.rotatebutton.addEventListener("command", this.bound_rotate, true);
|
||||||
|
|
||||||
|
this.closebutton = this.chromeDoc.createElement("toolbarbutton");
|
||||||
|
this.closebutton.setAttribute("tabindex", "0");
|
||||||
|
this.closebutton.className = "devtools-toolbarbutton devtools-closebutton";
|
||||||
|
this.closebutton.setAttribute("tooltiptext", this.strings.GetStringFromName("responsiveUI.close"));
|
||||||
|
this.closebutton.addEventListener("command", this.bound_close, true);
|
||||||
|
|
||||||
|
this.toolbar.appendChild(this.closebutton);
|
||||||
this.toolbar.appendChild(this.menulist);
|
this.toolbar.appendChild(this.menulist);
|
||||||
this.toolbar.appendChild(this.rotatebutton);
|
this.toolbar.appendChild(this.rotatebutton);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,9 @@ responsiveUI.namedResolution=%S (%S)
|
||||||
# the user to specify a name for a new custom preset.
|
# the user to specify a name for a new custom preset.
|
||||||
responsiveUI.customNamePromptTitle=Responsive Design View
|
responsiveUI.customNamePromptTitle=Responsive Design View
|
||||||
|
|
||||||
|
# LOCALIZATION NOTE (responsiveUI.close): tooltip text of the close button.
|
||||||
|
responsiveUI.close=Leave Responsive Design View
|
||||||
|
|
||||||
# LOCALIZATION NOTE (responsiveUI.customNamePromptMsg): prompt message when asking
|
# LOCALIZATION NOTE (responsiveUI.customNamePromptMsg): prompt message when asking
|
||||||
# the user to specify a name for a new custom preset.
|
# the user to specify a name for a new custom preset.
|
||||||
responsiveUI.customNamePromptMsg=Give a name to the %Sx%S preset
|
responsiveUI.customNamePromptMsg=Give a name to the %Sx%S preset
|
||||||
|
|
|
@ -20,9 +20,7 @@
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
%ifdef XP_WIN
|
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
%endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.devtools-responsiveui-toolbar > menulist,
|
.devtools-responsiveui-toolbar > menulist,
|
||||||
|
|
|
@ -503,7 +503,11 @@ DebuggerClient.prototype = {
|
||||||
let resumption = { from: this.activeThread._actor, type: "resumed" };
|
let resumption = { from: this.activeThread._actor, type: "resumed" };
|
||||||
this.activeThread._onThreadState(resumption);
|
this.activeThread._onThreadState(resumption);
|
||||||
}
|
}
|
||||||
this.notify(aPacket.type, aPacket);
|
// Only try to notify listeners on events, not responses to requests
|
||||||
|
// that lack a packet type.
|
||||||
|
if (aPacket.type) {
|
||||||
|
this.notify(aPacket.type, aPacket);
|
||||||
|
}
|
||||||
|
|
||||||
if (onResponse) {
|
if (onResponse) {
|
||||||
onResponse(aPacket);
|
onResponse(aPacket);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче