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

Side by Side Diff: third_party/pkg/angular/lib/core_dom/block.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of angular.core.dom; 1 part of angular.core.dom;
2 2
3 /** 3 /**
4 * ElementWrapper is an interface for [Block]s and [BlockHole]s. Its purpose is 4 * ElementWrapper is an interface for [Block]s and [BlockHole]s. Its purpose is
5 * to allow treating [Block] and [BlockHole] under same interface so that 5 * to allow treating [Block] and [BlockHole] under same interface so that
6 * [Block]s can be added after [BlockHole]. 6 * [Block]s can be added after [BlockHole].
7 */ 7 */
8 abstract class ElementWrapper { 8 abstract class ElementWrapper {
9 List<dom.Node> elements; 9 List<dom.Node> elements;
10 ElementWrapper next; 10 ElementWrapper next;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (!preventDefault) { 71 if (!preventDefault) {
72 insertDomElements(); 72 insertDomElements();
73 } 73 }
74 return this; 74 return this;
75 } 75 }
76 76
77 Block remove() { 77 Block remove() {
78 bool preventDefault = false; 78 bool preventDefault = false;
79 79
80 Function removeDomElements = () { 80 Function removeDomElements = () {
81 for (var j = 0; j < elements.length; j++) { 81 for(var j = 0, jj = elements.length; j < jj; j++) {
82 dom.Node current = elements[j]; 82 dom.Node current = elements[j];
83 dom.Node next = j+1 < elements.length ? elements[j+1] : null; 83 dom.Node next = j+1 < jj ? elements[j+1] : null;
84 84
85 while(next != null && current.nextNode != next) { 85 while(next != null && current.nextNode != next) {
86 current.nextNode.remove(); 86 current.nextNode.remove();
87 } 87 }
88 elements[j].remove(); 88 elements[j].remove();
89 } 89 }
90 }; 90 };
91 91
92 if (onRemove != null) { 92 if (onRemove != null) {
93 onRemove({ 93 onRemove({
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 * and act as references which allows more blocks to be added. 141 * and act as references which allows more blocks to be added.
142 */ 142 */
143 class BlockHole extends ElementWrapper { 143 class BlockHole extends ElementWrapper {
144 List<dom.Node> elements; 144 List<dom.Node> elements;
145 ElementWrapper previous; 145 ElementWrapper previous;
146 ElementWrapper next; 146 ElementWrapper next;
147 147
148 BlockHole(this.elements); 148 BlockHole(this.elements);
149 } 149 }
150 150
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/core/zone.dart ('k') | third_party/pkg/angular/lib/core_dom/block_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698