New issue
Advanced search Search tips

Issue 918155 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Overlay scrollbars painting issues

Project Member Reported by wangxianzhu@google.com, Dec 28

Issue description

Currently we paint overlay scrollbars with two passes of painting:
- The first pass is in the background phase in which we paint normal
  scrollbars but for overlay scrollbars we set a flag of dirty overlay
  scrollbars;
- The second pass is after all paint phases, which paint the overlay
  scrollbars "on top of everything else".

I think the complex logic is to ensure that the overlay scrollbars
were painted "on top of everything else", but that is neither always
true nor necessary. The overlay scrollbars can still be covered by
other composited layers above the composited layer it resides. This
causes inconsistent behaviors about z-ordering of overlay scrollbars
in composited and non-composited layers.

More importantly, it also causes bugs:

- During a paint, when a layer with overlay scrollbars didn't need
  repaint, we issue cached subsequence but miss setting the dirty
  overlay scrollbars flag, causing missing overlay scrollbars for the
  layer in the second pass.

- The second pass is initiated by FramePainter and
  CompositeLayerMapping. For CompositedAfterPaint we depend on the
  former, but that will paint all overlay scrollbars on top of
  everything else in the frame even if the scrollbar is supposed to
  be covered by other things and should not visible and actionable.

 
Status: Fixed (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d855623a1560588a70ac9a8488d1588659f718da

commit d855623a1560588a70ac9a8488d1588659f718da
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Wed Jan 02 20:46:59 2019

[CI/PE] Simplify overlay scrollbar painting

The bug describes how the old code worked and how it caused bugs.

The new code paints normal scrollbars in the background paint phase,
and overlay scrollbars in the foreground paint phase, eliminating
the second paint pass.

This changes z-ordering of overlay scrollbars in some cases, but
the new behavior is consistent with composited and non-composited
layers, and in CompositeAfterPaint. The new behavior is that the
overlay scrollbars appear on top of the scrolling contents, but below
the outline phase of the current stacking context and other stacked
contents with higher z-ordering. The new behavior is the same as the
previous behavior when the scrolling block is composited.

Bug:  918155 

Change-Id: I3144af2a2e00e03cb370f4245353c13afe6b5ede
Reviewed-on: https://chromium-review.googlesource.com/c/1391676
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619485}
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/block_painter.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/block_painter.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/frame_painter.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer_painter.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer_painter.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer_painting_info.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/scrollable_area_painter.cc
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/renderer/core/paint/scrollable_area_painter.h
[modify] https://crrev.com/d855623a1560588a70ac9a8488d1588659f718da/third_party/blink/web_tests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt

Sign in to add a comment