Skip to content

Commit

Permalink
Test creating host for every single node
Browse files Browse the repository at this point in the history
Summary: As per title, plan to test the perf impact.

Reviewed By: adityasharat

Differential Revision: D68489903

fbshipit-source-id: 6e5de7a3d3d5e9297ac51d39401f43acf5aeb2a6
  • Loading branch information
Andrew Wang authored and facebook-github-bot committed Jan 22, 2025
1 parent ebfea3a commit 065b49d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litho-core/src/main/java/com/facebook/litho/LithoNode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import com.facebook.litho.CommonProps.DefaultLayoutProps
import com.facebook.litho.ComponentHostUtils.maybeSetDrawableState
import com.facebook.litho.Transition.TransitionKeyType
import com.facebook.litho.annotations.ImportantForAccessibility
import com.facebook.litho.config.ComponentsConfiguration
import com.facebook.litho.config.LithoDebugConfigurations
import com.facebook.litho.drawable.ComparableColorDrawable
import com.facebook.litho.layout.LayoutDirection
Expand Down Expand Up @@ -1227,7 +1228,7 @@ open class LithoNode : Node<LithoLayoutContext>, Cloneable {
ComponentContext.getComponentsConfig(c).shouldAddRootHostViewOrDisableBgFgOutputs &&
(node.background != null || node.foreground != null)
val hasAccessibilityContent =
(context?.isAccessibilityEnabled == true) &&
((context?.isAccessibilityEnabled == true) || ComponentsConfiguration.enableA11Y) &&
(importantForAccessibility != ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO) &&
(implementsAccessibility ||
!(nodeInfo?.contentDescription.isNullOrEmpty()) ||
Expand Down

0 comments on commit 065b49d

Please sign in to comment.