Cache the offsetWidth/Height parameters to prevent calling the getter too many times.