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

Unified Diff: LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html

Issue 568453002: Removing container's Left & Top border from computed scroll offset bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reduced layout test file contents from javascript, style and html content Created 6 years, 2 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
Index: LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
diff --git a/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html b/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
new file mode 100644
index 0000000000000000000000000000000000000000..df2442556a48772a0497f11c3e3c2ab88a68b959
--- /dev/null
+++ b/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<script src="../../resources/js-test.js"></script>
+<style>
+ td {
+ width: 48px;
+ height: 48px;
+ outline: solid 1px red;
+ }
+</style>
+<div id="parent" style="width: 65px; height: 65px; border: solid 5px black; overflow: scroll;">
+ <table id="Grid" style="width: 150px; border-collapse: collapse;">
+ <tr>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+<script>
+ description('Issue crbug.com/295848: element.scrollIntoViewIfNeeded() does not scroll the entire element render box into view.');
+ if (window.testRunner)
+ testRunner.dumpAsText(true);
+
+ var parent = document.getElementById("parent");
+ var table = document.getElementById("Grid");
+
+ table.rows[1].cells[1].scrollIntoViewIfNeeded(false);
+ shouldBeEqualToNumber('parent.scrollTop', 50);
+ shouldBeEqualToNumber('parent.scrollLeft', 50);
+
+ table.rows[0].cells[0].scrollIntoViewIfNeeded(false);
+ shouldBeEqualToNumber('parent.scrollTop', 0);
+ shouldBeEqualToNumber('parent.scrollLeft', 0);
+</script>

Powered by Google App Engine
This is Rietveld 408576698