diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-10-03 22:15:49 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-10-03 22:15:49 -0400 |
commit | 6d472abb18ee2e6fb5c06b2ff5ecfc2a2f2a18c4 (patch) | |
tree | 64ccf45ab10f4b48a49044975e9bf807208e876b | |
parent | 106b9163c2bc7c5ba0950b094fbba0db4b4e7681 (diff) | |
download | pentadactyl-6d472abb18ee2e6fb5c06b2ff5ecfc2a2f2a18c4.tar.gz |
Cut down on some error console noise when generating XPCOM stubs.
-rw-r--r-- | common/components/protocols.js | 10 | ||||
-rw-r--r-- | common/content/configbase.js | 1 | ||||
-rw-r--r-- | common/content/dactyl.xul | 10 | ||||
-rw-r--r-- | common/content/events.js | 2 | ||||
-rw-r--r-- | common/modules/base.jsm | 5 | ||||
-rw-r--r-- | common/skin/dactyl.css | 5 |
6 files changed, 24 insertions, 9 deletions
diff --git a/common/components/protocols.js b/common/components/protocols.js index a4488fab..f5e3f627 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -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) diff --git a/common/content/configbase.js b/common/content/configbase.js index f8d4ea34..8edb176a 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -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; diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul index 1e95af9a..9ef44375 100644 --- a/common/content/dactyl.xul +++ b/common/content/dactyl.xul @@ -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"/> diff --git a/common/content/events.js b/common/content/events.js index 211f7c93..1158fd03 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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) diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 14bf7520..cf00e002 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -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; diff --git a/common/skin/dactyl.css b/common/skin/dactyl.css index 4f9aa144..575dd3d2 100644 --- a/common/skin/dactyl.css +++ b/common/skin/dactyl.css @@ -78,6 +78,11 @@ color: inherit; } +label[collapsed=true] { + height: 0px; + width: 0px; +} + .dactyl-container > * { font-family: inherit; } |