Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[fabric] Add support for clipsToBounds to RCTViewComponentView
Summary: This diff conditionally sets the CALayer masksToBounds based on the clipsToBounds RN property so that the content of the view would be clipped by the view border.

Test Plan:
- Run Zeratul with Fabric enabled
- Check that the profile pictures with no status indicator are clipped by the half size border radius set on the parent view.

| Before | After |
|--|
|  {F1090251649}  |  {F1090249259}  |

Reviewers: shawndempsey, chpurrer, #rn-desktop

Reviewed By: chpurrer

Differential Revision: https://phabricator.intern.facebook.com/D49239973
  • Loading branch information
Nick Lefever authored and Saadnajmi committed Nov 15, 2024
commit e6655507185b3988d2f4ab4828d1e107cf44c247
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,11 @@ - (void)invalidateLayer
return;
}

#if TARGET_OS_OSX // [macOS
// clipsToBounds is stubbed out on macOS because it's not part of NSView
layer.masksToBounds = self.clipsToBounds;
#endif // macOS]

const auto borderMetrics = _props->resolveBorderMetrics(_layoutMetrics);

// Stage 1. Shadow Path
Expand Down