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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <style type="text/css">
6 .grid {
7 width: 150px;
8 height: 150px;
9 border: solid 5px purple;
10 overflow: auto;
pals 2014/09/24 12:31:35 Indentations.
11 }
12 .row {
13 height: 25px;
14 box-sizing: border-box;
15 background: black;
16 outline: solid 1px green;
17 outline-offset: -1px;
18 color: white;
19 }
20 </style>
21 </head>
22 <body>
pals 2014/09/24 12:31:36 Not needed.
23 <p id="description"></p>
pals 2014/09/24 12:31:35 Not needed.
24 <div id="console"></div>
pals 2014/09/24 12:31:35 Not needed.
25 <script>
pals 2014/09/24 12:31:35 Put it in <head>
26 description('Issue crbug.com/295848: element.scrollIntoViewIfNeeded( ) does not scroll the entire element render box into view.');
27 var scrollTop = 0;
28 var grid = document.createElement('div');
29 grid.id = "Grid";
30 grid.className = 'grid';
31 document.body.appendChild(grid);
32 for (var i = 0; i < 10; ++i) {
33 var row = document.createElement('div');
34 row.className = 'row';
35 if(i == 1 | i == 8)
36 row.style.backgroundColor = "white";
37 grid.appendChild(row);
38 }
39
40 grid.scrollTop = 100;
41 var row = grid.getElementsByTagName('div')[1];
42 row.scrollIntoViewIfNeeded(false);
43 scrollTop = grid.scrollTop;
44 shouldBeEqualToNumber('scrollTop', 25);
45
46 row = grid.getElementsByTagName('div')[8];
47 row.scrollIntoViewIfNeeded(false);
48 scrollTop = grid.scrollTop;
49 shouldBeEqualToNumber('scrollTop', 75);
pals 2014/09/24 12:31:36 Can you put a comment about significance of number
50
51 </script>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698