mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix layer.mask not being reset after recycle
Summary: Changelog: [Internal] If `layer.mask` was set and the view got reused without having a different `layer.mask`, this value would persist between reuses. I also added a call to `super finalizeUpdates` as it is best practice to call super, the parent class right now doesn't do anything but in the future we might add there some default logic. Reviewed By: shergin Differential Revision: D20030174 fbshipit-source-id: c90be3f4e9a8f3814000f177a3d50061f5aa120c
This commit is contained in:
committed by
Facebook Github Bot
parent
2e2b331db5
commit
af5ecb2916
@@ -267,6 +267,7 @@ using namespace facebook::react;
|
||||
|
||||
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
|
||||
{
|
||||
[super finalizeUpdates:updateMask];
|
||||
if (!_needsInvalidateLayer) {
|
||||
return;
|
||||
}
|
||||
@@ -399,6 +400,7 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
|
||||
colorComponentsFromColor(borderMetrics.borderColors.left).alpha == 0 || self.clipsToBounds);
|
||||
|
||||
if (useCoreAnimationBorderRendering) {
|
||||
layer.mask = nil;
|
||||
if (_borderLayer) {
|
||||
[_borderLayer removeFromSuperlayer];
|
||||
_borderLayer = nil;
|
||||
|
||||
Reference in New Issue
Block a user