Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(107)

Unified Diff: closure/goog/style/style.js

Issue 7528045: Fix goog.style.getBoundingClientRect_ for SVG documents in IE
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: closure/goog/style/style.js
diff --git a/closure/goog/style/style.js b/closure/goog/style/style.js
index d9fd6d8c0ff570d694ecda65f9c9171ffbadfa6b..532f830d99b81e4384ba3d36a48857c00bfa407b 100644
--- a/closure/goog/style/style.js
+++ b/closure/goog/style/style.js
@@ -416,8 +416,12 @@ goog.style.getBoundingClientRect_ = function(el) {
// See: http://msdn.microsoft.com/en-us/library/ms536433(VS.85).aspx
var doc = el.ownerDocument;
- rect.left -= doc.documentElement.clientLeft + doc.body.clientLeft;
- rect.top -= doc.documentElement.clientTop + doc.body.clientTop;
+ rect.left -= doc.documentElement.clientLeft;
+ rect.top -= doc.documentElement.clientTop;
+ if (doc.body) {
+ rect.left += doc.body.clientLeft;
+ rect.top += doc.body.clientTop;
+ }
}
return /** @type {Object} */ (rect);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b