1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 18:47:58 +01:00

Cut down on some error console noise when generating XPCOM stubs.

This commit is contained in:
Kris Maglione
2010-10-03 22:15:49 -04:00
parent 106b9163c2
commit 6d472abb18
6 changed files with 24 additions and 9 deletions

View File

@@ -195,7 +195,15 @@ Shim.prototype = {
contractID: "@dactyl.googlecode.com/base/xpc-interface-shim",
classID: Components.ID("{f4506a17-5b4d-4cd9-92d4-2eb4630dc388}"),
classDescription: "XPCOM empty interface shim",
QueryInterface: function () this
QueryInterface: function (iid) {
if (iid.equals(Ci.nsISecurityCheckedComponent))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this
},
getHelperForLanguage: function () null,
getInterfaces: function (count) {
count.value = 0;
}
};
if (XPCOMUtils.generateNSGetFactory)

View File

@@ -179,7 +179,6 @@ const ConfigBase = Class(ModuleBase, {
StatusWarningMsg color: red !important; background: inherit !important;
!CmdLine;>* font-family: monospace !important; padding: 1px !important;
// !StatusCmdLine>* color: white; background: black; font-weight: normal;
CmdPrompt;.dactyl-commandline-prompt
CmdInput;.dactyl-commandline-command
CmdOutput white-space: pre;

View File

@@ -77,7 +77,7 @@
</vbox>
<stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine">
<textbox class="plain" id="dactyl-mode" flex="1" readonly="true"/>
<textbox class="plain" id="dactyl-mode" flex="1" crop="end"/>
<textbox class="plain" id="dactyl-message" flex="1" readonly="true"/>
<hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal CmdNormal" collapsed="true">
@@ -99,10 +99,10 @@
<statusbar id="status-bar" dactyl:highlight="StatusLine">
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
style="background: inherit;" id="&status;container" flex="1" hidden="false" align="center">
<stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
<textbox class="plain" id="&status;url" flex="1" readonly="false" crop="end"/>
<textbox class="plain" id="&status;mode" flex="1" readonly="true" crop="end" collapsed="true"/>
<textbox class="plain" id="&status;message" flex="1" readonly="true" collapsed="true" dactyl:highlight="Normal StatusNormal"/>
<stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
<textbox class="plain" id="&status;url" flex="1" readonly="true" crop="end"/>
<label class="plain" id="&status;mode" flex="1" crop="end" collapsed="true"/>
<textbox class="plain" id="&status;message" flex="1" readonly="true" crop="end" collapsed="true" dactyl:highlight="Normal StatusNormal"/>
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true">
<label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>

View File

@@ -751,7 +751,7 @@ const Events = Module("events", {
return;
}
if (elem instanceof HTMLTextAreaElement || (elem && elem.contentEditable == "true")) {
if (elem instanceof HTMLTextAreaElement || (elem && util.computedStyle(elem).MozUserModify == "read-write")) {
if (options["insertmode"])
modes.set(modes.INSERT);
else if (elem.selectionEnd - elem.selectionStart > 0)

View File

@@ -715,10 +715,13 @@ Class.extend = function extend(subclass, superclass, overrides) {
*/
function XPCOM(interfaces, superClass) {
interfaces = Array.concat(interfaces);
let shim = interfaces.reduce(function (shim, iface) shim.QueryInterface(iface),
Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance());
let res = Class("XPCOM(" + interfaces + ")", superClass || Class, update(
array([k, v === undefined || callable(v) ? function stub() null : v] for ([k, v] in Iterator(shim))).toObject(),
array([k, v === undefined || callable(v) ? function stub() null : v]
for ([k, v] in Iterator(shim))).toObject(),
{ QueryInterface: XPCOMUtils.generateQI(interfaces) }));
shim = interfaces = null;
return res;

View File

@@ -78,6 +78,11 @@
color: inherit;
}
label[collapsed=true] {
height: 0px;
width: 0px;
}
.dactyl-container > * {
font-family: inherit;
}