Fabric: Disabling ScrollView's contentOffset propagation to ShadowNode tree

Summary:
This diff disables the feature that propagates ScrollView's content offset to ShadowNode hierarchy making measuring content-offset-aware.
Seems that feature breaks FlatList because it does not expect measure calls to be content-offset-aware. We need to validate which legacy `measure*` calls should be content-offset-aware and which should not, and then verify that actual feature works (it's not clear why it worked with FlatList before) well before re-enabling this.

For now, the most safer choice is to disable this feature because I don't think some call sites actually rely on it now.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D18777939

fbshipit-source-id: 20d6c1081e7d2cc3b5a7a172ed947a9ae9cdfaab
This commit is contained in:
Valentin Shergin 2019-12-03 08:09:54 -08:00 коммит произвёл Facebook Github Bot
Родитель 4d9e5f8481
Коммит f697836cfa
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -196,6 +196,9 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
- (void)_updateStateWithContentOffset
{
/*
Propagation ScrollView's contentOffset value to ShadowNode tree is temporarily disabled.
auto contentOffset = RCTPointFromCGPoint(_scrollView.contentOffset);
_state->updateState([contentOffset](ScrollViewShadowNode::ConcreteState::Data const &data) {
@ -203,6 +206,7 @@ static void RCTSendPaperScrollEvent_DEPRECATED(UIScrollView *scrollView, NSInteg
newData.contentOffset = contentOffset;
return newData;
});
*/
}
- (void)prepareForRecycle