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

Unified Diff: LayoutTests/fast/dom/Element/scroll-width-visible.html

Issue 163383002: Scrollbar width is not applied when element hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase to latest Created 6 years, 7 months 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/fast/dom/Element/scroll-width-visible.html
diff --git a/LayoutTests/fast/dom/Element/scroll-width-visible.html b/LayoutTests/fast/dom/Element/scroll-width-visible.html
new file mode 100644
index 0000000000000000000000000000000000000000..2ef7d75da037009d8da9a383101de61ab9bbdc13
--- /dev/null
+++ b/LayoutTests/fast/dom/Element/scroll-width-visible.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../../../resources/check-layout.js"></script>
+ <style type="text/css">
+ ::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ }
+ ::-webkit-scrollbar-thumb {
+ border-radius: 4px;
+ background-color: #CCCCCC;
+ -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
+ }
+ div {
+ position: absolute;
+ top: 200px;
+ left: 0px;
+ background-color: red;
+ width: 200px;
+ height: 150px;
+ padding: 0px;
+ overflow: scroll;
+ }
+ #scrollChild {
+ width: 150%;
+ height: 200px;
+ padding: 0px;
+ }
+ </style>
+ </head>
+ <body>
+ Tests that element.clientWidth of visible element with scrollbars returns proper values
+ <div id="scrollDiv" data-expected-client-width="190"><p id="scrollChild"></p></div>
+ <p id="test-output"></p>
+ </body>
+ <script type="text/javascript">
+ window.checkLayout("div", document.getElementById("test-output"));
+ </script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698