Commit 6253bb13 authored by hiroshige's avatar hiroshige Committed by Commit bot

Do not call internals.settings.setOverlayScrollbarsEnabled() in onload

internals.settings.setOverlayScrollbarsEnabled() doesn't work well when it is
called after ScrollbarTheme is initialized in the first layout.

The CL [1] modifies the timing of document load event and makes onload() in
fast/scrolling/scrollbar-tickmarks-hittest.html to be called after the first
layout, and thus breaks the test.

This CL moves setOverlayScrollbarsEnabled() to outside onload() such that it
is called before ScrollbarTheme is initialized.

[1] https://codereview.chromium.org/2269043002/

BUG=624697
TEST=fast/scrolling/scrollbar-tickmarks-hittest.html

Review-Url: https://codereview.chromium.org/2484613003
Cr-Commit-Position: refs/heads/master@{#430284}
parent 102bd641
......@@ -5,6 +5,10 @@
<script>
description('Checks that clicking on scrollbar works when tickmarks are added.');
if (window.internals) {
window.internals.settings.setOverlayScrollbarsEnabled(true);
}
onload = function()
{
if (window.testRunner)
......@@ -13,7 +17,6 @@ onload = function()
var elt = document.getElementById('elt');
range.selectNodeContents(elt);
if (window.internals) {
window.internals.settings.setOverlayScrollbarsEnabled(true);
window.internals.addTextMatchMarker(range, true);
}
if (window.eventSender) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment