Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: LayoutTests/scrollbars/custom-scrollbar-changing-style.html

Issue 702913002: Updating custom scrollbar style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/scrollbars/custom-scrollbar-changing-style.html
diff --git a/LayoutTests/scrollbars/custom-scrollbar-changing-style.html b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..9abb01c63f5b30c880ba13a95629ed8345ed0303
--- /dev/null
+++ b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<style>
+::-webkit-scrollbar {
+ height: 10px;
+ width: 10px
+}
+::-webkit-scrollbar-thumb {
+ background: rgba(255,0,0,0.8);
+}
+html {
+ overflow-y: scroll;
+}
+</style>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+var styleElement = document.createElement("style");
+var sheet = document.head.appendChild(styleElement).sheet;
+function addRule(selector, css){
+ var propText = Object.keys(css).map(function(p){
+ return p+":"+css[p]
+ }).join(";");
+ sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length);
+};
+function addstyle() {
+ addRule("::-webkit-scrollbar-thumb", {
+ background: "rgba(13,53,178,0.8)",
+ });
+ if (window.testRunner)
+ testRunner.notifyDone();
+};
+setTimeout(function() {addstyle();}, 1);
rune 2014/11/07 10:58:08 I still think it would be more robust if you put t
MuVen 2014/11/07 11:33:54 Done.
+</script>
+<div style="height:700px"></div>

Powered by Google App Engine
This is Rietveld 408576698