Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ado/apple-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
set -eo pipefail
cat package.json |
jq '.devDependencies["react"] = $(react_version)' |
jq '.devDependencies["react-native"] = "^0.64"' |
jq '.devDependencies["react-native"] = "^0.68"' |
jq '.devDependencies["react-native-macos"] = "../react-native-macos-$(package_version).tgz"' |
jq 'del(.devDependencies["@react-native-community/cli"])' |
jq 'del(.devDependencies["@react-native-community/cli-platform-android"])' |
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Text/Text/RCTTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN

@interface RCTTextView : RCTUIView // TODO(macOS ISS#3536887)

- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher; // TODO(OSS Candidate ISS#2710739)
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher; // TODO(OSS Candidate ISS#2710739)

@property (nonatomic, assign) BOOL selectable;

Expand Down
6 changes: 3 additions & 3 deletions Libraries/Text/Text/RCTTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ @implementation RCTTextView
NSTextView *_textView;
#endif // ]TODO(macOS GH#774)

RCTEventDispatcher *_eventDispatcher; // TODO(OSS Candidate ISS#2710739)
id<RCTEventDispatcherProtocol> _eventDispatcher; // TODO(OSS Candidate ISS#2710739)
NSArray<RCTUIView *> *_Nullable _descendantViews; // TODO(macOS ISS#3536887)
NSTextStorage *_Nullable _textStorage;
CGRect _contentFrame;
}

// [TODO(OSS Candidate ISS#2710739)
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher
{
if ((self = [self initWithFrame:CGRectZero])) {
_eventDispatcher = eventDispatcher;
Expand All @@ -73,6 +73,7 @@ - (instancetype)initWithFrame:(CGRect)frame
#if !TARGET_OS_OSX // TODO(macOS GH#774)
self.isAccessibilityElement = YES;
self.accessibilityTraits |= UIAccessibilityTraitStaticText;
self.opaque = NO;
#else // [TODO(macOS GH#774)
self.accessibilityRole = NSAccessibilityStaticTextRole;
// Fix blurry text on non-retina displays.
Expand All @@ -90,7 +91,6 @@ - (instancetype)initWithFrame:(CGRect)frame
_textStorage = _textView.textStorage;
[self addSubview:_textView];
#endif // ]TODO(macOS GH#774)
self.opaque = NO;
RCTUIViewSetContentModeRedraw(self); // TODO(macOS GH#774) and TODO(macOS ISS#3536887)
}
return self;
Expand Down
4 changes: 2 additions & 2 deletions React/Base/RCTRootContentView.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ - (void)updateAvailableSize
[_bridge.uiManager setAvailableSize:self.availableSize forRootView:self];
}

