refactor(ivy): evaluate prop-based styling bindings with a new algorithm (#30469)
This is the first refactor PR designed to change how styling bindings (i.e. `[style]` and `[class]`) behave in Ivy. Instead of having a heavy element-by-element context be generated for each element, this new refactor aims to use a single context for each `tNode` element that is examined and iterated over when styling values are to be applied to the element. This patch brings this new functionality to prop-based bindings such as `[style.prop]` and `[class.name]`. PR Close #30469
This commit is contained in:

committed by
Jason Aden

parent
848e53efd0
commit
f03475cac8
@ -32,6 +32,15 @@
|
||||
{
|
||||
"name": "DECLARATION_VIEW"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_BINDING_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_MASK_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_SIZE_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_TEMPLATE_DIRECTIVE_INDEX"
|
||||
},
|
||||
@ -161,6 +170,12 @@
|
||||
{
|
||||
"name": "_selectedIndex"
|
||||
},
|
||||
{
|
||||
"name": "_stylingMode"
|
||||
},
|
||||
{
|
||||
"name": "addBindingIntoContext"
|
||||
},
|
||||
{
|
||||
"name": "addComponentLogic"
|
||||
},
|
||||
@ -173,6 +188,12 @@
|
||||
{
|
||||
"name": "allocStylingContext"
|
||||
},
|
||||
{
|
||||
"name": "allocStylingContext"
|
||||
},
|
||||
{
|
||||
"name": "allocateNewContextEntry"
|
||||
},
|
||||
{
|
||||
"name": "allocateOrUpdateDirectiveIntoContext"
|
||||
},
|
||||
@ -311,6 +332,9 @@
|
||||
{
|
||||
"name": "getCheckNoChangesMode"
|
||||
},
|
||||
{
|
||||
"name": "getClassesContext"
|
||||
},
|
||||
{
|
||||
"name": "getClosureSafeProperty"
|
||||
},
|
||||
@ -323,6 +347,9 @@
|
||||
{
|
||||
"name": "getContainerRenderParent"
|
||||
},
|
||||
{
|
||||
"name": "getContext"
|
||||
},
|
||||
{
|
||||
"name": "getDirectiveDef"
|
||||
},
|
||||
@ -398,6 +425,9 @@
|
||||
{
|
||||
"name": "getPreviousOrParentTNode"
|
||||
},
|
||||
{
|
||||
"name": "getProp"
|
||||
},
|
||||
{
|
||||
"name": "getRenderFlags"
|
||||
},
|
||||
@ -413,12 +443,18 @@
|
||||
{
|
||||
"name": "getSelectedIndex"
|
||||
},
|
||||
{
|
||||
"name": "getStylesContext"
|
||||
},
|
||||
{
|
||||
"name": "getStylingContextFromLView"
|
||||
},
|
||||
{
|
||||
"name": "getTNode"
|
||||
},
|
||||
{
|
||||
"name": "getValuesCount"
|
||||
},
|
||||
{
|
||||
"name": "hasClassInput"
|
||||
},
|
||||
@ -575,6 +611,12 @@
|
||||
{
|
||||
"name": "refreshDynamicEmbeddedViews"
|
||||
},
|
||||
{
|
||||
"name": "registerBinding"
|
||||
},
|
||||
{
|
||||
"name": "registerInitialStylingIntoContext"
|
||||
},
|
||||
{
|
||||
"name": "registerPostOrderHooks"
|
||||
},
|
||||
@ -608,6 +650,9 @@
|
||||
{
|
||||
"name": "resolveDirectives"
|
||||
},
|
||||
{
|
||||
"name": "runtimeIsNewStylingInUse"
|
||||
},
|
||||
{
|
||||
"name": "saveNameToExportMap"
|
||||
},
|
||||
|
@ -11,6 +11,9 @@
|
||||
{
|
||||
"name": "BINDING_INDEX"
|
||||
},
|
||||
{
|
||||
"name": "BIT_MASK_APPLY_ALL"
|
||||
},
|
||||
{
|
||||
"name": "BLOOM_MASK"
|
||||
},
|
||||
@ -47,6 +50,18 @@
|
||||
{
|
||||
"name": "DECLARATION_VIEW"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_BINDING_INDEX_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_BINDING_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_MASK_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_SIZE_VALUE"
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_TEMPLATE_DIRECTIVE_INDEX"
|
||||
},
|
||||
@ -377,6 +392,9 @@
|
||||
{
|
||||
"name": "_selectedIndex"
|
||||
},
|
||||
{
|
||||
"name": "_stylingMode"
|
||||
},
|
||||
{
|
||||
"name": "_symbolIterator"
|
||||
},
|
||||
@ -389,6 +407,9 @@
|
||||
{
|
||||
"name": "activeDirectiveSuperClassHeight"
|
||||
},
|
||||
{
|
||||
"name": "addBindingIntoContext"
|
||||
},
|
||||
{
|
||||
"name": "addComponentLogic"
|
||||
},
|
||||
@ -413,21 +434,39 @@
|
||||
{
|
||||
"name": "allocStylingContext"
|
||||
},
|
||||
{
|
||||
"name": "allocStylingContext"
|
||||
},
|
||||
{
|
||||
"name": "allocateNewContextEntry"
|
||||
},
|
||||
{
|
||||
"name": "allocateOrUpdateDirectiveIntoContext"
|
||||
},
|
||||
{
|
||||
"name": "allowFlush"
|
||||
},
|
||||
{
|
||||
"name": "allowStylingFlush"
|
||||
},
|
||||
{
|
||||
"name": "allowValueChange"
|
||||
},
|
||||
{
|
||||
"name": "appendChild"
|
||||
},
|
||||
{
|
||||
"name": "applyClasses"
|
||||
},
|
||||
{
|
||||
"name": "applyOnCreateInstructions"
|
||||
},
|
||||
{
|
||||
"name": "applyStyles"
|
||||
},
|
||||
{
|
||||
"name": "applyStyling"
|
||||
},
|
||||
{
|
||||
"name": "assertTemplate"
|
||||
},
|
||||
@ -476,6 +515,12 @@
|
||||
{
|
||||
"name": "checkView"
|
||||
},
|
||||
{
|
||||
"name": "classProp"
|
||||
},
|
||||
{
|
||||
"name": "classesBitMask"
|
||||
},
|
||||
{
|
||||
"name": "cleanUpView"
|
||||
},
|
||||
@ -542,6 +587,9 @@
|
||||
{
|
||||
"name": "createViewBlueprint"
|
||||
},
|
||||
{
|
||||
"name": "currentClassIndex"
|
||||
},
|
||||
{
|
||||
"name": "decreaseElementDepthCount"
|
||||
},
|
||||
@ -551,6 +599,12 @@
|
||||
{
|
||||
"name": "defaultScheduler"
|
||||
},
|
||||
{
|
||||
"name": "deferBindingRegistration"
|
||||
},
|
||||
{
|
||||
"name": "deferredBindingQueue"
|
||||
},
|
||||
{
|
||||
"name": "destroyLView"
|
||||
},
|
||||
@ -638,6 +692,9 @@
|
||||
{
|
||||
"name": "findViaComponent"
|
||||
},
|
||||
{
|
||||
"name": "flushDeferredBindings"
|
||||
},
|
||||
{
|
||||
"name": "flushQueue"
|
||||
},
|
||||
@ -659,12 +716,21 @@
|
||||
{
|
||||
"name": "getActiveDirectiveStylingIndex"
|
||||
},
|
||||
{
|
||||
"name": "getActiveDirectiveStylingIndex"
|
||||
},
|
||||
{
|
||||
"name": "getActiveDirectiveSuperClassDepth"
|
||||
},
|
||||
{
|
||||
"name": "getActiveDirectiveSuperClassHeight"
|
||||
},
|
||||
{
|
||||
"name": "getBeforeNodeForView"
|
||||
},
|
||||
{
|
||||
"name": "getBindingNameFromIndex"
|
||||
},
|
||||
{
|
||||
"name": "getBindingsEnabled"
|
||||
},
|
||||
@ -674,6 +740,9 @@
|
||||
{
|
||||
"name": "getCheckNoChangesMode"
|
||||
},
|
||||
{
|
||||
"name": "getClassesContext"
|
||||
},
|
||||
{
|
||||
"name": "getCleanup"
|
||||
},
|
||||
@ -689,9 +758,15 @@
|
||||
{
|
||||
"name": "getComponentViewByInstance"
|
||||
},
|
||||
{
|
||||
"name": "getConfig"
|
||||
},
|
||||
{
|
||||
"name": "getContainerRenderParent"
|
||||
},
|
||||
{
|
||||
"name": "getContext"
|
||||
},
|
||||
{
|
||||
"name": "getContextLView"
|
||||
},
|
||||
@ -713,6 +788,9 @@
|
||||
{
|
||||
"name": "getGlobal"
|
||||
},
|
||||
{
|
||||
"name": "getGuardMask"
|
||||
},
|
||||
{
|
||||
"name": "getHighestElementOrICUContainer"
|
||||
},
|
||||
@ -776,6 +854,9 @@
|
||||
{
|
||||
"name": "getNativeByTNode"
|
||||
},
|
||||
{
|
||||
"name": "getNativeFromLView"
|
||||
},
|
||||
{
|
||||
"name": "getNodeInjectable"
|
||||
},
|
||||
@ -833,12 +914,18 @@
|
||||
{
|
||||
"name": "getProp"
|
||||
},
|
||||
{
|
||||
"name": "getProp"
|
||||
},
|
||||
{
|
||||
"name": "getRenderFlags"
|
||||
},
|
||||
{
|
||||
"name": "getRenderParent"
|
||||
},
|
||||
{
|
||||
"name": "getRenderer"
|
||||
},
|
||||
{
|
||||
"name": "getRootContext"
|
||||
},
|
||||
@ -854,6 +941,9 @@
|
||||
{
|
||||
"name": "getStyleSanitizer"
|
||||
},
|
||||
{
|
||||
"name": "getStylesContext"
|
||||
},
|
||||
{
|
||||
"name": "getStylingContext"
|
||||
},
|
||||
@ -878,6 +968,12 @@
|
||||
{
|
||||
"name": "getValue"
|
||||
},
|
||||
{
|
||||
"name": "getValue"
|
||||
},
|
||||
{
|
||||
"name": "getValuesCount"
|
||||
},
|
||||
{
|
||||
"name": "handleError"
|
||||
},
|
||||
@ -920,15 +1016,15 @@
|
||||
{
|
||||
"name": "initNodeFlags"
|
||||
},
|
||||
{
|
||||
"name": "initStyling"
|
||||
},
|
||||
{
|
||||
"name": "initializeStaticContext"
|
||||
},
|
||||
{
|
||||
"name": "initializeTNodeInputs"
|
||||
},
|
||||
{
|
||||
"name": "initstyling"
|
||||
},
|
||||
{
|
||||
"name": "injectElementRef"
|
||||
},
|
||||
@ -980,6 +1076,9 @@
|
||||
{
|
||||
"name": "isContextDirty"
|
||||
},
|
||||
{
|
||||
"name": "isContextLocked"
|
||||
},
|
||||
{
|
||||
"name": "isCreationMode"
|
||||
},
|
||||
@ -1031,6 +1130,9 @@
|
||||
{
|
||||
"name": "isStylingContext"
|
||||
},
|
||||
{
|
||||
"name": "isValueDefined"
|
||||
},
|
||||
{
|
||||
"name": "iterateListLike"
|
||||
},
|
||||
@ -1049,6 +1151,9 @@
|
||||
{
|
||||
"name": "locateHostElement"
|
||||
},
|
||||
{
|
||||
"name": "lockContext"
|
||||
},
|
||||
{
|
||||
"name": "looseIdentical"
|
||||
},
|
||||
@ -1145,9 +1250,15 @@
|
||||
{
|
||||
"name": "refreshDynamicEmbeddedViews"
|
||||
},
|
||||
{
|
||||
"name": "registerBinding"
|
||||
},
|
||||
{
|
||||
"name": "registerHostDirective"
|
||||
},
|
||||
{
|
||||
"name": "registerInitialStylingIntoContext"
|
||||
},
|
||||
{
|
||||
"name": "registerMultiMapEntry"
|
||||
},
|
||||
@ -1199,6 +1310,12 @@
|
||||
{
|
||||
"name": "resolveForwardRef"
|
||||
},
|
||||
{
|
||||
"name": "runtimeAllowOldStyling"
|
||||
},
|
||||
{
|
||||
"name": "runtimeIsNewStylingInUse"
|
||||
},
|
||||
{
|
||||
"name": "saveNameToExportMap"
|
||||
},
|
||||
@ -1229,6 +1346,12 @@
|
||||
{
|
||||
"name": "setClass"
|
||||
},
|
||||
{
|
||||
"name": "setClass"
|
||||
},
|
||||
{
|
||||
"name": "setConfig"
|
||||
},
|
||||
{
|
||||
"name": "setContextDirty"
|
||||
},
|
||||
@ -1289,6 +1412,9 @@
|
||||
{
|
||||
"name": "setStyle"
|
||||
},
|
||||
{
|
||||
"name": "setStyle"
|
||||
},
|
||||
{
|
||||
"name": "setTNodeAndViewData"
|
||||
},
|
||||
@ -1313,9 +1439,18 @@
|
||||
{
|
||||
"name": "stringifyForError"
|
||||
},
|
||||
{
|
||||
"name": "stylesBitMask"
|
||||
},
|
||||
{
|
||||
"name": "stylingApply"
|
||||
},
|
||||
{
|
||||
"name": "stylingContext"
|
||||
},
|
||||
{
|
||||
"name": "stylingInit"
|
||||
},
|
||||
{
|
||||
"name": "syncViewWithBlueprint"
|
||||
},
|
||||
@ -1331,12 +1466,24 @@
|
||||
{
|
||||
"name": "unwrapRNode"
|
||||
},
|
||||
{
|
||||
"name": "updateBindingData"
|
||||
},
|
||||
{
|
||||
"name": "updateClassBinding"
|
||||
},
|
||||
{
|
||||
"name": "updateClassProp"
|
||||
},
|
||||
{
|
||||
"name": "updateContextDirectiveIndex"
|
||||
},
|
||||
{
|
||||
"name": "updateContextWithBindings"
|
||||
},
|
||||
{
|
||||
"name": "updateLastDirectiveIndex"
|
||||
},
|
||||
{
|
||||
"name": "updateSingleStylingValue"
|
||||
},
|
||||
|
Reference in New Issue
Block a user