dreamerslab/jquery.actual — pull request #3 by jtara (2012-06-06 18:56:15+00:00)
Title: Save/restore element style rather than individual CSS attributes.

Modified to save/restore element style, rather than individual CSS
attributes. It is much faster to restore the element style than to
set the CSS attributes. As well, it is more correct: retrieving CSS
attributes does so whether the element actually has a style or not.
(e.g. it will obtain the attribute from the CSS cascade.) Upon restore,
if the element didn't originally have a style, now it does! Instead,
we save the element style, if it has one, then modify the CSS attributes
as needed to get the dimensions. If the element didn't originally
have a style, the style is then simply removed. If it did originally
have a style, restore the original style.