@@ -106,29 +106,20 @@ export class View extends ViewCommon implements ViewDefinition {
106
106
107
107
@profile
108
108
public layout ( left : number , top : number , right : number , bottom : number , setFrame = true ) : void {
109
- const result = this . _setCurrentLayoutBounds ( left , top , right , bottom ) ;
110
- let { sizeChanged } = result ;
109
+ const { boundsChanged, sizeChanged } = this . _setCurrentLayoutBounds ( left , top , right , bottom ) ;
111
110
112
111
if ( setFrame ) {
113
112
this . layoutNativeView ( left , top , right , bottom ) ;
114
113
}
115
114
116
- const needsLayout = result . boundsChanged || ( this . _privateFlags & PFLAG_LAYOUT_REQUIRED ) === PFLAG_LAYOUT_REQUIRED ;
115
+ const needsLayout = boundsChanged || ( this . _privateFlags & PFLAG_LAYOUT_REQUIRED ) === PFLAG_LAYOUT_REQUIRED ;
117
116
if ( needsLayout ) {
118
117
let position : Position ;
119
118
120
119
if ( this . nativeViewProtected && SDK_VERSION > 10 ) {
121
120
// on iOS 11+ it is possible to have a changed layout frame due to safe area insets
122
121
// get the frame and adjust the position, so that onLayout works correctly
123
122
position = IOSHelper . getPositionFromFrame ( this . nativeViewProtected . frame ) ;
124
-
125
- if ( ! sizeChanged ) {
126
- // If frame has actually changed, there is the need to update view background and border styles as they depend on native view bounds
127
- // To trigger the needed visual update, mark size as changed
128
- if ( position . left !== left || position . top !== top || position . right !== right || position . bottom !== bottom ) {
129
- sizeChanged = true ;
130
- }
131
- }
132
123
} else {
133
124
position = { left, top, right, bottom } ;
134
125
}
0 commit comments