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

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

Issue 2509843004: Disable overlay scrollbars to hide them on non-Mac. (Closed)
Patch Set: Fix tests 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script>
3 if (window.internals) {
4 window.internals.settings.setOverlayScrollbarsEnabled(true);
5 window.internals.settings.setMockScrollbarsEnabled(true);
6 }
7 </script>
8 <div id="div" style="overflow: scroll; width: 200px; height: 200px;">
9 <div style="background-color: green; height: 3000px; width: 100px"></div>
10 </div>
11 <iframe srcdoc="<div style='background-color: red; height: 3000px; width: 100px' ></div>"
12 id="iframe",
13 width=200,
14 height=200></iframe>
15 <script>
16 window.onload = function() {
17 if (window.internals) {
18 window.internals.settings.setOverlayScrollbarsEnabled(true);
skobes 2016/11/17 21:16:31 nit: you don't need "window." (except on the line
bokan 2016/11/17 23:22:27 Done.
19
20 var div = document.querySelector('#div');
21 var iframe = document.querySelector('#iframe');
22 window.internals.setScrollbarVisibilityInScrollableArea(div, true);
23 window.internals.setScrollbarVisibilityInScrollableArea(
24 iframe.contentDocument, true);
25
26 window.internals.setScrollbarVisibilityInScrollableArea(div, false);
27 window.internals.setScrollbarVisibilityInScrollableArea(
28 iframe.contentDocument, false);
29 }
30 }
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698