I think it is better to checkout self visible and enabled first. Because it is more quick. And if self visible or enabled is false, then we don't have to check its ancestors' state.