| Index: chrome/content/cssProperties.js |
| =================================================================== |
| --- a/chrome/content/cssProperties.js |
| +++ b/chrome/content/cssProperties.js |
| @@ -53,16 +53,32 @@ CSSPropertyFilters.prototype = { |
| styles.push(property + ": " + value + (priority ? " !" + priority : "") + ";"); |
| } |
| styles.sort(); |
| return styles.join(" "); |
| }, |
| findSelectors: function(stylesheet, selectors) |
| { |
| + try |
| + { |
| + // Explicitly ignore third-party stylesheets to ensure consistent behavior |
| + // between Firefox and Chrome. |
| + if (stylesheet.href && |
| + new URL(stylesheet.href).origin != this.window.location.origin) |
| + { |
| + return; |
| + } |
| + } |
| + catch (e) |
| + { |
| + // An invalid URL, can be ignored. |
| + Cu.reportError(e); |
| + } |
| + |
| var rules = stylesheet.cssRules; |
| if (!rules) |
| return; |
| for (var i = 0; i < rules.length; i++) |
| { |
| var rule = rules[i]; |
| if (rule.type != rule.STYLE_RULE) |