Index: third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h |
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h |
index ea810396094492b48ddffae0c2ea248ba8742ddd..f2f244d8d478f50260072bb44c12b7996a92b263 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h |
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h |
@@ -30,11 +30,24 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment { |
const NGInlineNode* Node() const { return node_; } |
StringView Text() const { return node_->Text(start_offset_, end_offset_); } |
+ const ShapeResult* TextShapeResult() const { |
+ // TOD(eae): This is incorrect as it includes the full results for the line, |
+ // should either subset the range (for now) or use the line shape results |
+ // once we switch to the shaper driven line breaker. |
+ return node_->Items()[item_index_].TextShapeResult(); |
+ } |
+ |
// The range of NGLayoutInlineItem. |
unsigned ItemIndex() const { return item_index_; } |
unsigned StartOffset() const { return start_offset_; } |
unsigned EndOffset() const { return end_offset_; } |
+ // TODO(eae): Move definition of kCNoTruncation and use here. |
+ unsigned short Truncation() const { return USHRT_MAX; } |
+ |
+ // TODO(eae): ??? |
+ bool IsHorizontal() const { return true; } |
+ |
private: |
// TODO(kojii): NGInlineNode is to access text content and NGLayoutInlineItem. |
// Review if it's better to point them. |