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

Unified Diff: third_party/WebKit/LayoutTests/svg/animations/resources/SVGTestCase.js

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/animations/resources/SVGTestCase.js
diff --git a/third_party/WebKit/LayoutTests/svg/animations/resources/SVGTestCase.js b/third_party/WebKit/LayoutTests/svg/animations/resources/SVGTestCase.js
index c53ac75dbe74546cf84f87f42b6401d2748b811c..f93c8df5cc7aad0a38a69e750780cd0a17360132 100644
--- a/third_party/WebKit/LayoutTests/svg/animations/resources/SVGTestCase.js
+++ b/third_party/WebKit/LayoutTests/svg/animations/resources/SVGTestCase.js
@@ -45,8 +45,9 @@ function iframeLoaded() {
function clickAt(x, y) {
// Translation due to <h1> above us
- x = x + rootSVGElement.offsetLeft;
- y = y + rootSVGElement.offsetTop;
+ var clientRect = rootSVGElement.getBoundingClientRect();
+ x = x + clientRect.left;
+ y = y + clientRect.top;
if (window.eventSender) {
eventSender.mouseMoveTo(x, y);

Powered by Google App Engine
This is Rietveld 408576698