mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1148893 - Return the style sheet selection promise to the caller. r=ejpbruel
This commit is contained in:
parent
c1d19dcaab
commit
af3bb345b0
@ -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