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

Unified Diff: sky/specs/apis.md

Issue 694413006: Specs: DocumentFragment shouldn't need to track IDs (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 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: sky/specs/apis.md
diff --git a/sky/specs/apis.md b/sky/specs/apis.md
index 92ea5495cd75c3281e732942b16e22e467f75481..da345d9e9bc3054aa9dc4eff6562c7e7b052818e 100644
--- a/sky/specs/apis.md
+++ b/sky/specs/apis.md
@@ -115,17 +115,15 @@ module 'sky:core' {
virtual void valueChangeCallback(String? oldValue, String? newValue); // noop
}
- abstract class TreeRoot : ParentNode {
- Element? findId(String id); // O(1)
- }
-
- class DocumentFragment : TreeRoot {
+ class DocumentFragment : ParentNode {
constructor (ChildArguments... nodes); // O(N) in number of arguments plus all their descendants
}
- abstract class TreeScope : TreeRoot {
+ abstract class TreeScope : ParentNode {
readonly attribute Document? ownerDocument; // O(1)
readonly attribute TreeScope? parentScope; // O(1)
+
+ Element? findId(String id); // O(1)
}
class ShadowRoot : TreeScope {
@@ -142,9 +140,11 @@ module 'sky:core' {
Boolean matches(Element element); // O(F())
Element? find(Element root); // O(N*F())+O(M) where N is the number of descendants and M the average depth of the tree
- Element? find(TreeRoot root); // O(N*F()) where N is the number of descendants
+ Element? find(DocumentFragment root); // O(N*F())+O(M) where N is the number of descendants and M the average depth of the tree
+ Element? find(TreeScope root); // O(N*F()) where N is the number of descendants
Array<Element> findAll(Element root); // O(N*F())+O(N*M) where N is the number of descendants and M the average depth of the tree
- Array<Element> findAll(TreeRoot root); // O(N*F()) where N is the number of descendants
+ Array<Element> findAll(DocumentFragment root); // O(N*F())+O(N*M) where N is the number of descendants and M the average depth of the tree
+ Array<Element> findAll(TreeScope root); // O(N*F()) where N is the number of descendants
}
« 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