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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html

Issue 2441683002: Prevent AutoscrollForSelection when selecting text in a fixed-position element. (Closed)
Patch Set: findAutoscrollable should return 0 for fixed-position elements Created 4 years, 1 month 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 <script src="../../resources/testharness.js"></script>
2 <script src="../../resources/testharnessreport.js"></script>
3 <div style="height: 400px; position: fixed; width: 400px; top: 500px;">
4 <br />Fixed.......................
5 <br />Fixed.......................
6 <br />Fixed.......................
7 <br />Fixed.......................
8 <br />Fixed.......................
9 <br />Fixed.......................
10 <br />Fixed.......................
11 </div>
12 <div style="height: 2000px"></div>
13 <script>
14 var testFix = async_test('Selection-autoscroll should not be triggered when the selection is in a fixed-position element');
15 testFix.step(function() {
16 if (!window.eventSender)
17 return;
18 document.body.offsetTop;
bokan 2016/10/24 13:22:00 You shouldn't need this. If you're finding that la
sunyunjia 2016/10/24 14:10:25 Done.
19 var dragStartX = 50;
20 var dragStartY = 550;
21 var dragEndX = 60;
22 var dragMoveY = 580;
23 var dragEndY = 820;
24
25 eventSender.dragMode = false;
26 eventSender.mouseMoveTo(dragStartX, dragStartY);
27 eventSender.mouseDown();
28 eventSender.mouseMoveTo(dragEndX, dragMoveY);
29 eventSender.mouseMoveTo(dragEndX, dragEndY);
30
31 requestAnimationFrame(function() {
32 assert_equals(document.body.scrollTop, 0);
33 testFix.done();
34 });
35 });
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698