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

Unified Diff: third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html

Issue 2509843004: Disable overlay scrollbars to hide them on non-Mac. (Closed)
Patch Set: Renamed to shouldDisableInvisibleScrollbars Created 4 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: third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
diff --git a/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html b/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
new file mode 100644
index 0000000000000000000000000000000000000000..dce320184291eec231245beb91911e03c29f1c1d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/scrollbars/hidden-scrollbars-invisible.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script>
+if (window.internals) {
+ internals.settings.setOverlayScrollbarsEnabled(true);
+ internals.settings.setMockScrollbarsEnabled(true);
+}
+</script>
+<div id="div" style="overflow: scroll; width: 200px; height: 200px;">
+ <div style="background-color: green; height: 3000px; width: 100px"></div>
+</div>
+<iframe srcdoc="<div style='background-color: red; height: 3000px; width: 100px'></div>"
+ id="iframe",
+ width="200",
+ height="200"></iframe>
+<script>
+ window.onload = function() {
+ if (window.internals) {
+ internals.settings.setOverlayScrollbarsEnabled(true);
+
+ var div = document.querySelector('#div');
+ var iframe = document.querySelector('#iframe');
+ internals.setScrollbarVisibilityInScrollableArea(div, true);
+ internals.setScrollbarVisibilityInScrollableArea(
+ iframe.contentDocument, true);
+
+ internals.setScrollbarVisibilityInScrollableArea(div, false);
+ internals.setScrollbarVisibilityInScrollableArea(
+ iframe.contentDocument, false);
+ }
+ }
+</script>

Powered by Google App Engine
This is Rietveld 408576698