Promote shadowColor to formsStackingContext property

Summary:
Changelog: [Internal]

View with `ShadowColor` was getting flattened and therefore views didn't have shadow property set.
This is fixed by promoting ShadowColor so in case it is set, it forms stacking context.

Reviewed By: shergin

Differential Revision: D20792201

fbshipit-source-id: 1033ac00e32047ffbb14e61b7c26348c578d132d
This commit is contained in:
Samuel Susla 2020-04-01 10:40:07 -07:00 коммит произвёл Facebook GitHub Bot
Родитель e653cb06f8
Коммит 3591b7a956
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -44,11 +44,11 @@ void ViewShadowNode::initialize() noexcept {
!viewProps.nativeId.empty() || viewProps.accessible ||
viewProps.opacity != 1.0 || viewProps.transform != Transform{} ||
viewProps.zIndex != 0 || viewProps.getClipsContentToBounds() ||
viewProps.yogaStyle.positionType() == YGPositionTypeAbsolute;
viewProps.yogaStyle.positionType() == YGPositionTypeAbsolute ||
isColorMeaningful(viewProps.shadowColor);
bool formsView = isColorMeaningful(viewProps.backgroundColor) ||
isColorMeaningful(viewProps.foregroundColor) ||
isColorMeaningful(viewProps.shadowColor) ||
!(viewProps.yogaStyle.border() == YGStyle::Edges{});
formsView = formsView || formsStackingContext;