mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Include non-virtual nodes when collecting NodeRegions
Summary: Before this patch, we only collected virtual nodes in NodeRegions, because NodeRegions are only needed to implement ReactCompoundView.reactTargetForTouch() which is only interested in virtual nodes. In the next patch, FlatViewGroup will implement ReactCompoundViewGroup interface which requires knowledge of both virtual and non-virtual children. As a step towards that, we need to include non-virtual nodes in NodeRegions. This patch is implementing that. By itself, it should have not cause any changes in application behavior: we add non-virtual nodes to NodeRegions and mark them as non-virtual, then skip all non-virtual nodes in reactTagForTouch(). Reviewed By: ahmedre Differential Revision: D3018047
This commit is contained in:
committed by
Ahmed El-Helw
parent
8014147013
commit
b52928c484
@@ -15,8 +15,15 @@ import android.text.Spanned;
|
||||
/* package */ final class TextNodeRegion extends NodeRegion {
|
||||
private final Layout mLayout;
|
||||
|
||||
TextNodeRegion(float left, float top, float right, float bottom, int tag, Layout layout) {
|
||||
super(left, top, right, bottom, tag);
|
||||
/* package */ TextNodeRegion(
|
||||
float left,
|
||||
float top,
|
||||
float right,
|
||||
float bottom,
|
||||
int tag,
|
||||
boolean isVirtual,
|
||||
Layout layout) {
|
||||
super(left, top, right, bottom, tag, isVirtual);
|
||||
mLayout = layout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user