Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index 17670110796e83861a25168051868d668922a254..cf086726fbe8103271194eea8f1122d2e7265bf7 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -13120,8 +13120,9 @@ abstract class Element extends Node implements GlobalEventHandlers, ParentNode, |
// offsetParent, "tops out" at BODY. But people could conceivably pass in |
// the document.documentElement and I want it to return an absolute offset, |
// so we have the special case checking for HTML. |
- bool foundAsParent = identical(current, parent) || parent.tagName == 'HTML'; |
- if (current == null || identical(current, parent)) { |
+ bool sameAsParent = identical(current, parent); |
+ bool foundAsParent = sameAsParent || parent.tagName == 'HTML'; |
+ if (current == null || sameAsParent) { |
if (foundAsParent) return new Point(0, 0); |
throw new ArgumentError("Specified element is not a transitive offset " |
"parent of this element."); |