call getComputedStyle once

This commit is contained in:
nightwing 2011-05-30 11:26:06 +05:00
commit 833f12cd86

View file

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