mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 725215 - Add magic shortcut to enable debugging features [r=cjones]
This commit is contained in:
parent
d33b13e30f
commit
bdbdb8bd15
@ -67,6 +67,8 @@ var shell = {
|
|||||||
// FIXME/bug 678695: this should be a system setting
|
// FIXME/bug 678695: this should be a system setting
|
||||||
preferredScreenBrightness: 1.0,
|
preferredScreenBrightness: 1.0,
|
||||||
|
|
||||||
|
isDebug: false,
|
||||||
|
|
||||||
get contentBrowser() {
|
get contentBrowser() {
|
||||||
delete this.contentBrowser;
|
delete this.contentBrowser;
|
||||||
return this.contentBrowser = document.getElementById('homescreen');
|
return this.contentBrowser = document.getElementById('homescreen');
|
||||||
@ -145,6 +147,7 @@ var shell = {
|
|||||||
window.controllers.removeController(this);
|
window.controllers.removeController(this);
|
||||||
window.removeEventListener('keypress', this);
|
window.removeEventListener('keypress', this);
|
||||||
window.removeEventListener('MozApplicationManifest', this);
|
window.removeEventListener('MozApplicationManifest', this);
|
||||||
|
window.removeEventListener('AppCommand', this);
|
||||||
},
|
},
|
||||||
|
|
||||||
supportsCommand: function shell_supportsCommand(cmd) {
|
supportsCommand: function shell_supportsCommand(cmd) {
|
||||||
@ -172,6 +175,18 @@ var shell = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleDebug: function shell_toggleDebug() {
|
||||||
|
this.isDebug = !this.isDebug;
|
||||||
|
|
||||||
|
if (this.isDebug) {
|
||||||
|
Services.prefs.setBoolPref("layers.acceleration.draw-fps", true);
|
||||||
|
Services.prefs.setBoolPref("nglayout.debug.paint_flashing", true);
|
||||||
|
} else {
|
||||||
|
Services.prefs.setBoolPref("layers.acceleration.draw-fps", false);
|
||||||
|
Services.prefs.setBoolPref("nglayout.debug.paint_flashing", false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
handleEvent: function shell_handleEvent(evt) {
|
handleEvent: function shell_handleEvent(evt) {
|
||||||
switch (evt.type) {
|
switch (evt.type) {
|
||||||
case 'keypress':
|
case 'keypress':
|
||||||
@ -199,6 +214,9 @@ var shell = {
|
|||||||
case 'Menu':
|
case 'Menu':
|
||||||
this.sendEvent(content, 'menu');
|
this.sendEvent(content, 'menu');
|
||||||
break;
|
break;
|
||||||
|
case 'Search':
|
||||||
|
this.toggleDebug();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'load':
|
case 'load':
|
||||||
|
Loading…
Reference in New Issue
Block a user