- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
87 lines
2.9 KiB
C++
87 lines
2.9 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "ViewShadowNode.h"
|
|
#include <react/config/ReactNativeConfig.h>
|
|
#include <react/renderer/components/view/HostPlatformViewTraitsInitializer.h>
|
|
#include <react/renderer/components/view/primitives.h>
|
|
#include <react/utils/CoreFeatures.h>
|
|
|
|
namespace facebook::react {
|
|
|
|
const char ViewComponentName[] = "View";
|
|
|
|
ViewShadowNodeProps::ViewShadowNodeProps(
|
|
const PropsParserContext& context,
|
|
const ViewShadowNodeProps& sourceProps,
|
|
const RawProps& rawProps)
|
|
: ViewProps(context, sourceProps, rawProps){};
|
|
|
|
ViewShadowNode::ViewShadowNode(
|
|
const ShadowNodeFragment& fragment,
|
|
const ShadowNodeFamily::Shared& family,
|
|
ShadowNodeTraits traits)
|
|
: ConcreteViewShadowNode(fragment, family, traits) {
|
|
initialize();
|
|
}
|
|
|
|
ViewShadowNode::ViewShadowNode(
|
|
const ShadowNode& sourceShadowNode,
|
|
const ShadowNodeFragment& fragment)
|
|
: ConcreteViewShadowNode(sourceShadowNode, fragment) {
|
|
initialize();
|
|
}
|
|
|
|
void ViewShadowNode::initialize() noexcept {
|
|
auto& viewProps = static_cast<const ViewProps&>(*props_);
|
|
|
|
auto hasBorder = [&]() {
|
|
for (auto edge : yoga::ordinals<yoga::Edge>()) {
|
|
if (viewProps.yogaStyle.border(edge).isDefined()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
};
|
|
|
|
bool formsStackingContext = !viewProps.collapsable ||
|
|
viewProps.pointerEvents == PointerEventsMode::None ||
|
|
!viewProps.nativeId.empty() || viewProps.accessible ||
|
|
viewProps.opacity != 1.0 || viewProps.transform != Transform{} ||
|
|
(viewProps.zIndex.has_value() &&
|
|
viewProps.yogaStyle.positionType() != yoga::PositionType::Static) ||
|
|
viewProps.yogaStyle.display() == yoga::Display::None ||
|
|
viewProps.getClipsContentToBounds() || viewProps.events.bits.any() ||
|
|
isColorMeaningful(viewProps.shadowColor) ||
|
|
viewProps.accessibilityElementsHidden ||
|
|
viewProps.accessibilityViewIsModal ||
|
|
viewProps.importantForAccessibility != ImportantForAccessibility::Auto ||
|
|
viewProps.removeClippedSubviews || viewProps.cursor != Cursor::Auto ||
|
|
HostPlatformViewTraitsInitializer::formsStackingContext(viewProps);
|
|
|
|
bool formsView = formsStackingContext ||
|
|
isColorMeaningful(viewProps.backgroundColor) || hasBorder() ||
|
|
!viewProps.testId.empty() ||
|
|
HostPlatformViewTraitsInitializer::formsView(viewProps);
|
|
|
|
if (formsView) {
|
|
traits_.set(ShadowNodeTraits::Trait::FormsView);
|
|
} else {
|
|
traits_.unset(ShadowNodeTraits::Trait::FormsView);
|
|
}
|
|
|
|
if (formsStackingContext) {
|
|
traits_.set(ShadowNodeTraits::Trait::FormsStackingContext);
|
|
} else {
|
|
traits_.unset(ShadowNodeTraits::Trait::FormsStackingContext);
|
|
}
|
|
|
|
traits_.set(HostPlatformViewTraitsInitializer::extraTraits());
|
|
}
|
|
|
|
} // namespace facebook::react
|