mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Back out "Plumbing to get boxSizing prop to Yoga" (#46794)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46794 Original commit changeset: f57e9a51236c Original Phabricator Diff: D63430964 Seeing some issues with this so gonna turn it off for the meantime. Changelog: [Internal] Differential Revision: D63777437 fbshipit-source-id: fe8abd0110b2cf7296911c5b1e95ada40d30994c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
32dd52e027
commit
5e47ef991e
@@ -36,7 +36,6 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
||||
borderRightWidth: true,
|
||||
borderStartWidth: true,
|
||||
borderTopWidth: true,
|
||||
boxSizing: true,
|
||||
columnGap: true,
|
||||
borderWidth: true,
|
||||
bottom: true,
|
||||
|
||||
@@ -227,7 +227,6 @@ const validAttributesForNonEventProps = {
|
||||
justifyContent: true,
|
||||
overflow: true,
|
||||
display: true,
|
||||
boxSizing: true,
|
||||
|
||||
margin: true,
|
||||
marginBlock: true,
|
||||
|
||||
@@ -348,7 +348,6 @@ const validAttributesForNonEventProps = {
|
||||
alignContent: true,
|
||||
position: true,
|
||||
aspectRatio: true,
|
||||
boxSizing: true,
|
||||
|
||||
// Also declared as ViewProps
|
||||
// overflow: true,
|
||||
|
||||
@@ -55,7 +55,6 @@ export interface FlexStyle {
|
||||
borderTopWidth?: number | undefined;
|
||||
borderWidth?: number | undefined;
|
||||
bottom?: DimensionValue | undefined;
|
||||
boxSizing?: 'border-box' | 'content-box' | undefined;
|
||||
display?: 'none' | 'flex' | undefined;
|
||||
end?: DimensionValue | undefined;
|
||||
flex?: number | undefined;
|
||||
|
||||
@@ -612,19 +612,6 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
||||
*/
|
||||
aspectRatio?: number | string,
|
||||
|
||||
/**
|
||||
* Box sizing controls whether certain size properties apply to the node's
|
||||
* content box or border box. The size properties in question include `width`,
|
||||
* `height`, `minWidth`, `minHeight`, `maxWidth`, `maxHeight`, and `flexBasis`.
|
||||
*
|
||||
* e.g: Say a node has 10px of padding and 10px of borders on all
|
||||
* sides and a defined `width` and `height` of 100px and 50px. Then the total
|
||||
* size of the node (content area + padding + border) would be 100px by 50px
|
||||
* under `boxSizing: border-box` and 120px by 70px under
|
||||
* `boxSizing: content-box`.
|
||||
*/
|
||||
boxSizing?: 'border-box' | 'content-box',
|
||||
|
||||
/** `zIndex` controls which components display on top of others.
|
||||
* Normally, you don't use `zIndex`. Components render according to
|
||||
* their order in the document tree, so later components draw over
|
||||
|
||||
@@ -8003,7 +8003,6 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
||||
flexShrink?: number,
|
||||
flexBasis?: number | string,
|
||||
aspectRatio?: number | string,
|
||||
boxSizing?: \\"border-box\\" | \\"content-box\\",
|
||||
zIndex?: number,
|
||||
direction?: \\"inherit\\" | \\"ltr\\" | \\"rtl\\",
|
||||
rowGap?: number | string,
|
||||
|
||||
@@ -533,13 +533,6 @@ YogaStylableProps::YogaStylableProps(
|
||||
sourceProps.yogaStyle.aspectRatio(),
|
||||
yogaStyle.aspectRatio()));
|
||||
|
||||
yogaStyle.setBoxSizing(convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"boxSizing",
|
||||
sourceProps.yogaStyle.boxSizing(),
|
||||
yogaStyle.boxSizing()));
|
||||
|
||||
convertRawPropAliases(context, sourceProps, rawProps);
|
||||
};
|
||||
|
||||
|
||||
@@ -226,28 +226,6 @@ inline void fromRawValue(
|
||||
LOG(ERROR) << "Could not parse yoga::FlexDirection: " << stringValue;
|
||||
}
|
||||
|
||||
inline void fromRawValue(
|
||||
const PropsParserContext& /*context*/,
|
||||
const RawValue& value,
|
||||
yoga::BoxSizing& result) {
|
||||
result = yoga::BoxSizing::BorderBox;
|
||||
react_native_expect(value.hasType<std::string>());
|
||||
if (!value.hasType<std::string>()) {
|
||||
return;
|
||||
}
|
||||
auto stringValue = (std::string)value;
|
||||
if (stringValue == "border-box") {
|
||||
result = yoga::BoxSizing::BorderBox;
|
||||
return;
|
||||
}
|
||||
if (stringValue == "content-box") {
|
||||
result = yoga::BoxSizing::ContentBox;
|
||||
return;
|
||||
}
|
||||
|
||||
LOG(ERROR) << "Could not parse yoga::BoxSizing: " << stringValue;
|
||||
}
|
||||
|
||||
inline void fromRawValue(
|
||||
const PropsParserContext& context,
|
||||
const RawValue& value,
|
||||
|
||||
Reference in New Issue
Block a user