@@ -145,10 +145,116 @@ folly::dynamic HostPlatformViewProps::getDiffProps(
145
145
? &defaultProps
146
146
: static_cast <const HostPlatformViewProps*>(prevProps);
147
147
148
+ if (this == oldProps) {
149
+ return result;
150
+ }
148
151
if (focusable != oldProps->focusable ) {
149
152
result[" focusable" ] = focusable;
150
153
}
151
154
155
+ if (hasTVPreferredFocus != oldProps->hasTVPreferredFocus ) {
156
+ result[" hasTVPreferredFocus" ] = hasTVPreferredFocus;
157
+ }
158
+
159
+ if (needsOffscreenAlphaCompositing !=
160
+ oldProps->needsOffscreenAlphaCompositing ) {
161
+ result[" needsOffscreenAlphaCompositing" ] = needsOffscreenAlphaCompositing;
162
+ }
163
+
164
+ if (renderToHardwareTextureAndroid !=
165
+ oldProps->renderToHardwareTextureAndroid ) {
166
+ result[" renderToHardwareTextureAndroid" ] = renderToHardwareTextureAndroid;
167
+ }
168
+
169
+ if (opacity != oldProps->opacity ) {
170
+ result[" opacity" ] = opacity;
171
+ }
172
+
173
+ if (backgroundColor != oldProps->backgroundColor ) {
174
+ result[" backgroundColor" ] = *backgroundColor;
175
+ }
176
+
177
+ if (shadowColor != oldProps->shadowColor ) {
178
+ result[" shadowColor" ] = *shadowColor;
179
+ }
180
+
181
+ if (shadowOpacity != oldProps->shadowOpacity ) {
182
+ result[" shadowOpacity" ] = shadowOpacity;
183
+ }
184
+
185
+ if (shadowRadius != oldProps->shadowRadius ) {
186
+ result[" shadowRadius" ] = shadowRadius;
187
+ }
188
+
189
+ if (shouldRasterize != oldProps->shouldRasterize ) {
190
+ result[" shouldRasterize" ] = shouldRasterize;
191
+ }
192
+
193
+ if (collapsable != oldProps->collapsable ) {
194
+ result[" collapsable" ] = collapsable;
195
+ }
196
+
197
+ if (removeClippedSubviews != oldProps->removeClippedSubviews ) {
198
+ result[" removeClippedSubviews" ] = removeClippedSubviews;
199
+ }
200
+
201
+ if (onLayout != oldProps->onLayout ) {
202
+ result[" onLayout" ] = onLayout;
203
+ }
204
+
205
+ if (zIndex != oldProps->zIndex ) {
206
+ result[" zIndex" ] = zIndex.value ();
207
+ }
208
+
209
+ if (pointerEvents != oldProps->pointerEvents ) {
210
+ std::string value;
211
+ switch (pointerEvents) {
212
+ case PointerEventsMode::BoxOnly:
213
+ result[" pointerEvents" ] = " box-only" ;
214
+ break ;
215
+ case PointerEventsMode::BoxNone:
216
+ result[" pointerEvents" ] = " box-none" ;
217
+ break ;
218
+ case PointerEventsMode::None:
219
+ result[" pointerEvents" ] = " none" ;
220
+ break ;
221
+ default :
222
+ result[" pointerEvents" ] = " auto" ;
223
+ break ;
224
+ }
225
+
226
+ if (nativeId != oldProps->nativeId ) {
227
+ result[" nativeId" ] = nativeId;
228
+ }
229
+
230
+ if (testId != oldProps->testId ) {
231
+ result[" testId" ] = testId;
232
+ }
233
+
234
+ if (accessible != oldProps->accessible ) {
235
+ result[" accessible" ] = accessible;
236
+ }
237
+
238
+ if (getClipsContentToBounds () != oldProps->getClipsContentToBounds ()) {
239
+ result[" overflow" ] = getClipsContentToBounds () ? " hidden" : " visible" ;
240
+ result[" scroll" ] = result[" overflow" ];
241
+ }
242
+
243
+ if (backfaceVisibility != oldProps->backfaceVisibility ) {
244
+ switch (backfaceVisibility) {
245
+ case BackfaceVisibility::Auto:
246
+ result[" backfaceVisibility" ] = " auto" ;
247
+ break ;
248
+ case BackfaceVisibility::Visible:
249
+ result[" backfaceVisibility" ] = " visible" ;
250
+ break ;
251
+ case BackfaceVisibility::Hidden:
252
+ result[" backfaceVisibility" ] = " hidden" ;
253
+ break ;
254
+ }
255
+ }
256
+ }
257
+
152
258
return result;
153
259
}
154
260
0 commit comments