Skip to content

Commit

Permalink
Fix paint issue with transparent scrollbars
Browse files Browse the repository at this point in the history
LayoutBox::BackgroundClipBorderBoxIsEquivalentToPaddingBox now correctly
accounts for non-auto scrollbar gutters, along with non-opaque
scrollbars.

ScrollbarDisplayItem::IsOpaque also now handles non-opaque non-overlay
scrollbars.

Bug: 1490798, 1459802
Change-Id: I7c3d5c3c1a498b43082dddfb7cab9850951e4ec6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952560
Reviewed-by: Xianzhu Wang <[email protected]>
Commit-Queue: Luke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1212641}
  • Loading branch information
lukewarlow authored and chromium-wpt-export-bot committed Oct 20, 2023
1 parent 11ec07c commit 9beb005
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
13 changes: 13 additions & 0 deletions css/css-scrollbars/scrollbar-color-012-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html>
<style>
.container {
overflow: auto;
height: 200px;
width: 200px;
background-color: red;
}
</style>
<div class="container">
<div class="content"></div>
</div>
24 changes: 24 additions & 0 deletions css/css-scrollbars/scrollbar-color-012.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html>
<title>scrollbar-color with transparent colors works</title>
<link rel="author" title="Luke Warlow" href="mailto:[email protected]" />
<link rel="match" href="scrollbar-color-012-ref.html" />
<link rel="help" href="https://drafts.csswg.org/css-scrollbars" />
<style>
html {scrollbar-color: transparent transparent;}
body {height: 200vh}
.container {
overflow: auto;
height: 200px;
width: 200px;
background-color: red;
}

.content {
height: 300px;
width: 300px;
}
</style>
<div class="container">
<div class="content"></div>
</div>

0 comments on commit 9beb005

Please sign in to comment.