Introduce @ReactProp-enabled LayoutShadowNode as a baseclass for most of the shadow nodes.

Differential Revision: D2540232

fb-gh-sync-id: 6dfed70c8253973897f4e447377ec5561862da23
This commit is contained in:
Krzysztof Magiera
2015-10-14 01:27:38 -07:00
committed by facebook-github-bot-9
parent 9493e96e13
commit 589df04846
10 changed files with 197 additions and 201 deletions

View File

@@ -167,20 +167,13 @@ public class ReactShadowNode extends CSSNode {
ViewManagersPropertyCache.getNativePropSettersForShadowNodeClass(getClass());
ReadableMap propMap = props.mBackingMap;
ReadableMapKeySeyIterator iterator = propMap.keySetIterator();
// TODO(krzysztof): Remove missingSetters code once all views are migrated to @ReactProp
boolean missingSetters = false;
while (iterator.hasNextKey()) {
String key = iterator.nextKey();
ViewManagersPropertyCache.PropSetter setter = propSetters.get(key);
if (setter != null) {
setter.updateShadowNodeProp(this, props);
} else {
missingSetters = true;
}
}
if (missingSetters) {
updateShadowNode(props);
}
onAfterUpdateTransaction();
}
@@ -188,11 +181,6 @@ public class ReactShadowNode extends CSSNode {
// no-op
}
@Deprecated
public void updateShadowNode(CatalystStylesDiffMap styles) {
BaseCSSPropertyApplicator.applyCSSProperties(this, styles);
}
/**
* Called after layout step at the end of the UI batch from {@link UIManagerModule}. May be used
* to enqueue additional ui operations for the native view. Will only be called on nodes marked