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..0588075b5dc9a1b82f0f8b40f412cdda1fad501e |
--- /dev/null |
+++ b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<style> |
+::-webkit-scrollbar { |
+ height: 10px; |
+ width: 10px |
+} |
+::-webkit-scrollbar-thumb { |
+ background: rgba(255,0,0,0.8); |
+} |
+html { |
+ overflow-y: scroll; |
+} |
+</style> |
+<div style="height:700px"></div> |
+<script> |
+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); |
+}; |
+document.body.offsetTop; |
+addRule("::-webkit-scrollbar-thumb", {background: "rgba(13,53,178,0.8)",}); |
+</script> |