Bail out of computing style for invisible elements

Previously style for invisible elements are still computed but changed
to have the value display:none at the end of computation through
StyleAdjuster. This CL moves the check for invisible attribute to
near the start of Element::StyleForLayoutObject so that we won't waste
time computing style for invisible elements.

Bug: 873057
Change-Id: I21a9f3fe4b8ddacf781d0e5e3de54f3bb0b04b17
Reviewed-on: https://chromium-review.googlesource.com/c/1276066
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598934}
3 files changed