Removing `transformMatrix` and `decomposedMatrix` properties

Summary: We deprecated `transformMatrix` and `decomposedMatrix` in D3239960 10 months ago. This revision finally removes remains of this functionality from native code.

Reviewed By: mmmulani

Differential Revision: D4515760

fbshipit-source-id: b4d5b7e834ac4a775f4992b28270b4ff961889a6
This commit is contained in:
Valentin Shergin 2017-02-07 13:59:17 -08:00 committed by Facebook Github Bot
parent ee6adf817e
commit d8748233ca
3 changed files with 3 additions and 15 deletions

View File

@ -17,7 +17,6 @@ var TextStylePropTypes = require('TextStylePropTypes');
var ViewStylePropTypes = require('ViewStylePropTypes');
var keyMirror = require('fbjs/lib/keyMirror');
var matricesDiffer = require('matricesDiffer');
var processColor = require('processColor');
var processTransform = require('processTransform');
var sizesDiffer = require('sizesDiffer');
@ -29,12 +28,8 @@ var ReactNativeStyleAttributes = {
};
ReactNativeStyleAttributes.transform = { process: processTransform };
ReactNativeStyleAttributes.transformMatrix = { diff: matricesDiffer };
ReactNativeStyleAttributes.shadowOffset = { diff: sizesDiffer };
// Do not rely on this attribute.
ReactNativeStyleAttributes.decomposedMatrix = 'decomposedMatrix';
var colorAttributes = { process: processColor };
ReactNativeStyleAttributes.backgroundColor = colorAttributes;
ReactNativeStyleAttributes.borderBottomColor = colorAttributes;

View File

@ -138,19 +138,14 @@ RCT_CUSTOM_VIEW_PROPERTY(shouldRasterizeIOS, BOOL, RCTView)
view.layer.shouldRasterize = json ? [RCTConvert BOOL:json] : defaultView.layer.shouldRasterize;
view.layer.rasterizationScale = view.layer.shouldRasterize ? [UIScreen mainScreen].scale : defaultView.layer.rasterizationScale;
}
// TODO: t11041683 Remove this duplicate property name.
RCT_CUSTOM_VIEW_PROPERTY(transformMatrix, CATransform3D, RCTView)
{
view.layer.transform = json ? [RCTConvert CATransform3D:json] : defaultView.layer.transform;
// TODO: Improve this by enabling edge antialiasing only for transforms with rotation or skewing
view.layer.allowsEdgeAntialiasing = !CATransform3DIsIdentity(view.layer.transform);
}
RCT_CUSTOM_VIEW_PROPERTY(transform, CATransform3D, RCTView)
{
view.layer.transform = json ? [RCTConvert CATransform3D:json] : defaultView.layer.transform;
// TODO: Improve this by enabling edge antialiasing only for transforms with rotation or skewing
view.layer.allowsEdgeAntialiasing = !CATransform3DIsIdentity(view.layer.transform);
}
RCT_CUSTOM_VIEW_PROPERTY(pointerEvents, RCTPointerEvents, RCTView)
{
if ([view respondsToSelector:@selector(setPointerEvents:)]) {

View File

@ -30,7 +30,6 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
/* package */ static final FlatShadowNode[] EMPTY_ARRAY = new FlatShadowNode[0];
private static final String PROP_DECOMPOSED_MATRIX = "decomposedMatrix";
private static final String PROP_OPACITY = "opacity";
private static final String PROP_RENDER_TO_HARDWARE_TEXTURE = "renderToHardwareTextureAndroid";
private static final String PROP_ACCESSIBILITY_LABEL = "accessibilityLabel";
@ -88,8 +87,7 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
/* package */ void handleUpdateProperties(ReactStylesDiffMap styles) {
if (!mountsToView()) {
// Make sure we mount this FlatShadowNode to a View if any of these properties are present.
if (styles.hasKey(PROP_DECOMPOSED_MATRIX) ||
styles.hasKey(PROP_OPACITY) ||
if (styles.hasKey(PROP_OPACITY) ||
styles.hasKey(PROP_RENDER_TO_HARDWARE_TEXTURE) ||
styles.hasKey(PROP_TEST_ID) ||
styles.hasKey(PROP_ACCESSIBILITY_LABEL) ||