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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.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_fragment_builder.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
index cb4a5bd08a1109d59980638aa171cb96bb03f459..d524b3625fa451727cd962485bd367e715cee296 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
@@ -11,9 +11,9 @@
namespace blink {
class CORE_EXPORT NGFragmentBuilder final
- : public GarbageCollected<NGFragmentBuilder> {
+ : public GarbageCollectedFinalized<NGFragmentBuilder> {
public:
- NGFragmentBuilder(NGFragmentBase::NGFragmentType);
+ NGFragmentBuilder(NGPhysicalFragmentBase::NGFragmentType);
NGFragmentBuilder& SetWritingMode(NGWritingMode);
NGFragmentBuilder& SetDirection(NGDirection);
@@ -24,25 +24,26 @@ class CORE_EXPORT NGFragmentBuilder final
NGFragmentBuilder& SetInlineOverflow(LayoutUnit);
NGFragmentBuilder& SetBlockOverflow(LayoutUnit);
- NGFragmentBuilder& AddChild(const NGFragment*);
+ NGFragmentBuilder& AddChild(NGFragment*, NGLogicalOffset);
// Offsets are not supposed to be set during fragment construction, so we
// do not provide a setter here.
// Creates the fragment. Can only be called once.
- NGFragment* ToFragment();
+ NGPhysicalFragment* ToFragment();
DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(children_); }
private:
- NGFragmentBase::NGFragmentType type_;
+ NGPhysicalFragmentBase::NGFragmentType type_;
NGWritingMode writing_mode_;
NGDirection direction_;
NGLogicalSize size_;
NGLogicalSize overflow_;
- HeapVector<Member<const NGFragmentBase>> children_;
+ HeapVector<Member<NGPhysicalFragmentBase>> children_;
+ Vector<NGLogicalOffset> offsets_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698