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

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

Issue 2365083002: Make NGFragment to own NGPhysicalFragment (Closed)
Patch Set: Created 4 years, 3 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_base.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
index 9e4ada820961813086208de95bfa961a9388ea78..0c4a38373adcdf3d21c963e244bd305acd2ac7f8 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
@@ -17,7 +17,8 @@ namespace blink {
class NGPhysicalFragmentBase;
-class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
+class CORE_EXPORT NGFragmentBase
+ : public GarbageCollectedFinalized<NGFragmentBase> {
public:
NGWritingMode WritingMode() const {
return static_cast<NGWritingMode>(writing_mode_);
@@ -39,10 +40,10 @@ class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
NGMarginStrut MarginStrut() const;
NGPhysicalFragmentBase* PhysicalFragment() const {
- return physical_fragment_;
+ return physical_fragment_.get();
};
- DECLARE_TRACE();
+ DEFINE_INLINE_TRACE(){};
protected:
NGFragmentBase(NGWritingMode writing_mode,
@@ -52,7 +53,7 @@ class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
writing_mode_(writing_mode),
direction_(direction) {}
- Member<NGPhysicalFragmentBase> physical_fragment_;
+ std::unique_ptr<NGPhysicalFragmentBase> physical_fragment_;
unsigned writing_mode_ : 3;
unsigned direction_ : 1;

Powered by Google App Engine
This is Rietveld 408576698