testing/web-platform/tests/css/cssom-view/scrollLeft-of-scroller-with-wider-scrollbar.html
author Cathie Chen <cathiechen@igalia.com>
Mon, 14 Oct 2019 13:39:59 +0000
changeset 498149 65016d3b9885fe7e43f4035837c73071e40e548b
child 499129 7b6db57b8802fdc44f4ecd786611e646bb8251a2
permissions -rw-r--r--
Bug 1587024 [wpt PR 19566] - The size of OverflowClipRect is negative, a=testonly Automatic update from web-platform-tests The size of OverflowClipRect is negative When scrollbar wider than the scrollar, the size of OverflowClipRect is negative which will affect the value of scroll offset. This patch make the size non-negative. Bug: 987566 Change-Id: I7fa80e4a17bc48303713a1a191230d0b3e7d0dd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1840492 Commit-Queue: cathie chen <cathiechen@igalia.com> Reviewed-by: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#703662} -- wpt-commits: 6e56893172d7f8bc833e9859c97ad5e52e9eb937 wpt-pr: 19566

<!DOCTYPE html>
<title>The maximum value of scrollLeft shouldn't be affected by scrollbar when it's wider than scroller</title>
<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrollleft">

<div id="scroller" style="overflow: scroll; width: 5px;height: 300px;">
    <div style="width:100px; height: 1px"></div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
    test(function() {
        scroller.scrollLeft = 1000;
        assert_equals(scroller.scrollLeft, 100);
    }, "Test the maxium value of scrollLeft");
</script>