DescriptionOverlay scrollbars must respect ancestor clip
The current reparenting logic for overlay scrollbars for compositor-
driven scrollable areas does not account for ancestor clips. The result
is that the scrollbars can escape clips that need to affect them.
Consider the following stacking tree. (The '-' characters in the
following trees should be ignored. I've only added them so that
my indenting doesn't get stripped).
+ stacking-context
- + overflow-hidden-clipper
- + overflow-scroller
- + fixed-positioned-descendant-of-the-scroller
- + relative-positioned-descendant-of-the-scroller
Where, in tree order, these are arranged like this
+ stacking-context
- + overflow-hidden-clipper
--- + overflow-scroller
----- + fixed-positioned-descendant-of-the-scroller
----- + relative-positioned-descendant-of-the-scroller
Since overflow-scroller is clipped by overflow-hidden-clipper, a layer
that is not an ancestor in the stacking tree, it gets an ancestor
clipping layer. If the overflow controls are parented under
overflow-scroller's m_graphicsLayer, everything works fine: the
controls inherit the clip from the ancestor clipping layer.
Unfortunately, if we are using overlay scrollbars, we can't hang
the scrollbars under m_graphicsLayer because they'd stack behind
fixed-positioned-descendant-of-the-scroller and
relative-positioned-descendant-of-the-scroller. In order to get things
stacking correctly, we have to reparent the overflow controls like
this:
+ stacking-context
- + overflow-hidden-clipper
- + overflow-scroller
- + fixed-positioned-descendant-of-the-scroller
- + relative-positioned-descendant-of-the-scroller
- + <overflow controls for overflow-scroller>
If we reparent the controls like this in the graphics layer tree,
the overflow controls will no longer be a descendant of the
ancestor clipping layer that applies the clip for m_graphicsLayer,
unfortunately. In order to get the overflow controls clipped
correctly, we need to ensure that they have a clipping layer
above them. This CL adds m_overflowControlsClippingLayer for this
purpose.
BUG=393926
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178980
Patch Set 1 : . #
Total comments: 5
Patch Set 2 : Update overflow host layer with the ancestor clip layer. #Patch Set 3 : . #
Total comments: 6
Patch Set 4 : . #
Total comments: 1
Patch Set 5 : . #
Total comments: 6
Patch Set 6 : . #Messages
Total messages: 24 (0 generated)
|