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

Unified Diff: third_party/WebKit/LayoutTests/svg/custom/touch-events.html

Issue 1405283006: Deprecate SVGElement.offsetParent/offsetTop/offsetLeft/offsetWidth/offsetHeight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests instead Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/svg/custom/touch-events.html
diff --git a/third_party/WebKit/LayoutTests/svg/custom/touch-events.html b/third_party/WebKit/LayoutTests/svg/custom/touch-events.html
index 6d13a69c0f25c405ed81f2512eb354b7fcb3e2cb..9dd4d8a754d48345f1dbfe8319c81d8731470e7a 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/touch-events.html
+++ b/third_party/WebKit/LayoutTests/svg/custom/touch-events.html
@@ -34,8 +34,9 @@
document.write('This test does not work in manual mode.');
} else {
var svg = document.getElementById('svg');
- var positionX = svg.offsetLeft + 30;
- var positionY = svg.offsetTop + 30;
+ var clientRect = svg.getBoundingClientRect();
+ var positionX = clientRect.left + 30;
+ var positionY = clientRect.top + 30;
// Touch, move, end.
eventSender.addTouchPoint(positionX, positionY);
@@ -83,4 +84,4 @@
<rect id="rect" x="20" y="20" width="60" height="60" fill="green" onclick="handleClick()" ontouchstart="handleTouchStart()" ontouchmove="handleTouchMove()" ontouchend="handleTouchEnd()" ontouchcancel="handleTouchCancel()"/>
</svg>
</body>
-</html>
+</html>

Powered by Google App Engine
This is Rietveld 408576698