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

Unified Diff: sky/specs/style.md

Issue 810003003: Specs: Change from the every-frame-walk for animations on dead nodes to just relying on actual anim… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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/style.md
diff --git a/sky/specs/style.md b/sky/specs/style.md
index 214750bcc861a016ec8b5d3f334309b2ec44e330..5770a47e6532034b27096deffb4ced9a358d46f0 100644
--- a/sky/specs/style.md
+++ b/sky/specs/style.md
@@ -496,8 +496,10 @@ taking into account shadow trees and child distribution, and the tree
rooted at the document's RenderNode.
If you come across a node that doesn't have an assigned RenderNode,
-then create one and mark it "isNew", and place it in the appropriate
-place in the RenderTree tree, after any nodes marked isGhost.
+then create one, placing it in the appropriate place in the RenderTree
+tree, after any nodes marked isGhost=true, with ownerLayoutManager
+pointing to the parent RenderNode's layoutManager, and then, if
+autoreap is false on the ownerLayoutManager, mark it "isNew".
For each element, if the node's needsManager is true, call
getLayoutManager() on the element, and if that's not null, and if the
@@ -522,6 +524,11 @@ be faster.)
When an Element is to be removed from its parent, regardless of the
above, the node's renderNode attribute should be nulled out.
+When a RenderNode is added with isNew=true, call its parent
+RenderNode's LayoutManager's childAdded() callback. When a a
+RenderNode has its isGhost property set to true, then call it's parent
+RenderNode's LayoutManager's childRemoved() callback.
+
```javascript
callback any ValueResolver (any value, String propertyName, RenderNode node, Float containerWidth, Float containerHeight);
@@ -668,6 +675,10 @@ class LayoutManager : EventTarget {
virtual void release(RenderNode victim);
// called when the RenderNode was removed from the tree
+ virtual void childAdded(RenderNode child);
+ virtual void childRemoved(RenderNode child);
+ // called when a child has its isNew or isGhost attributes set respectively
+
void setChildPosition(child, x, y); // sets child.x, child.y
void setChildX(child, y); // sets child.x
void setChildY(child, y); // sets child.y
« 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