mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Summary: @public This diff makes it so ReactShadowNode holds a CSSNode instead of extending one. This will enable us to pool and re-use CSSNodes and will allow us to keep from breaking the CSSNode api assumption that nodes that have measure functions don't have children (right now, text nodes have measure functions, but they also have raw text children). BREAKING This diff makes ReactShadowNode no longer extend CSSNodeDEPRECATED. If you have code that depended on that, e.g. via instanceof checks, that will no longer work as expected. Subclasses that override getChildAt/addChildAt/etc will need to update your method signatures. There should be no runtime behavior changes. Reviewed By: emilsjolander Differential Revision: D4153818
22 lines
627 B
Java
22 lines
627 B
Java
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
package com.facebook.react.flat;
|
|
|
|
/**
|
|
* Root node of the shadow node hierarchy. Currently, the only node that can actually map to a View.
|
|
*/
|
|
/* package */ final class FlatRootShadowNode extends FlatShadowNode {
|
|
|
|
/* package */ FlatRootShadowNode() {
|
|
forceMountToView();
|
|
signalBackingViewIsCreated();
|
|
}
|
|
}
|