@@ -310,19 +310,10 @@ - (void)layoutSubviewsWithContext:(RCTLayoutContext)layoutContext
310
310
UIFont *font = [textStorage attribute: NSFontAttributeName atIndex: range.location effectiveRange: nil ];
311
311
312
312
CGRect frame = {
313
- #if !TARGET_OS_OSX // [macOS]
314
313
{RCTRoundPixelValue (glyphRect.origin .x ),
315
314
RCTRoundPixelValue (
316
315
glyphRect.origin .y + glyphRect.size .height - attachmentSize.height + font.descender )},
317
- #else // [macOS
318
- {RCTRoundPixelValue (glyphRect.origin .x , [self scale ]),
319
- RCTRoundPixelValue (glyphRect.origin .y + glyphRect.size .height - attachmentSize.height + font.descender , [self scale ])},
320
- #endif // macOS]
321
- #if !TARGET_OS_OSX // [macOS]
322
316
{RCTRoundPixelValue (attachmentSize.width ), RCTRoundPixelValue (attachmentSize.height )}};
323
- #else // [macOS
324
- {RCTRoundPixelValue (attachmentSize.width , [self scale ]), RCTRoundPixelValue (attachmentSize.height , [self scale ])}};
325
- #endif // macOS]
326
317
327
318
NSRange truncatedGlyphRange =
328
319
[layoutManager truncatedGlyphRangeInLineFragmentForGlyphAtIndex: range.location];
@@ -427,12 +418,7 @@ static YGSize RCTTextShadowViewMeasure(
427
418
}
428
419
429
420
size = (CGSize){
430
- #if !TARGET_OS_OSX // [macOS]
431
421
MIN (RCTCeilPixelValue (size.width ), maximumSize.width ), MIN (RCTCeilPixelValue (size.height ), maximumSize.height )};
432
- #else // [macOS
433
- MIN (RCTCeilPixelValue (size.width , shadowTextView.scale ), maximumSize.width ),
434
- MIN (RCTCeilPixelValue (size.height , shadowTextView.scale ), maximumSize.height )};
435
- #endif // macOS]
436
422
437
423
// Adding epsilon value illuminates problems with converting values from
438
424
// `double` to `float`, and then rounding them to pixel grid in Yoga.
0 commit comments