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

Side by Side Diff: sky/specs/elements.md

Issue 943453004: Specs: remove previousSibling/nextSibling arguments to parentChangeCallback() since their purpose i… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Sky DOM APIs 1 Sky DOM APIs
2 ============ 2 ============
3 3
4 ```dart 4 ```dart
5 SKY MODULE 5 SKY MODULE
6 <!-- part of dart:sky --> 6 <!-- part of dart:sky -->
7 7
8 <script> 8 <script>
9 // ELEMENT TREE API 9 // ELEMENT TREE API
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 } 78 }
79 79
80 external void remove(); // O(N) in number of descendants 80 external void remove(); // O(N) in number of descendants
81 // parentNode must be non-null 81 // parentNode must be non-null
82 82
83 // called when parentNode changes 83 // called when parentNode changes
84 // this is why insertBefore(), append(), et al, are O(N) -- the whole affected subtree is walked 84 // this is why insertBefore(), append(), et al, are O(N) -- the whole affected subtree is walked
85 // mutating the element tree from within this is strongly discouraged, since i t will result in the 85 // mutating the element tree from within this is strongly discouraged, since i t will result in the
86 // callbacks being invoked while the element tree is in a different state than implied by the callbacks 86 // callbacks being invoked while the element tree is in a different state than implied by the callbacks
87 external void parentChangeCallback(ParentNode oldParent, ParentNode newParent, Node previousSibling, Node nextSibling); // O(N) in descendants 87 external void parentChangeCallback(ParentNode oldParent, ParentNode newParent) ; // O(N) in descendants
88 // default implementation calls attached/detached 88 // default implementation calls attached/detached
89 void attachedCallback() { } 89 void attachedCallback() { }
90 void detachedCallback() { } 90 void detachedCallback() { }
91 91
92 external List<ContentElement> getDestinationInsertionPoints(); // O(N) in numb er of insertion points the node is in 92 external List<ContentElement> getDestinationInsertionPoints(); // O(N) in numb er of insertion points the node is in
93 // returns the <content> elements to which this element was distributed 93 // returns the <content> elements to which this element was distributed
94 94
95 external Node cloneNode({bool deep: false}); // O(1) if deep=false, O(N) in th e number of descendants if deep=true 95 external Node cloneNode({bool deep: false}); // O(1) if deep=false, O(N) in th e number of descendants if deep=true
96 96
97 external ElementStyleDeclarationList get style; // O(1) 97 external ElementStyleDeclarationList get style; // O(1)
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 external bool matches(Element element); // O(F()) 397 external bool matches(Element element); // O(F())
398 external Element find(Node root); // O(N*F())+O(M) where N is the number of de scendants and M the average depth of the tree 398 external Element find(Node root); // O(N*F())+O(M) where N is the number of de scendants and M the average depth of the tree
399 external List<Element> findAll(Node root); // O(N*F())+O(N*M) where N is the n umber of descendants and M the average depth of the tree 399 external List<Element> findAll(Node root); // O(N*F())+O(N*M) where N is the n umber of descendants and M the average depth of the tree
400 // find() and findAll() throw if the root is not one of the following: 400 // find() and findAll() throw if the root is not one of the following:
401 // - Element 401 // - Element
402 // - Fragment 402 // - Fragment
403 // - Root 403 // - Root
404 } 404 }
405 </script> 405 </script>
406 ``` 406 ```
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698