In overflow scrollers, CompositedLayerMapping::UpdatePaintingPhases sets kGraphicsLayerPaintBackground on graphics_layer_ but not scrolling_contents_layer_.
This happens even when PaintLayer::GetBackgroundPaintLocation wants the background painted into the scrolling contents layer.
CLM::PaintContents then has to work around this by inverting the kPaintLayerPaintingSkipRootBackground flag when background_paints_onto_scrolling_contents_layer_ is set.
I wonder if CLM could set kGraphicsLayerPaintBackground on the layers that actually paint backgrounds? Then we could simplify the awkwardness around kPaintLayerPaintingSkipRootBackground and maybe get rid of background_paints_onto_scrolling_contents_layer_ and background_paints_onto_graphics_layer_.
It might also let us get rid of the SkipRootBackground() check in BoxPainter::PaintBoxDecorationBackgroundWithRect. If the main GraphicsLayer isn't painting the background then it shouldn't even call into in this method, but it does because PaintLayerPainter saw kPaintLayerPaintingCompositingBackgroundPhase.
There are probably issues with this that I haven't thought of. :)
Comment 1 by kavvaru@chromium.org
, Jul 10 2017