Permalink
Browse files

Better access the styles directly instead of using getPropertyCSSValu…

…e() to avoid problems when -moz-font-feature-settings gets unprefixed
  • Loading branch information...
1 parent 32baad1 commit b4af31d0dd1a01dedb81eea5b8b4bb3a0a764056 @SebastianZ SebastianZ committed Sep 23, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 extension/content/firebug/lib/css.js
@@ -218,14 +218,14 @@ Css.copyTextStyles = function(fromNode, toNode, style)
if (!style)
style = view.getComputedStyle(fromNode, "");
- toNode.style.fontFamily = style.getPropertyCSSValue("font-family").cssText;
- toNode.style.fontSize = style.getPropertyCSSValue("font-size").cssText;
- toNode.style.fontWeight = style.getPropertyCSSValue("font-weight").cssText;
- toNode.style.fontStyle = style.getPropertyCSSValue("font-style").cssText;
- toNode.style.fontSizeAdjust = style.getPropertyCSSValue("font-size-adjust").cssText;
- toNode.style.fontStretch = style.getPropertyCSSValue("font-stretch").cssText;
- toNode.style.fontVariant = style.getPropertyCSSValue("font-variant").cssText;
- toNode.style.MozFontFeatureSettings = style.getPropertyCSSValue("-moz-font-feature-settings").cssText;
+ toNode.style.fontFamily = style.fontFamily;
+ toNode.style.fontSize = style.fontSize;
+ toNode.style.fontWeight = style.fontWeight;
+ toNode.style.fontStyle = style.fontStyle;
+ toNode.style.fontSizeAdjust = style.fontSizeAdjust;
+ toNode.style.fontStretch = style.fontStretch;
+ toNode.style.fontVariant = style.fontVariant;
+ toNode.style.MozFontFeatureSettings = style.MozFontFeatureSettings;
return style;
}

0 comments on commit b4af31d

Please sign in to comment.