Fix fundamental compositing issue for scrollers with overlay controls
Stop forcing scrollers with overlay controls (overlay scrollbars and resizers) to be self-painting PaintLayers. Now overlay controls are painted in three ways: - (unchanged) If the overlay controls (of a non-stacking-context scroller) need reordering, i.e. need to be painted after some descendants in containing-block order but not in paint-order, the overlay controls are still painted in PaintLayerPainter::PaintChildren() of the containing stacking context. - Otherwise: - (unchanged) if the scroller has a self-painting PaintLayer, the overlay controls are painted in PaintLayerPainter::PaintLayerContent() after all children. - (new) if the scroller doesn't have a self-painting PaintLayer, the overlay controls are painted in the foreground paint phase. Bug: 370604 Change-Id: Ifc0437f794ad57e860c8d73c6aeae06a81f58601 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3375382 Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#958033}
Loading