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

Side by Side Diff: LayoutTests/fast/events/drag-in-flex.html

Issue 1057953002: Make flexibleBox visible position cadidate only where it is editable. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use helvetica if possible. Created 5 years, 8 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 <style>
2 div {
3 display: flex;
4 font-family: 'Helvetica Neue', sans-serif;
5 zoom: 150%;
6 }
7
8 </style>
9 <div>
10 <span>Drag from behind of button to this text.</span>
11 <button></button>
12 </div>
13 <script>
14 function applyZoom(rect, zoom)
15 {
16 var newRect = {
17 left : rect.left * zoom,
18 top : rect.top * zoom,
19 width : rect.width * zoom,
20 height : rect.height * zoom
21 };
22 return newRect;
23 };
24
25 var zoom = getComputedStyle(document.querySelector('div')).getPropertyValue('zoo m');
26 var buttonRect = applyZoom(document.querySelector('button').getBoundingClientRec t(), zoom);
27 var spanRect = applyZoom(document.querySelector('span').getBoundingClientRect(), zoom);
28
29 if (window.testRunner) {
30 eventSender.mouseMoveTo(buttonRect.left + buttonRect.width * 2, buttonRect.top + buttonRect.height / 2);
31 eventSender.mouseDown();
32 eventSender.leapForward(100);
33 eventSender.mouseMoveTo(spanRect.left + spanRect.width / 2, spanRect.top + spa nRect.height / 2);
34 eventSender.mouseUp();
35 }
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698