mbostock/d3 — pull request #476 by jasondavies (2012-01-29 18:11:17+00:00)
Title: Don't use getComputedStyle to fetch current styles.

This was causing issues with getting/setting font-size as it was not always consistent with the value set via .style("font-size", …), which uses .style.setProperty internally:

1. It turns out getComputedStyle returns different font sizes at different full-page zoom levels in WebKit (but not in Firefox).
2. Moreover, computed style sizes are always converted to pixels, so this may cause issues when interpolating any non-pixel sizes.

Maybe there is a good reason why computed styles are being used? I only noticed this due to using full-page zoom in Chrome and occasionally seeing a font-size style not being set properly. This is because of the short-circuit in transition().style(…), that checks if you're setting it to the same value that's already there. In my case, the value reported to be there was not equivalent to the value I was trying to set.

I'm not sure if this is specific to fonts, but I checked setting the width style and that wasn't affected by zooming (aside from the coercion to pixel value).