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:
@@ -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 {};
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user