Skip to content

Commit

Permalink
Remove duplication of default field values in iterator-based prop par…
Browse files Browse the repository at this point in the history
…sing (#36051)

Summary:
Pull Request resolved: #36051

[Changelog][Internal]

This has been on my backlog for some time, submitting the diff to get it out of the way.

It makes the macro-based code in the "iterator-based property parsing" branch somewhat less horrible and less error prone (by removing duplication vs the default values in the class declaration).

Reviewed By: sammy-SC

Differential Revision: D42990595

fbshipit-source-id: e4b91160c6e09d3d1eab2ba70a58d390243bb335
  • Loading branch information
rshest authored and facebook-github-bot committed Feb 3, 2023
1 parent 39bdb34 commit 82a7968
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 182 deletions.
16 changes: 9 additions & 7 deletions ReactCommon/react/renderer/components/image/ImageProps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ void ImageProps::setProp(
// reuse the same values.
ViewProps::setProp(context, hash, propName, value);

static auto defaults = ImageProps{};

switch (hash) {
RAW_SET_PROP_SWITCH_CASE(sources, "source", {});
RAW_SET_PROP_SWITCH_CASE(defaultSources, "defaultSource", {});
RAW_SET_PROP_SWITCH_CASE_BASIC(resizeMode, ImageResizeMode::Stretch);
RAW_SET_PROP_SWITCH_CASE_BASIC(blurRadius, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(capInsets, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(tintColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(internal_analyticTag, {});
RAW_SET_PROP_SWITCH_CASE(sources, "source");
RAW_SET_PROP_SWITCH_CASE(defaultSources, "defaultSource");
RAW_SET_PROP_SWITCH_CASE_BASIC(resizeMode);
RAW_SET_PROP_SWITCH_CASE_BASIC(blurRadius);
RAW_SET_PROP_SWITCH_CASE_BASIC(capInsets);
RAW_SET_PROP_SWITCH_CASE_BASIC(tintColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(internal_analyticTag);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,42 +322,42 @@ void ScrollViewProps::setProp(
// reuse the same values.
ViewProps::setProp(context, hash, propName, value);

static auto defaults = ScrollViewProps{};

switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(alwaysBounceHorizontal, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(alwaysBounceVertical, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(bounces, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(bouncesZoom, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(canCancelContentTouches, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(centerContent, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(automaticallyAdjustContentInsets, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(
automaticallyAdjustsScrollIndicatorInsets, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(decelerationRate, (Float)0.998);
RAW_SET_PROP_SWITCH_CASE_BASIC(directionalLockEnabled, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(indicatorStyle, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(keyboardDismissMode, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(maximumZoomScale, (Float)1.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(minimumZoomScale, (Float)1.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollEnabled, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(pagingEnabled, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(pinchGestureEnabled, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollsToTop, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsHorizontalScrollIndicator, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsVerticalScrollIndicator, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollEventThrottle, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(zoomScale, (Float)1.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(contentInset, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(contentOffset, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollIndicatorInsets, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToInterval, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToAlignment, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(disableIntervalMomentum, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToOffsets, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToStart, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToEnd, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(
contentInsetAdjustmentBehavior, ContentInsetAdjustmentBehavior::Never);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollToOverflowEnabled, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(alwaysBounceHorizontal);
RAW_SET_PROP_SWITCH_CASE_BASIC(alwaysBounceVertical);
RAW_SET_PROP_SWITCH_CASE_BASIC(bounces);
RAW_SET_PROP_SWITCH_CASE_BASIC(bouncesZoom);
RAW_SET_PROP_SWITCH_CASE_BASIC(canCancelContentTouches);
RAW_SET_PROP_SWITCH_CASE_BASIC(centerContent);
RAW_SET_PROP_SWITCH_CASE_BASIC(automaticallyAdjustContentInsets);
RAW_SET_PROP_SWITCH_CASE_BASIC(automaticallyAdjustsScrollIndicatorInsets);
RAW_SET_PROP_SWITCH_CASE_BASIC(decelerationRate);
RAW_SET_PROP_SWITCH_CASE_BASIC(directionalLockEnabled);
RAW_SET_PROP_SWITCH_CASE_BASIC(indicatorStyle);
RAW_SET_PROP_SWITCH_CASE_BASIC(keyboardDismissMode);
RAW_SET_PROP_SWITCH_CASE_BASIC(maximumZoomScale);
RAW_SET_PROP_SWITCH_CASE_BASIC(minimumZoomScale);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollEnabled);
RAW_SET_PROP_SWITCH_CASE_BASIC(pagingEnabled);
RAW_SET_PROP_SWITCH_CASE_BASIC(pinchGestureEnabled);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollsToTop);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsHorizontalScrollIndicator);
RAW_SET_PROP_SWITCH_CASE_BASIC(showsVerticalScrollIndicator);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollEventThrottle);
RAW_SET_PROP_SWITCH_CASE_BASIC(zoomScale);
RAW_SET_PROP_SWITCH_CASE_BASIC(contentInset);
RAW_SET_PROP_SWITCH_CASE_BASIC(contentOffset);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollIndicatorInsets);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToInterval);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToAlignment);
RAW_SET_PROP_SWITCH_CASE_BASIC(disableIntervalMomentum);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToOffsets);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToStart);
RAW_SET_PROP_SWITCH_CASE_BASIC(snapToEnd);
RAW_SET_PROP_SWITCH_CASE_BASIC(contentInsetAdjustmentBehavior);
RAW_SET_PROP_SWITCH_CASE_BASIC(scrollToOverflowEnabled);
}
}

Expand Down
6 changes: 4 additions & 2 deletions ReactCommon/react/renderer/components/text/ParagraphProps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void ParagraphProps::setProp(
ViewProps::setProp(context, hash, propName, value);
BaseTextProps::setProp(context, hash, propName, value);

static auto defaults = ParagraphProps{};

// ParagraphAttributes has its own switch statement - to keep all
// of these fields together, and because there are some collisions between
// propnames parsed here and outside of ParagraphAttributes.
Expand Down Expand Up @@ -119,8 +121,8 @@ void ParagraphProps::setProp(
}

switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(isSelectable, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(onTextLayout, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(isSelectable);
RAW_SET_PROP_SWITCH_CASE_BASIC(onTextLayout);
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ void AndroidTextInputProps::setProp(
ViewProps::setProp(context, hash, propName, value);
BaseTextProps::setProp(context, hash, propName, value);

static auto defaults = AndroidTextInputProps{};

// ParagraphAttributes has its own switch statement - to keep all
// of these fields together, and because there are some collisions between
// propnames parsed here and outside of ParagraphAttributes. For example,
Expand Down Expand Up @@ -323,55 +325,59 @@ void AndroidTextInputProps::setProp(
}

switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(autoComplete, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyLabel, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(numberOfLines, 0);
RAW_SET_PROP_SWITCH_CASE_BASIC(disableFullscreenUI, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(textBreakStrategy, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(underlineColorAndroid, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImageLeft, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImagePadding, 0);
RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAutofill, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(showSoftInputOnFocus, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(autoCapitalize, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(autoCorrect, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(autoFocus, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(allowFontScaling, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(maxFontSizeMultiplier, (Float)0.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(editable, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(keyboardType, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyType, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(maxLength, 0);
RAW_SET_PROP_SWITCH_CASE_BASIC(multiline, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(placeholder, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(placeholderTextColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(secureTextEntry, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(selectionColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(selection, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(this->value, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(defaultValue, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(selectTextOnFocus, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(submitBehavior, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(caretHidden, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(contextMenuHidden, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowRadius, (Float)0.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(textDecorationLine, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(fontStyle, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowOffset, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(lineHeight, (Float)0.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(textTransform, {});
// RAW_SET_PROP_SWITCH_CASE_BASIC(color, {0}); // currently not being parsed
RAW_SET_PROP_SWITCH_CASE_BASIC(letterSpacing, (Float)0.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontSize, (Float)0.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(textAlign, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(includeFontPadding, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontWeight, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(fontFamily, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(textAlignVertical, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(cursorColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(mostRecentEventCount, 0);
RAW_SET_PROP_SWITCH_CASE_BASIC(text, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(autoComplete);
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyLabel);
RAW_SET_PROP_SWITCH_CASE_BASIC(numberOfLines);
RAW_SET_PROP_SWITCH_CASE_BASIC(disableFullscreenUI);
RAW_SET_PROP_SWITCH_CASE_BASIC(textBreakStrategy);
RAW_SET_PROP_SWITCH_CASE_BASIC(underlineColorAndroid);
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImageLeft);
RAW_SET_PROP_SWITCH_CASE_BASIC(inlineImagePadding);
RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAutofill);
RAW_SET_PROP_SWITCH_CASE_BASIC(showSoftInputOnFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(autoCapitalize);
RAW_SET_PROP_SWITCH_CASE_BASIC(autoCorrect);
RAW_SET_PROP_SWITCH_CASE_BASIC(autoFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(allowFontScaling);
RAW_SET_PROP_SWITCH_CASE_BASIC(maxFontSizeMultiplier);
RAW_SET_PROP_SWITCH_CASE_BASIC(editable);
RAW_SET_PROP_SWITCH_CASE_BASIC(keyboardType);
RAW_SET_PROP_SWITCH_CASE_BASIC(returnKeyType);
RAW_SET_PROP_SWITCH_CASE_BASIC(maxLength);
RAW_SET_PROP_SWITCH_CASE_BASIC(multiline);
RAW_SET_PROP_SWITCH_CASE_BASIC(placeholder);
RAW_SET_PROP_SWITCH_CASE_BASIC(placeholderTextColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(secureTextEntry);
RAW_SET_PROP_SWITCH_CASE_BASIC(selectionColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(selection);
RAW_SET_PROP_SWITCH_CASE_BASIC(defaultValue);
RAW_SET_PROP_SWITCH_CASE_BASIC(selectTextOnFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(submitBehavior);
RAW_SET_PROP_SWITCH_CASE_BASIC(caretHidden);
RAW_SET_PROP_SWITCH_CASE_BASIC(contextMenuHidden);
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowRadius);
RAW_SET_PROP_SWITCH_CASE_BASIC(textDecorationLine);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontStyle);
RAW_SET_PROP_SWITCH_CASE_BASIC(textShadowOffset);
RAW_SET_PROP_SWITCH_CASE_BASIC(lineHeight);
RAW_SET_PROP_SWITCH_CASE_BASIC(textTransform);
// RAW_SET_PROP_SWITCH_CASE_BASIC(color);
RAW_SET_PROP_SWITCH_CASE_BASIC(letterSpacing);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontSize);
RAW_SET_PROP_SWITCH_CASE_BASIC(textAlign);
RAW_SET_PROP_SWITCH_CASE_BASIC(includeFontPadding);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontWeight);
RAW_SET_PROP_SWITCH_CASE_BASIC(fontFamily);
RAW_SET_PROP_SWITCH_CASE_BASIC(textAlignVertical);
RAW_SET_PROP_SWITCH_CASE_BASIC(cursorColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(mostRecentEventCount);
RAW_SET_PROP_SWITCH_CASE_BASIC(text);

case CONSTEXPR_RAW_PROPS_KEY_HASH("value"): {
fromRawValue(context, value, this->value, {});
return;
}

// Paddings are not parsed at this level of the component (they're parsed in
// ViewProps) but we do need to know if they're present or not. See
Expand Down
37 changes: 19 additions & 18 deletions ReactCommon/react/renderer/components/view/AccessibilityProps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,25 +208,26 @@ void AccessibilityProps::setProp(
RawPropsPropNameHash hash,
const char * /*propName*/,
RawValue const &value) {
static auto defaults = AccessibilityProps{};

switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(accessible, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityState, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabel, std::string{""});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint, std::string{""});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage, std::string{""});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityElementsHidden, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(
importantForAccessibility, ImportantForAccessibility::Auto);
RAW_SET_PROP_SWITCH_CASE(testId, "testID", std::string{""});
RAW_SET_PROP_SWITCH_CASE_BASIC(accessible);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityState);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabel);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityElementsHidden);
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors);
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap);
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap);
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape);
RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction);
RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAccessibility);
RAW_SET_PROP_SWITCH_CASE(testId, "testID");
case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityRole"): {
AccessibilityTraits traits = AccessibilityTraits::None;
std::string roleString;
Expand Down
48 changes: 25 additions & 23 deletions ReactCommon/react/renderer/components/view/ViewProps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,23 +291,25 @@ void ViewProps::setProp(
YogaStylableProps::setProp(context, hash, propName, value);
AccessibilityProps::setProp(context, hash, propName, value);

static auto defaults = ViewProps{};

switch (hash) {
RAW_SET_PROP_SWITCH_CASE_BASIC(opacity, (Float)1.0);
RAW_SET_PROP_SWITCH_CASE_BASIC(foregroundColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(backgroundColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowColor, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowOffset, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowOpacity, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowRadius, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(transform, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(backfaceVisibility, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(shouldRasterize, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(zIndex, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(pointerEvents, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(hitSlop, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(onLayout, {});
RAW_SET_PROP_SWITCH_CASE_BASIC(collapsable, true);
RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(opacity);
RAW_SET_PROP_SWITCH_CASE_BASIC(foregroundColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(backgroundColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowColor);
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowOffset);
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowOpacity);
RAW_SET_PROP_SWITCH_CASE_BASIC(shadowRadius);
RAW_SET_PROP_SWITCH_CASE_BASIC(transform);
RAW_SET_PROP_SWITCH_CASE_BASIC(backfaceVisibility);
RAW_SET_PROP_SWITCH_CASE_BASIC(shouldRasterize);
RAW_SET_PROP_SWITCH_CASE_BASIC(zIndex);
RAW_SET_PROP_SWITCH_CASE_BASIC(pointerEvents);
RAW_SET_PROP_SWITCH_CASE_BASIC(hitSlop);
RAW_SET_PROP_SWITCH_CASE_BASIC(onLayout);
RAW_SET_PROP_SWITCH_CASE_BASIC(collapsable);
RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews);
// events field
VIEW_EVENT_CASE(PointerEnter);
VIEW_EVENT_CASE(PointerEnterCapture);
Expand Down Expand Up @@ -335,13 +337,13 @@ void ViewProps::setProp(
VIEW_EVENT_CASE(TouchEnd);
VIEW_EVENT_CASE(TouchCancel);
#ifdef ANDROID
RAW_SET_PROP_SWITCH_CASE_BASIC(elevation, {});
RAW_SET_PROP_SWITCH_CASE(nativeBackground, "nativeBackgroundAndroid", {});
RAW_SET_PROP_SWITCH_CASE(nativeForeground, "nativeForegroundAndroid", {});
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(needsOffscreenAlphaCompositing, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(renderToHardwareTextureAndroid, false);
RAW_SET_PROP_SWITCH_CASE_BASIC(elevation);
RAW_SET_PROP_SWITCH_CASE(nativeBackground, "nativeBackgroundAndroid");
RAW_SET_PROP_SWITCH_CASE(nativeForeground, "nativeForegroundAndroid");
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable);
RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus);
RAW_SET_PROP_SWITCH_CASE_BASIC(needsOffscreenAlphaCompositing);
RAW_SET_PROP_SWITCH_CASE_BASIC(renderToHardwareTextureAndroid);
#endif
// BorderRadii
SET_CASCADED_RECTANGLE_CORNERS(borderRadii, "border", "Radius", value);
Expand Down
Loading

0 comments on commit 82a7968

Please sign in to comment.