Skip to content

Commit

Permalink
Fabric: Unifying interface of stub TextLayoutManager with actual ones
Browse files Browse the repository at this point in the history
Summary:
The interface of css/TextLayoutManager now matches acual platform-specific implementations, so now CXX tests compiles and usable.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D21518656

fbshipit-source-id: cece3bea14c70410eea22abafb424f7a2cb201c0
  • Loading branch information
shergin authored and facebook-github-bot committed May 13, 2020
1 parent 6570f78 commit 0aac4c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ void *TextLayoutManager::getNativeTextLayoutManager() const {
return self_;
}

Size TextLayoutManager::measure(
TextMeasurement TextLayoutManager::measure(
AttributedStringBox attributedStringBox,
ParagraphAttributes paragraphAttributes,
LayoutConstraints layoutConstraints) const {
return Size{0, 0};
return TextMeasurement{{0, 0}, {}};
}

} // namespace react
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <react/attributedstring/AttributedStringBox.h>
#include <react/attributedstring/ParagraphAttributes.h>
#include <react/core/LayoutConstraints.h>
#include <react/textlayoutmanager/TextMeasureCache.h>
#include <react/utils/ContextContainer.h>

namespace facebook {
Expand All @@ -34,7 +35,7 @@ class TextLayoutManager {
/*
* Measures `attributedStringBox` using native text rendering infrastructure.
*/
Size measure(
TextMeasurement measure(
AttributedStringBox attributedStringBox,
ParagraphAttributes paragraphAttributes,
LayoutConstraints layoutConstraints) const;
Expand Down

0 comments on commit 0aac4c3

Please sign in to comment.