mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1148893 - Return the style sheet selection promise to the caller. r=ejpbruel
This commit is contained in:
parent
b3cb9a8b9c
commit
63f9ca53ff
@ -632,7 +632,8 @@ StyleEditorUI.prototype = {
|
||||
* @param {number} col
|
||||
* Column number to jump to
|
||||
* @return {Promise}
|
||||
* Promise that will resolve when the editor is selected.
|
||||
* Promise that will resolve when the editor is selected and ready
|
||||
* to be used.
|
||||
*/
|
||||
_selectEditor: function(editor, line, col) {
|
||||
line = line || 0;
|
||||
@ -707,6 +708,9 @@ StyleEditorUI.prototype = {
|
||||
* Line to which the caret should be moved (zero-indexed).
|
||||
* @param {Number} [col]
|
||||
* Column to which the caret should be moved (zero-indexed).
|
||||
* @return {Promise}
|
||||
* Promise that will resolve when the editor is selected and ready
|
||||
* to be used.
|
||||
*/
|
||||
selectStyleSheet: function(stylesheet, line, col) {
|
||||
this._styleSheetToSelect = {
|
||||
@ -717,7 +721,7 @@ StyleEditorUI.prototype = {
|
||||
|
||||
/* Switch to the editor for this sheet, if it exists yet.
|
||||
Otherwise each editor will be checked when it's created. */
|
||||
this.switchToSelectedSheet();
|
||||
return this.switchToSelectedSheet();
|
||||
},
|
||||
|
||||
|
||||
|
@ -110,12 +110,15 @@ StyleEditorPanel.prototype = {
|
||||
* Line number to jump to after selecting. One-indexed
|
||||
* @param {number} col
|
||||
* Column number to jump to after selecting. One-indexed
|
||||
* @return {Promise}
|
||||
* Promise that will resolve when the editor is selected and ready
|
||||
* to be used.
|
||||
*/
|
||||
selectStyleSheet: function(href, line, col) {
|
||||
if (!this._debuggee || !this.UI) {
|
||||
return;
|
||||
}
|
||||
this.UI.selectStyleSheet(href, line - 1, col ? col - 1 : 0);
|
||||
return this.UI.selectStyleSheet(href, line - 1, col ? col - 1 : 0);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user