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

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

Issue 2282213002: [LayoutNG] Introduce NGPhysicalFragment and make NGFragment a 'view' (Closed)
Patch Set: address comments. Created 4 years, 4 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/ng_text_fragment.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_text_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_text_fragment.h
index 5fe524170447a988cdef58ed012ac2f4568962da..bf34c3cc9d3ce4227ef0d0238ae4884141d7345c 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_text_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_text_fragment.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "core/layout/ng/ng_fragment_base.h"
+#include "core/layout/ng/ng_physical_text_fragment.h"
#include "core/layout/ng/ng_layout_input_text.h"
#include "platform/LayoutUnit.h"
#include "platform/heap/Handle.h"
@@ -16,23 +17,14 @@ namespace blink {
class CORE_EXPORT NGTextFragment final : public NGFragmentBase {
public:
- NGTextFragment(NGLogicalSize size,
- NGLogicalSize overflow,
- NGWritingMode writingMode,
- NGDirection direction)
- : NGFragmentBase(size, overflow, writingMode, direction, FragmentText) {}
+ NGTextFragment(NGWritingMode writing_mode,
+ NGDirection direction,
+ NGPhysicalTextFragment* physical_text_fragment)
+ : NGFragmentBase(writing_mode, direction, physical_text_fragment) {}
- String text() const;
-
- DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
- visitor->trace(text_list_);
- NGFragmentBase::traceAfterDispatch(visitor);
+ String Text() const {
+ return toNGPhysicalTextFragment(physical_fragment_)->Text();
}
-
- private:
- Member<NGLayoutInputText> text_list_;
- unsigned start_offset_;
- unsigned end_offset_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698