refactor(ivy): merge canInsertNativeNode and getParentNative (#28011)

Previously the canInsertNativeNode and getRenderParent functions had almost
_exaclty_ the same logic. What was worse that getRenderParent was calling
canInsertNativeNode thus executing the same, non-trivial logic twice.

This commit merges canInsertNativeNode and getRenderParent into one function.
Now getRenderParent will return a native parent or null if a node can't be
inserted (content projection, root of a view that is not inserted etc.).

PR Close #28011
This commit is contained in:
Pawel Kozlowski
2019-01-09 16:33:25 +01:00
committed by Andrew Kushnir
parent 6f9881f85f
commit e1e4887feb
3 changed files with 41 additions and 113 deletions

View File

@ -155,15 +155,6 @@
{
"name": "callHooks"
},
{
"name": "canInsertNativeChildOfElement"
},
{
"name": "canInsertNativeChildOfView"
},
{
"name": "canInsertNativeNode"
},
{
"name": "checkNoChangesMode"
},
@ -299,9 +290,6 @@
{
"name": "getParentInjectorViewOffset"
},
{
"name": "getParentNative"
},
{
"name": "getPipeDef"
},

View File

@ -410,15 +410,6 @@
{
"name": "callHooks"
},
{
"name": "canInsertNativeChildOfElement"
},
{
"name": "canInsertNativeChildOfView"
},
{
"name": "canInsertNativeNode"
},
{
"name": "checkNoChanges"
},
@ -749,9 +740,6 @@
{
"name": "getParentInjectorViewOffset"
},
{
"name": "getParentNative"
},
{
"name": "getParentState"
},