Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix painting of composited overflow controls with visibility:hidden
We can have a composited scroller with visibility:hidden if it has visibility:visible descendants. We should skip painting of overflow controls in the case. Ideally we should not create composited overflow control layers, but I would not touch the pre-CompositeAfterPaint code for the rare case. Bug: 1187818, 1185968 Change-Id: If59049a685fa153b6538f8ca2424792904096000
- Loading branch information
1 parent
1575aae
commit 2ba20d2
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
css/css-overflow/overflow-scroll-resize-visibility-hidden-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.scroller { | ||
width: 100px; | ||
height: 100px; | ||
overflow: scroll; | ||
/* to make the scroller a white mask over the content */ | ||
filter: brightness(0) invert(1); | ||
position: relative; | ||
top: -200px; | ||
} | ||
.content { | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
<div class="content"></div> | ||
<div class="content"></div> | ||
<div class="scroller"></div> | ||
<div class="scroller"></div> |
25 changes: 25 additions & 0 deletions
25
css/css-overflow/overflow-scroll-resize-visibility-hidden.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Overflow: overflow: scroll with resize: both and visibility: hidden</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow-3#propdef-overflow"> | ||
<link rel="match" href="overflow-scroll-resize-visibility-hidden-ref.html"> | ||
<style> | ||
.scroller { | ||
overflow: scroll; | ||
width: 100px; | ||
height: 100px; | ||
resize: both; | ||
visibility: hidden; | ||
} | ||
.content { | ||
width: 1000px; | ||
height: 1000px; | ||
background: green; | ||
visibility: visible; | ||
} | ||
</style> | ||
<div class="scroller"> | ||
<div class="content"></div> | ||
</div> | ||
<div class="scroller" style="will-change: transform"> | ||
<div class="content"></div> | ||
</div> |