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

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: exposeRect() : Removing borderTop from localExposeRect of scrollable box Created 6 years, 3 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..0976a862681407717845788969d667322a141858
--- /dev/null
+++ b/LayoutTests/fast/scroll-behavior/bordered-container-child-scroll.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script src="../../resources/js-test.js"></script>
+ <style type="text/css">
+ .grid {
+ width: 150px;
+ height: 150px;
+ border: solid 5px purple;
+ overflow: auto;
pals 2014/09/24 12:31:35 Indentations.
+ }
+ .row {
+ height: 25px;
+ box-sizing: border-box;
+ background: black;
+ outline: solid 1px green;
+ outline-offset: -1px;
+ color: white;
+ }
+ </style>
+ </head>
+ <body>
pals 2014/09/24 12:31:36 Not needed.
+ <p id="description"></p>
pals 2014/09/24 12:31:35 Not needed.
+ <div id="console"></div>
pals 2014/09/24 12:31:35 Not needed.
+ <script>
pals 2014/09/24 12:31:35 Put it in <head>
+ description('Issue crbug.com/295848: element.scrollIntoViewIfNeeded() does not scroll the entire element render box into view.');
+ var scrollTop = 0;
+ var grid = document.createElement('div');
+ grid.id = "Grid";
+ grid.className = 'grid';
+ document.body.appendChild(grid);
+ for (var i = 0; i < 10; ++i) {
+ var row = document.createElement('div');
+ row.className = 'row';
+ if(i == 1 | i == 8)
+ row.style.backgroundColor = "white";
+ grid.appendChild(row);
+ }
+
+ grid.scrollTop = 100;
+ var row = grid.getElementsByTagName('div')[1];
+ row.scrollIntoViewIfNeeded(false);
+ scrollTop = grid.scrollTop;
+ shouldBeEqualToNumber('scrollTop', 25);
+
+ row = grid.getElementsByTagName('div')[8];
+ row.scrollIntoViewIfNeeded(false);
+ scrollTop = grid.scrollTop;
+ shouldBeEqualToNumber('scrollTop', 75);
pals 2014/09/24 12:31:36 Can you put a comment about significance of number
+
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698