Fix Compositing of Opaque Scrolling Layers and Add Tests

Move the CompositedLayerMapping::shouldPaintBackgroundOntoScrollingContentsLayer
method to PaintLayer to use it for detecting composited
scrolling. The method only uses data from PaintLayer, so there's
no reason to have it elsewhere.

Switch the check in PaintLayerScrollableArea for compositing scrollers on low-dpi
devices to use the method.

Fix the check in CompositingReasonsFinder to detect opaque background scrollers
as a reason

Remove the unnecessary check for self painting layer in
PaintLayer::backgroundIsKnownToBeOpaqueInRect.
The code is always called from a self painting layer's GraphicsLayer, or it's
called by the recursive call checking childrens' opaqueness. The former case means
the layer is always self painting, while the latter seems incorrect - one should
not exclude, not include, child self painting layers.

Add tests for promotion and demotion of scrolling layers as they switch between
opaque and transparent backgrounds.

R=flackr@chromium.org, chrishtr@chromium.org
BUG=381840
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2259493004
Cr-Commit-Position: refs/heads/master@{#417743}
27 files changed