Fabric: Calculating positions of attachments as part of text measurement

Summary:
This diff changes API we use to measure text. Previously, a platform-specific measure infra returned just the size of the text, now it returns the size and an array of frames that describe where attachments are placed.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D20268041

fbshipit-source-id: 7c065607b6af18a36318db0aab24dad0f171d33a
This commit is contained in:
Valentin Shergin
2020-03-09 16:32:33 -07:00
committed by Facebook Github Bot
parent d1ad29b7db
commit 90ada5abb1
10 changed files with 94 additions and 40 deletions
@@ -180,10 +180,12 @@ Size AndroidTextInputShadowNode::measure(
return {0, 0};
}
return textLayoutManager_->measure(
AttributedStringBox{attributedString},
getConcreteProps().paragraphAttributes,
layoutConstraints);
return textLayoutManager_
->measure(
AttributedStringBox{attributedString},
getConcreteProps().paragraphAttributes,
layoutConstraints)
.size;
}
void AndroidTextInputShadowNode::layout(LayoutContext layoutContext) {