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

Unified Diff: third_party/WebKit/LayoutTests/fast/scrolling/content-box-smaller-than-scrollbar.html

Issue 2893833004: When moving past a left-hand scrollbar, don't jump way outside the content box. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/scrolling/jquery-rtl-scroll-type.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/scrolling/content-box-smaller-than-scrollbar.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/content-box-smaller-than-scrollbar.html b/third_party/WebKit/LayoutTests/fast/scrolling/content-box-smaller-than-scrollbar.html
new file mode 100644
index 0000000000000000000000000000000000000000..6c101526d5308ca1f34e0431808b7e1b6ba4fce4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/content-box-smaller-than-scrollbar.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<style>
+ /* Avoid padding on the sides that have a scrollbar, since our current
+ behavior is inconsistent. */
+ .scrollable { overflow:scroll; width:2px; height:2px; border:solid; border-width:1px 2px 2px 1px; padding:1px 2px 0; }
+ .ltr { direction:ltr; padding-right:0; }
+ .rtl { direction:rtl; padding-left:0; }
+ .scrollable > div { width:500px; height:600px; }
+ .scrollable > div.inline-block { display:inline-block; vertical-align:top; }
+</style>
+<div class="scrollable ltr" id="ltrWithBlockLevel">
+ <div></div>
+</div>
+<div class="scrollable rtl" id="rtlWithBlockLevel">
+ <div></div>
+</div>
+<div class="scrollable ltr" id="ltrWithInlineLevel">
+ <div class="inline-block"></div>
+</div>
+<div class="scrollable rtl" id="rtlWithInlineLevel">
+ <div class="inline-block"></div>
+</div>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ test(function() {
+ var elm = document.getElementById("ltrWithBlockLevel");
+ assert_equals(elm.scrollWidth, 502);
+ assert_equals(elm.scrollHeight, 601);
+ }, "LTR scrollable with block-level child");
+ test(function() {
+ var elm = document.getElementById("rtlWithBlockLevel");
+ assert_equals(elm.scrollWidth, 502);
+ assert_equals(elm.scrollHeight, 601);
+ }, "RTL scrollable with block-level child");
+ test(function() {
+ var elm = document.getElementById("ltrWithInlineLevel");
+ assert_equals(elm.scrollWidth, 502);
+ assert_equals(elm.scrollHeight, 601);
+ }, "LTR scrollable with inline-level child");
+ test(function() {
+ var elm = document.getElementById("rtlWithInlineLevel");
+ assert_equals(elm.scrollWidth, 502);
+ assert_equals(elm.scrollHeight, 601);
+ }, "RTL scrollable with inline-level child");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/scrolling/jquery-rtl-scroll-type.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698