Commit f240cb6e authored by szager's avatar szager Committed by Commit bot

Don't paint empty scroll corner

The existing logic for checking whether the compositor has a scroll
corner layer is insufficient.  When the compositor runs
UpdateOverflowControlsLayers, it will delete its scroll corner layer
if the scroll corner isn't visible.  In this case, the paint code
should not try to paint the scroll corner.

The existing code causes a number of crashes in compositing tests
when this patch is applied:

https://codereview.chromium.org/2860433002

BUG=701575
R=pdr@chromium.org,chrishtr@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2857333004
Cr-Commit-Position: refs/heads/master@{#469370}
parent dca98e1e
......@@ -206,8 +206,10 @@ void FramePainter::PaintScrollbars(GraphicsContext& context,
!GetFrameView().LayerForVerticalScrollbar())
PaintScrollbar(context, *GetFrameView().VerticalScrollbar(), rect);
if (GetFrameView().LayerForScrollCorner())
if (GetFrameView().LayerForScrollCorner() ||
!GetFrameView().IsScrollCornerVisible()) {
return;
}
PaintScrollCorner(context, GetFrameView().ScrollCornerRect());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment