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}
diff --git a/css/cssom-view/scrollLeft-of-scroller-with-wider-scrollbar.html b/css/cssom-view/scrollLeft-of-scroller-with-wider-scrollbar.html
new file mode 100644
index 0000000..062edaf
--- /dev/null
+++ b/css/cssom-view/scrollLeft-of-scroller-with-wider-scrollbar.html
@@ -0,0 +1,16 @@
+<!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>