Merge pull request #276 from nightwing/computedStyle

call getComputedStyle once
This commit is contained in:
Fabian Jakobs 2011-06-07 03:01:20 -07:00
commit 2e33411d76

View file

@ -126,10 +126,9 @@ var Text = function(parentEl) {
}
var style = this.$measureNode.style;
for (var prop in this.$fontStyles) {
var value = dom.computedStyle(this.element, prop);
style[prop] = value;
}
var computedStyle = dom.computedStyle(this.element);
for (var prop in this.$fontStyles)
style[prop] = computedStyle[prop];
var size = {
height: this.$measureNode.offsetHeight,