Improve performance in MarkContainerChainForOverflowRecalcIfNeeded()

The methods to check and set the visual overflow recalc flags
were both doing similar checks, so we were duplicating those calls.
In this change we somehow inline the code of that methods
so we avoid repeating those operations.

This is intended to improve performance in
perf_tests/shadow_dom/v1-small-deep-distribution.html.

BUG=1051342,941180

Change-Id: Ica18dd6d07b9f8bca9c35c9db438fbc09bb4a53c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062430
Commit-Queue: Manuel Rego <rego@igalia.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742546}
1 file changed