Account for layout overflow when omitting overflow clip

When deciding whether an overflow clip paint property node is needed, we
previously checked if the visual overflow extended beyond the overflow clip
rect. This would miss cases when the visual overflow was empty (e.g.,
descendants with width: 0) but the content was still scrollable. This patch adds
a check for layout overflow.

While in the area, the condition for visual overflow has been refactored to make
the self-painting PaintLayer case a little clearer. The early-out for PaintLayer
descendants is required for correctness.

Bug: 918675
Change-Id: I41fe5fd71a957f196b5b8095965d4e361e535196
Reviewed-on: https://chromium-review.googlesource.com/c/1393885
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619749}
4 files changed