mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
128c9343c4
Summary: A few fixes: * missing include: folly/Optional.h * switch folly::Optional's `has_value()` to `hasValue()` for now until folly is upgraded to newer version * fix up import for RCTTextAttributes.h * fix up includes for "conversions.h" to use namespaced includes Reviewed By: mmmulani Differential Revision: D8021149 fbshipit-source-id: d3955986d3ab6b1d9b61ac1e385767893ce57e5e
31 lines
797 B
C++
31 lines
797 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "RootShadowNode.h"
|
|
|
|
#include <fabric/view/conversions.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
ComponentName RootShadowNode::getComponentName() const {
|
|
return ComponentName("RootView");
|
|
}
|
|
|
|
void RootShadowNode::layout() {
|
|
ensureUnsealed();
|
|
layout(getProps()->layoutContext);
|
|
|
|
// This is the rare place where shadow node must layout (set `layoutMetrics`)
|
|
// itself because there is no a parent node which usually should do it.
|
|
YGNode *yogaNode = const_cast<YGNode *>(yogaNode_.get());
|
|
setLayoutMetrics(layoutMetricsFromYogaNode(*yogaNode));
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|