From a2b4ed2f1aec513aaa1e42060a3a00a6dc1653f4 Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 22 Dec 2014 10:37:34 -0800 Subject: [PATCH] Specs: Make isNew only get set if it's not added in the same frame as the owner layout manager Review URL: https://codereview.chromium.org/817353003 --- specs/style.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/specs/style.md b/specs/style.md index 43b8cb445f1..5b4a9981321 100644 --- a/specs/style.md +++ b/specs/style.md @@ -269,6 +269,8 @@ StyleNode The types marked with * in the list above are not part of sky:core. +TODO(ianh): consider removing 'StyleValue' from these class names + ```javascript abstract class StyleNode { abstract void markDirty(); @@ -326,11 +328,11 @@ class PixelLengthStyleValue : LengthStyleValue { Float resolve(PropertyHandle property, RenderNode node, StyleValueResolverSettings? settings = null); } -typedef Color Float; // TODO(ianh): figure out what Color should be +typedef RawColor Float; // TODO(ianh): figure out what Color should be class ColorStyleValue : LengthStyleValue { constructor(StyleNode parentNode, Float red, Float green, Float blue, Float alpha); // ... color API ... - Color resolve(PropertyHandle property, RenderNode node, StyleValueResolverSettings? settings = null); + RawColor resolve(PropertyHandle property, RenderNode node, StyleValueResolverSettings? settings = null); } class AbstractOpaqueStyleValue : AbstractStyleValue { @@ -500,8 +502,10 @@ rooted at the document's RenderNode. If you come across a node that doesn't have an assigned RenderNode, 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". +pointing to the parent RenderNode's layoutManager, if it has one, and, +if it has one and autoreap is false on that layout manager, mark the +new node "isNew". (This means that when a node is marked isNew, the +layout manager has already laid out at least one frame.) For each element, if the node's needsManager is true, call getLayoutManager() on the element, and if that's not null, and if the