Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h

Issue 2842983002: [LayoutNG] Paint inlines from the fragment tree
Patch Set: Rebase w/HEAD Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698