invalidates layout if width or height changes regardless of scroll direction