-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with scrollbar-color invalidation with currentColor
scrollbar-color property that uses currentColor now correctly repaints when color value updates. This only fixes non-viewports as viewports have a separate issue where scrollbar-color invalidation doesn't work at all. Bug: 891944 Change-Id: Iac513cbadbfc589280621b864d1d0b5d68bf9e98 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4774160 Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org> Commit-Queue: Luke <lukewarlow156@gmail.com> Cr-Commit-Position: refs/heads/main@{#1184751}
- Loading branch information
1 parent
b11cd15
commit d969c04
Showing
20 changed files
with
498 additions
and
4 deletions.
There are no files selected for viewing
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
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
12 changes: 12 additions & 0 deletions
12
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-011-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,12 @@ | ||
<!doctype html> | ||
<html> | ||
<style> | ||
:root { | ||
scrollbar-color: blue blue; | ||
color: blue; | ||
} | ||
|
||
body { | ||
overflow: scroll; | ||
} | ||
</style> |
16 changes: 16 additions & 0 deletions
16
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-011.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,16 @@ | ||
<!doctype html> | ||
<html> | ||
<title>CSS Scrollbars: scrollbar-color with current color works correctly</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="match" href="scrollbar-color-011-ref.html" /> | ||
<link rel="help" href="https://drafts.csswg.org/css-scrollbars-1/" /> | ||
<style> | ||
:root { | ||
scrollbar-color: currentColor currentColor; | ||
color: blue; | ||
} | ||
|
||
body { | ||
overflow: scroll; | ||
} | ||
</style> |
34 changes: 34 additions & 0 deletions
34
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-1-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,34 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
scrollbar-color: blue green; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
flex: 0 0; | ||
overflow: auto; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
|
||
<div class="container"> | ||
<div class="content"></div> | ||
</div> |
46 changes: 46 additions & 0 deletions
46
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-1.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,46 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set scrollbar-colors and ensure scrollbars update</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="help" href="https://drafts.csswg.org/css-scrollbars" /> | ||
<link rel="match" href="scrollbar-color-dynamic-1-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: auto; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
<div class="container"> | ||
<div class="content"></div> | ||
</div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.documentElement.style.scrollbarColor = 'blue green'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-1.html.ini
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,3 @@ | ||
[scrollbar-color-dynamic-1.html] | ||
expected: | ||
FAIL |
23 changes: 23 additions & 0 deletions
23
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-2-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,23 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
scrollbar-color: blue green; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> |
36 changes: 36 additions & 0 deletions
36
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-2.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,36 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set scrollbar-color and ensure overflow scroll scrollbars update</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="help" href="https://drafts.csswg.org/css-scrollbars/#valdef-scrollbar-color-auto" /> | ||
<link rel="match" href="scrollbar-color-dynamic-2-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.documentElement.style.scrollbarColor = 'blue green'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-2.html.ini
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,3 @@ | ||
[scrollbar-color-dynamic-2.html] | ||
expected: | ||
FAIL |
35 changes: 35 additions & 0 deletions
35
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-3-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,35 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-color: blue green; | ||
scrollbar-gutter: stable; | ||
flex: 0 0; | ||
overflow: auto; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
|
||
<div class="container"> | ||
<div class="content"></div> | ||
</div> |
46 changes: 46 additions & 0 deletions
46
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-3.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,46 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set scrollbar-color on container and ensure scrollbars update</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="help" href="https://drafts.csswg.org/css-scrollbars/#valdef-scrollbar-color-auto" /> | ||
<link rel="match" href="scrollbar-color-dynamic-3-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: auto; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
<div class="container"> | ||
<div class="content"></div> | ||
</div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.querySelector(".container").style.scrollbarColor = 'blue green'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |
24 changes: 24 additions & 0 deletions
24
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-4-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,24 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-color: blue green; | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> |
36 changes: 36 additions & 0 deletions
36
third_party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-4.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,36 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set scrollbar-color on container with overflow scroll and ensure scrollbars update</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="help" href="https://drafts.csswg.org/css-scrollbars/#valdef-scrollbar-color-auto" /> | ||
<link rel="match" href="scrollbar-color-dynamic-4-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
scrollbar-color: red yellow; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.querySelector(".container").style.scrollbarColor = 'blue green'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |
34 changes: 34 additions & 0 deletions
34
..._party/blink/web_tests/external/wpt/css/css-scrollbars/scrollbar-color-dynamic-5-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,34 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
scrollbar-color: green green; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
flex: 0 0; | ||
overflow: auto; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
|
||
<div class="container"> | ||
<div class="content"></div> | ||
</div> |
Oops, something went wrong.