1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 23:25:46 +01:00

Deal with some Buffer.findScrollable corner cases.

--HG--
extra : rebase_source : 6acbaac21f3098ab357ceddcd796e6566a61a6d9
This commit is contained in:
Kris Maglione
2010-12-21 14:03:09 -05:00
parent 21ddb65595
commit 9511624649
3 changed files with 12 additions and 3 deletions

View File

@@ -318,9 +318,16 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
* @returns {Object}
*/
computedStyle: function computedStyle(node) {
while (node instanceof Ci.nsIDOMText && node.parentNode)
while (!(node instanceof Ci.nsIDOMElement) && node.parentNode)
node = node.parentNode;
return node.ownerDocument.defaultView.getComputedStyle(node, null);
try {
return node.ownerDocument.defaultView.getComputedStyle(node, null);
}
catch (e) {
util.reportError(e);
util.dump(String(node));
return {};
}
},
/**