File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 15
15
extern const char MarkdownTextInputDecoratorViewComponentName[] =
16
16
" MarkdownTextInputDecoratorView" ;
17
17
18
+ thread_local LayoutContext decoratorLayoutContext{.fontSizeMultiplier =
19
+ RCTFontSizeMultiplier ()};
20
+
18
21
void MarkdownTextInputDecoratorShadowNode::initialize () {
19
22
// Setting display: contents style results in ForceFlattenView trait being set
20
23
// on the shadow node. This trait causes the node not to have a host view. By
93
96
94
97
void MarkdownTextInputDecoratorShadowNode::layout (LayoutContext layoutContext) {
95
98
YogaLayoutableShadowNode::layout (layoutContext);
99
+ decoratorLayoutContext = layoutContext;
96
100
97
101
const auto &children = getChildren ();
98
102
react_native_assert (
250
254
const auto &decoratorYogaNode = YGNodeGetParent (const_cast <YGNodeRef>(yogaNode));
251
255
const auto &decoratorShadowNode = shadowNodeFromContext (decoratorYogaNode);
252
256
253
- LayoutContext context{};
254
- context.fontSizeMultiplier = RCTFontSizeMultiplier ();
255
-
256
- const auto size = decoratorShadowNode.measureContent (context, {minimumSize, maximumSize});
257
+ const auto size = decoratorShadowNode.measureContent (
258
+ decoratorLayoutContext, {minimumSize, maximumSize});
257
259
258
260
return YGSize{yogaFloatFromFloat (size.width ),
259
261
yogaFloatFromFloat (size.height )};
You can’t perform that action at this time.
0 commit comments