Separate Node bounds and hit bounds within node region where needed.

Summary: Node region bounds are assumed to equal the underlying node bounds.  In the case of hit slop, these need to be abstracted.

Reviewed By: ahmedre

Differential Revision: D3713430
This commit is contained in:
Seth Kirby
2016-08-16 11:26:27 -07:00
committed by Ahmed El-Helw
parent a602891946
commit 4a12efad02
9 changed files with 169 additions and 48 deletions

View File

@@ -225,8 +225,7 @@ import com.facebook.textcachewarmer.DefaultTextLayoutCacheWarmer;
NodeRegion nodeRegion = getNodeRegion();
if (mDrawCommand == null) {
if (nodeRegion.mLeft != left || nodeRegion.mTop != top || nodeRegion.mRight != right ||
nodeRegion.mBottom != bottom || nodeRegion.mIsVirtual != isVirtual) {
if (!nodeRegion.matches(left, top, right, bottom, isVirtual)) {
setNodeRegion(new TextNodeRegion(left, top, right, bottom, getReactTag(), isVirtual, null));
}
return;
@@ -239,9 +238,7 @@ import com.facebook.textcachewarmer.DefaultTextLayoutCacheWarmer;
}
Layout newLayout = mDrawCommand.getLayout();
if (nodeRegion.mLeft != left || nodeRegion.mTop != top ||
nodeRegion.mRight != right || nodeRegion.mBottom != bottom ||
nodeRegion.mIsVirtual != isVirtual || layout != newLayout) {
if (!nodeRegion.matches(left, top, right, bottom, isVirtual) || layout != newLayout) {
setNodeRegion(
new TextNodeRegion(left, top, right, bottom, getReactTag(), isVirtual, newLayout));
}