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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/autoscroll-upwards-propagation-overflow-hidden-body.html

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the now unnecessary code from Patchset 1 Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script type="text/javascript">
4 var maxScrollLeftiFrame;
5
6 setPrintTestResultsLazily();
7 jsTestIsAsync = true;
8 description("This test insures that if an autoscroll starts from within a " +
9 "scrollable div, it does not propagate to its non-scrollabe document " +
10 "body. Furthermore, it tests that if the body has only either overflowX, " +
11 "of overflowY set to hidden, the scrollable axis actually scrolls. Note " +
12 "that this test is pertaining to crbug.com/531525.");
13
14 function finishTest() {
15 eventSender.mouseUp();
16 var iframe = document.getElementById('partialScrolliFrame');
17 var iframeDoc = iframe.contentDocument;
18 // Because only overflowY:hidden is set, horizontal scroll should happen and
19 // vertical scroll shouldn't.
20 if (iframeDoc.scrollingElement.scrollTop == 0 && iframeDoc.scrollingElement. scrollLeft == maxScrollLeftiFrame) {
21 testPassed("Document didn't scroll.");
22 } else {
23 testFailed("Document scrolled although overflow:hidden.");
24 }
25 document.getElementById('partialScrolliFrame').style.display = 'none';
26 finishJSTest();
27 }
28
29 window.onload = function () {
30 var iframe = document.getElementById('partialScrolliFrame');
31 var iframeDoc = iframe.contentDocument;
32 maxScrollLeftiFrame = iframeDoc.scrollingElement.scrollWidth - iframe.conten tWindow.innerWidth;
33
34 var element = iframeDoc.getElementById('select');
35 var x = iframe.offsetLeft + element.offsetLeft + 7;
36 var y = iframe.offsetTop + element.offsetTop + 7;
37 eventSender.dragMode = false;
38 eventSender.mouseMoveTo(x, y);
39 eventSender.mouseDown();
40 eventSender.mouseMoveTo(x + 800, y);
41 eventSender.mouseMoveTo(x + 800, y + 500);
42 window.requestAnimationFrame(finishTest);
43 }
44 </script>
45
46 <iframe id="partialScrolliFrame" src="resources/page-with-scrollable-div-overflo w-y-hidden-body.html"></iframe>
bokan 2015/09/29 19:42:49 Could you also copy this test with the only differ
skobes 2015/09/29 20:33:23 I think this is correct, <iframe scrolling="no"> s
ymalik 2015/09/30 00:41:08 Acknowledged.
ymalik 2015/09/30 00:41:08 Added autoscroll-upwards-propagation-no-scroll-ifr
47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698