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

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

Issue 829113003: Specs: handle (in the parser) the case of an element constructor being (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | sky/specs/parsing.md » ('j') | 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 ```javascript 4 ```javascript
5 5
6 // DOM 6 // DOM
7 7
8 typedef ChildNode (Element or Text); 8 typedef ChildNode (Element or Text);
9 typedef ChildArgument (Element or Text or String); 9 typedef ChildArgument (Element or Text or String);
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 readonly attribute String tagName; // O(1) 70 readonly attribute String tagName; // O(1)
71 71
72 Boolean hasAttribute(String name); // O(N) in number of attributes 72 Boolean hasAttribute(String name); // O(N) in number of attributes
73 String getAttribute(String name); // O(N) in number of attributes 73 String getAttribute(String name); // O(N) in number of attributes
74 void setAttribute(String name, String value = ''); // O(N) in number of attrib utes 74 void setAttribute(String name, String value = ''); // O(N) in number of attrib utes
75 void removeAttribute(String name); // O(N) in number of attributes 75 void removeAttribute(String name); // O(N) in number of attributes
76 76
77 // Returns a new Array and new Attr instances every time. 77 // Returns a new Array and new Attr instances every time.
78 Array<Attr> getAttributes(); // O(N) in number of attributes 78 Array<Attr> getAttributes(); // O(N) in number of attributes
79 79
80 readonly attribute ShadowRoot? shadowRoot; // O(1) // returns the shadow root 80 readonly attribute ShadowRoot? shadowRoot; // O(1) // returns the shadow root // TODO(ianh): Should this be mutable? It would help explain how it gets set...
81 Array<ContentElement> getDestinationInsertionPoints(); // O(N) in number of in sertion points the node is in 81 Array<ContentElement> getDestinationInsertionPoints(); // O(N) in number of in sertion points the node is in
82 82
83 virtual void endTagParsedCallback(); // noop 83 virtual void endTagParsedCallback(); // noop
84 virtual void attributeChangeCallback(String name, String? oldValue, String? ne wValue); // noop 84 virtual void attributeChangeCallback(String name, String? oldValue, String? ne wValue); // noop
85 // TODO(ianh): does a node ever need to know when it's been redistributed? 85 // TODO(ianh): does a node ever need to know when it's been redistributed?
86 86
87 virtual LayoutManagerConstructor getLayoutManager(); // O(1) 87 virtual LayoutManagerConstructor getLayoutManager(); // O(1)
88 // default implementation looks up the 'display' property and returns the va lue: 88 // default implementation looks up the 'display' property and returns the va lue:
89 // if (renderNode) 89 // if (renderNode)
90 // return renderNode.getProperty(phDisplay); 90 // return renderNode.getProperty(phDisplay);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 Boolean matches(Element element); // O(F()) 283 Boolean matches(Element element); // O(F())
284 Element? find(Element root); // O(N*F())+O(M) where N is the number of descend ants and M the average depth of the tree 284 Element? find(Element root); // O(N*F())+O(M) where N is the number of descend ants and M the average depth of the tree
285 Element? find(DocumentFragment root); // O(N*F())+O(M) where N is the number o f descendants and M the average depth of the tree 285 Element? find(DocumentFragment root); // O(N*F())+O(M) where N is the number o f descendants and M the average depth of the tree
286 Element? find(TreeScope root); // O(N*F()) where N is the number of descendant s 286 Element? find(TreeScope root); // O(N*F()) where N is the number of descendant s
287 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 287 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
288 Array<Element> findAll(DocumentFragment root); // O(N*F())+O(N*M) where N is t he number of descendants and M the average depth of the tree 288 Array<Element> findAll(DocumentFragment root); // O(N*F())+O(N*M) where N is t he number of descendants and M the average depth of the tree
289 Array<Element> findAll(TreeScope root); // O(N*F()) where N is the number of d escendants 289 Array<Element> findAll(TreeScope root); // O(N*F()) where N is the number of d escendants
290 } 290 }
291 ``` 291 ```
OLDNEW
« no previous file with comments | « no previous file | sky/specs/parsing.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698