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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/scrolling/scrolling-apis-subpixel.html

Issue 2005193005: Disable fractional scroll feature by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layout-test-fix
Patch Set: Fix tests Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 .spacer { 3 .spacer {
4 height: 1000px; 4 height: 1000px;
5 width: 1000px; 5 width: 1000px;
6 } 6 }
7 #scroller, body { 7 #scroller, body {
8 height: 100px; 8 height: 100px;
9 width: 100px; 9 width: 100px;
10 overflow: scroll; 10 overflow: scroll;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 debug(''); 65 debug('');
66 } 66 }
67 67
68 function testPageZoom(zoom) { 68 function testPageZoom(zoom) {
69 debug('---- Testing page zoom = ' + zoom + ' ----'); 69 debug('---- Testing page zoom = ' + zoom + ' ----');
70 eventSender.setPageZoomFactor(zoom); 70 eventSender.setPageZoomFactor(zoom);
71 testScroll(4, 4); 71 testScroll(4, 4);
72 testScroll(4.5, 4.5); 72 testScroll(4.5, 4.5);
73 } 73 }
74 74
75 debug("set PreferCompositingToLCDTextEnabled true"); 75 // By default we don't yet get fractional scroll offsets with more
76 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); 76 // granularity than the page zoom factor.
77 testScroll(4.2, 4.2);
78 testPageZoom(2);
79
80 // If there is no browser zoom, floating point scroll offsets are truncated.
81 // If there is browser zoom, we can still get fractional scroll offsets
82 // through JS.
83 debug("set PreferCompositingToLCDTextEnabled false");
84 window.internals.settings.setPreferCompositingToLCDTextEnabled(false); 77 window.internals.settings.setPreferCompositingToLCDTextEnabled(false);
85 testScroll(4.2, 4); 78 testScroll(4.2, 4);
86 testPageZoom(2); 79 testPageZoom(2);
80
81 if (window.internals.runtimeFlags.fractionalScrollOffsetsEnabled) {
82 debug("Full fractional scroll offsets enabled");
83 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
84 testScroll(4.2, 4.2);
85 testPageZoom(2);
86 }
87 </script> 87 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698