- (RCTUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS ISS#3536887)
- (RCTPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS ISS#3536887)
{
// The root content view itself should never receive touches
RCTUIView *hitView = [super hitTest:point withEvent:event]; // TODO(macOS ISS#3536887)
RCTPlatformView *hitView = [super hitTest:point withEvent:event]; // TODO(macOS ISS#3536887)
if (_passThroughTouches && hitView == self) {
return nil;
}
Expand Down
4 changes: 2 additions & 2 deletions React/Base/RCTTouchHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ @implementation RCTTouchHandler {
NSMutableArray<NSMutableDictionary *> *_reactTouches;
NSMutableArray<RCTPlatformView *> *_touchViews; // TODO(macOS GH#774)

__weak RCTUIView *_cachedRootView; // TODO(macOS GH#774)
__weak RCTPlatformView *_cachedRootView; // TODO(macOS GH#774)

uint16_t _coalescingKey;
#if TARGET_OS_OSX// [TODO(macOS GH#774)
Expand Down Expand Up @@ -363,7 +363,7 @@ - (void)_updateAndDispatchTouches:(NSSet<NSEvent *> *)touches eventName:(NSStrin
*/
- (void)_cacheRootView
{
RCTUIView *rootView = self.view; // TODO(macOS ISS#3536887)
RCTPlatformView *rootView = self.view; // TODO(macOS ISS#3536887)
while (rootView.superview && ![rootView isReactRootView] && ![rootView isKindOfClass:[RCTSurfaceView class]]) {
rootView = rootView.superview;
}
Expand Down
31 changes: 20 additions & 11 deletions React/Base/RCTUIKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

//
// functionally equivalent types
//
Expand Down Expand Up @@ -65,7 +67,7 @@ UIKIT_STATIC_INLINE CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path)

#define RCTPlatformWindow UIWindow

UIKIT_STATIC_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, UIEvent *event)
UIKIT_STATIC_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, __unused UIEvent *__nullable event)
{
return [view hitTest:point withEvent:event];
}
Expand Down Expand Up @@ -116,10 +118,14 @@ UIKIT_STATIC_INLINE CGFloat UIFontLineHeight(UIFont *font)
return [font lineHeight];
}

NS_ASSUME_NONNULL_END

#else // TARGET_OS_OSX [

#import <AppKit/AppKit.h>

NS_ASSUME_NONNULL_BEGIN

//
// semantically equivalent constants
//
Expand Down Expand Up @@ -372,7 +378,7 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);

@property (nonatomic, getter=isUserInteractionEnabled) BOOL userInteractionEnabled;

- (NSView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event;
- (NSView *)hitTest:(CGPoint)point withEvent:(UIEvent *_Nullable)event;
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event;

- (void)insertSubview:(NSView *)view atIndex:(NSInteger)index;
Expand All @@ -389,7 +395,6 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
// An override of an undocumented API that controls the layer's masksToBounds property
@property (nonatomic) BOOL clipsToBounds;
@property (nonatomic, copy) NSColor *backgroundColor;
@property (nonatomic, readwrite, getter=isOpaque) BOOL opaque;
@property (nonatomic) CGAffineTransform transform;

/**
Expand Down Expand Up @@ -437,7 +442,7 @@ CGPathRef UIBezierPathCreateCGPathRef(UIBezierPath *path);
@end // ]TODO(macOS GH#774)


NS_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, __unused UIEvent *event)
NS_INLINE RCTPlatformView *RCTUIViewHitTestWithEvent(RCTPlatformView *view, CGPoint point, __unused UIEvent *__nullable event)
{
return [view hitTest:point];
}
Expand Down Expand Up @@ -471,6 +476,8 @@ NS_INLINE CGRect CGRectValue(NSValue *value)
return rect;
}

NS_ASSUME_NONNULL_END

#endif // ] TARGET_OS_OSX

//
Expand All @@ -483,7 +490,7 @@ NS_INLINE CGRect CGRectValue(NSValue *value)
typedef UISlider RCTUISlider;
#else
@interface RCTUISlider : NSSlider

NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, readonly) BOOL pressed;
@property (nonatomic, assign) float value;
@property (nonatomic, assign) float minimumValue;
Expand All @@ -492,14 +499,14 @@ typedef UISlider RCTUISlider;
@property (nonatomic, strong) NSColor *maximumTrackTintColor;

- (void)setValue:(float)value animated:(BOOL)animated;

NS_ASSUME_NONNULL_END
@end
#endif // ]TODO(macOS GH#774)

// RCTUILabel

#if !TARGET_OS_OSX // [TODO(macOS GH#774)
#define RCTUILabel UILabel
typedef UILabel RCTUILabel;
#else
@interface RCTUILabel : NSTextField
@end
Expand All @@ -511,28 +518,30 @@ typedef UISlider RCTUISlider;
typedef UISwitch RCTUISwitch;
#else
@interface RCTUISwitch : NSSwitch

NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign, getter=isOn) BOOL on;

- (void)setOn:(BOOL)on animated:(BOOL)animated;

NS_ASSUME_NONNULL_END
@end
#endif // ]TODO(macOS GH#774)

// RCTUIActivityIndicatorView

#if !TARGET_OS_OSX // [TODO(macOS GH#774)
#define RCTUIActivityIndicatorView UIActivityIndicatorView
typedef UIActivityIndicatorView RCTUIActivityIndicatorView;
#else
@interface RCTUIActivityIndicatorView : NSProgressIndicator

NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
@property (nonatomic, assign) BOOL hidesWhenStopped;
@property (nullable, readwrite, nonatomic, strong) RCTUIColor *color;
@property (nonatomic, readonly, getter=isAnimating) BOOL animating;

- (void)startAnimating;
- (void)stopAnimating;

NS_ASSUME_NONNULL_END
@end

#endif // ]TODO(macOS GH#774)
6 changes: 0 additions & 6 deletions React/Base/macOS/RCTUIKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ @implementation RCTUIView // TODO(macOS ISS#3536887)
@private
NSColor *_backgroundColor;
BOOL _clipsToBounds;
BOOL _opaque;
BOOL _userInteractionEnabled;
}

Expand Down Expand Up @@ -287,11 +286,6 @@ - (BOOL)isFlipped
return YES;
}

- (BOOL)isOpaque
{
return _opaque;
}

- (CGFloat)alpha
{
return self.alphaValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ - (instancetype)initWithFrame:(CGRect)frame
static const auto defaultProps = std::make_shared<const ParagraphProps>();
_props = defaultProps;

self.opaque = NO;
#if !TARGET_OS_OSX // TODO(macOS GH#774)
self.contentMode = UIViewContentModeRedraw;
self.opaque = NO;
#endif // TODO(macOS GH#774)
}

Expand Down
2 changes: 1 addition & 1 deletion React/Modules/RCTUIManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void RCTTraverseViewNodes(id<RCTComponent> view, void (^block)(id<RCTComponent>)
* @param nativeID the id reference to native component relative to root view.
* @param rootTag the react tag of root view hierarchy from which to find the view.
*/
- (RCTUIView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag; // TODO(macOS ISS#3536887)
- (RCTPlatformView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag; // TODO(macOS ISS#3536887)

/**
* Register a view that is tagged with nativeID as its nativeID prop
Expand Down
8 changes: 4 additions & 4 deletions React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (void)invalidate
RCTExecuteOnMainQueue(^{
RCT_PROFILE_BEGIN_EVENT(RCTProfileTagAlways, @"UIManager invalidate", nil);
for (NSNumber *rootViewTag in self->_rootViewTags) {
RCTUIView *rootView = self->_viewRegistry[rootViewTag]; // TODO(macOS ISS#3536887)
RCTPlatformView *rootView = self->_viewRegistry[rootViewTag]; // TODO(macOS ISS#3536887)
if ([rootView conformsToProtocol:@protocol(RCTInvalidating)]) {
[(id<RCTInvalidating>)rootView invalidate];
}
Expand Down Expand Up @@ -455,12 +455,12 @@ - (void)setLocalData:(NSObject *)localData forView:(RCTUIView *)view // TODO(mac
forTag:view.reactTag];
}

- (RCTUIView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag
- (RCTPlatformView *)viewForNativeID:(NSString *)nativeID withRootTag:(NSNumber *)rootTag
{
if (!nativeID || !rootTag) {
return nil;
}
RCTUIView *view; // TODO(macOS ISS#3536887)
RCTPlatformView *view; // TODO(macOS ISS#3536887)
@synchronized(self) {
view = [_nativeIDRegistry objectForKey:RCTNativeIDRegistryKey(nativeID, rootTag)];
}
Expand Down Expand Up @@ -1101,7 +1101,7 @@ - (void)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag viewName:(NSStrin
{
RCTAssertMainQueue();
RCTComponentData *componentData = _componentDataByName[viewName];
RCTUIView *view = _viewRegistry[reactTag]; // TODO(macOS ISS#3536887)
RCTPlatformView *view = _viewRegistry[reactTag]; // TODO(macOS ISS#3536887)
[componentData setProps:props forView:view];
}

Expand Down
4 changes: 4 additions & 0 deletions React/Views/RCTSlider.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#import <React/RCTComponent.h>

NS_ASSUME_NONNULL_BEGIN

#if TARGET_OS_OSX // [TODO(macOS GH#774)
@protocol RCTSliderDelegate;
#endif
Expand Down Expand Up @@ -50,3 +52,5 @@
- (void)slider:(RCTSlider *)slider didPress:(BOOL)press;
@end
#endif // ]TODO(macOS GH#774)

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion React/Views/RCTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ - (RCTPlatformView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(m
BOOL needsHitSubview = !(_pointerEvents == RCTPointerEventsNone || _pointerEvents == RCTPointerEventsBoxOnly);
if (needsHitSubview && (![self clipsToBounds] || isPointInside)) {
// Take z-index into account when calculating the touch target.
NSArray<RCTUIView *> *sortedSubviews = [self reactZIndexSortedSubviews]; // TODO(macOS ISS#3536887)
NSArray<RCTPlatformView *> *sortedSubviews = [self reactZIndexSortedSubviews]; // TODO(macOS ISS#3536887)

// The default behaviour of UIKit is that if a view does not contain a point,
// then no subviews will be returned from hit testing, even if they contain
Expand Down
62 changes: 31 additions & 31 deletions packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ SPEC CHECKSUMS:
boost: 613e39eac4239cc72b15421247b5ab05361266a2
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8
FBLazyVector: 60b63b875d9a3efc175d0c9e400ca47c434bc6d1
FBReactNativeSpec: 62b8a10066cc7741c1876ef3abb859fc90faaaca
FBLazyVector: 4f7dec9b06e2161bdc7451b81285b955e44120f2
FBReactNativeSpec: 884fc2c1ae9aac805b5b1683556539017f128e30
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
Expand All @@ -575,42 +575,42 @@ SPEC CHECKSUMS:
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 42c4bf47024808486e90b25ea9e5ac3959047641
glog: 20113a0d46931b6f096cf8302c68691d75a456ff
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 43adc9ce880eb76792f88c011773cb5c664c1419
RCTRequired: 711af33fea12120e1e2cd9575de500b1163e0215
RCTTypeSafety: b68c55552c09b131e99ccffd4394945c6e153e14
React: 8c7b6cbe6834cdb7eba35d92eb85eab9b8381d03
React-callinvoker: d4b0c66588902f0ba389c5bef7c014e18a571d7d
RCT-Folly: 24c6da766832002a4a2aac5f79ee0ca50fbe8507
RCTRequired: 9b3b3dd4bec7ff068b05da2f77a4ce87b79056ce
RCTTypeSafety: 0a550fe20009fbdb80b750bd92d8476b4fbcfd4b
React: a7ba329278133e1d7b0d57eac0f455cb53c484ef
React-callinvoker: a7973d14f10e7bfa72fe0cf97264dba48d49cc5c
React-Codegen: 61a79489c164568e1575cc662fa7c9a167215dcc
React-Core: ef10b29be647e9fe6541bee92945c052a2227be7
React-CoreModules: 43dadecdb2b2c83ef74443941cdf869b429c835c
React-cxxreact: 1d3662e60451049d10bbdcc172d1360e3af4e7f1
React-jsi: 19eb9069d3f323ac5ffc941707f3f6739f48f2b9
React-jsiexecutor: 3e39bb047dfbe02d37b6144ca149f0c880bd9ec6
React-jsinspector: ce7b508215e9f720c345ccd48353c8e426604c09
React-logger: f624f2cf83c69f2455874ae6f5521475611c5a4f
React-perflogger: a9a9d7a5f9f47c5b56193e3c114fb16ba3a184d2
React-RCTActionSheet: 1c27530aba6834d35e2005570e96a97c18eb445f
React-RCTAnimation: 73d2ed8c8eecf9dde97c5e4be05d2adbbda58f2c
React-RCTBlob: 43eb87c4b2d788197ffad01c70bfc17e4a1ac6ea
React-RCTImage: 40867075e9927fe2c913e3a852043850ce8d5d6d
React-RCTLinking: 565e4d6fdfd2271935c9d3e2510b6bd2fa372b8f
React-RCTNetwork: 9a0cbc84ba053d739aca05faa3568d366262bdd0
React-RCTPushNotification: c53e9e576b49a01f63e9649bd7a6203c0c03d6d8
React-RCTSettings: 7195a08c20f21c0efa71aeacd488485ea80a44d3
React-RCTTest: 271b54801041f7c9b2a0dbe71827550e84a5bdbb
React-RCTText: b8a9723313c024ca592fa46b040fbb372722525c
React-RCTVibration: 2b44f706a45a1a82458b5d05f394cb601e07da2a
React-runtimeexecutor: 3010cca0a32b0b0ae87e0aae3265f86c4676f501
React-Core: 83f76a9e553370910f7dd036c227ae3728514e4c
React-CoreModules: 956c5003b1f393ecdf01cac81b9abd61c53cb897
React-cxxreact: 0d26fe3e743964ec28be7480781b33669d7edcb2
React-jsi: 0fe864a1e1ab4089ae7361cb768bda8f20350ad8
React-jsiexecutor: 80621468529516b8f1164685d8e62d72c78f7551
React-jsinspector: f1d9ed916336a72ec377fb8c0a1d784a7a0085ae
React-logger: 7dfa0e98931f90b501143d2cf5fbbd3fbb03a5c1
React-perflogger: 6470780013040448a52bdab0e668573ad6da047c
React-RCTActionSheet: 7a120b18673235b7bec8c6b7f45ffe6103a80c45
React-RCTAnimation: e380831ab78e2e6e41fb21d99c2515b61ded67b2
React-RCTBlob: ef1b52b27841714d8e77e65a3f46ae37ab5c0286
React-RCTImage: 73f3c9efc611c90eb57fa8ffd8390f748cd12163
React-RCTLinking: 862a74f8b690f080fbbb071d6c9ee9f918d85abf
React-RCTNetwork: 0ad181f3eccebc98acd5aae88668ec8b977ada4f
React-RCTPushNotification: 2f6d6c013536e7381517a89854b2e0dec3ccaea0
React-RCTSettings: 69dc88fa59c154c0f020de20af286e1f18ecaf08
React-RCTTest: c4409159d6602fac7ea0c77dd78edbfd87451003
React-RCTText: e76719accaa721a86ef10fd26418c632364865cc
React-RCTVibration: b13450dceee3922928d5f2ba626f13a8c8a41592
React-runtimeexecutor: efede3b2374f6eea50a485f042f7f8c13e3b4d80
React-TurboModuleCxx-RNW: 881411415eafe818f9cc3c4016167cc3d219402b
React-TurboModuleCxx-WinRTPort: 1fd3447c284a28a6073bfb5c3ec7e12079209fc1
ReactCommon: 545c27c21c516ab8c40af635cdcc0e20591d5c8c
React-TurboModuleCxx-WinRTPort: 07e0f59bfaa337933c7b114d374d0e2a93b4b5e8
ReactCommon: 3199785c30e1efcce92ca7da5038c7a248124aa3
ScreenshotManager: b378292226c78474e70b139ba2e19f584836c520
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Yoga: 8d41f98023fe4d9e60d4283ec1ac3a3ae4e7f863
Yoga: 9899fd558a01665e4acf7e28f02f2090942e829c
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: cbf4f9be33910397d5f84dd4fcbe56d3d61d42fa
Expand Down