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

Unified Diff: third_party/WebKit/LayoutTests/svg/dynamic-updates/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/dynamic-updates/resources/SVGTestCase.js
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
index b27ff897256ace43dddd693559478b1d9ab285bc..1709ea808d5650816661ff05f7ddf25d6e344975 100644
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
+++ b/third_party/WebKit/LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
@@ -65,8 +65,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