You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure filterLayer, backgroundImageLayer, and backgroundColorLayer are the same size/shape as the owning View (#49278)
Summary:
Pull Request resolved: #49278
The previous diff (#49272) fixed an issue where we used frame to get the size of a sublayer. This is problematic in that it scales things twice if a scaling transform is applied. I looked to see where else we do this and we have this problem (sometimes) with background color and filter.
To fix this in the general case I created a helper to size a layer to the same shape as the View's layer - so using bounds for the size, (0,0) for position on the frame, and cornerRadius/mask for border radius considerations. The only 3 layers that should be the exact same size are backgroundColorLayer, backgroundImageLayer, and filterLayer
Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform
Reviewed By: jorge-cab
Differential Revision: D69321790
fbshipit-source-id: 70b5d18fa01967896b1bfffdb5684c2c907f3549
0 commit comments