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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 19590007: [mdv] template.ref must recursive to find the original source template (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: revert file generated by dom.py Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 4a510d06ddabc60eaa179e95919a59700529bedb..a3b28b2fb72301ac8ccf82a2e91dbff6c14d06f0 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -8896,7 +8896,7 @@ abstract class Element extends Node implements ElementTraversal {
Element get ref {
_ensureTemplate();
- Element ref = null;
+ Element result = null;
var refId = attributes['ref'];
if (refId != null) {
var treeScope = this;
@@ -8910,11 +8910,17 @@ abstract class Element extends Node implements ElementTraversal {
treeScope is ShadowRoot ||
treeScope is svg.SvgSvgElement) {
- ref = treeScope.getElementById(refId);
+ result = treeScope.getElementById(refId);
}
}
- return ref != null ? ref : _templateInstanceRef;
+ if (result == null) {
+ result = _templateInstanceRef;
+ if (result == null) return this;
+ }
+
+ var nextRef = result.ref;
+ return nextRef != null ? nextRef : result;
}
/**

Powered by Google App Engine
This is Rietveld 408576698