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

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

Issue 2676533003: [LayoutNG] Convert physical fragments to being RefCounted. (Closed)
Patch Set: address comments. Created 3 years, 10 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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
index 5272b4357e067ba5c5faa0bdf6197497b6807407..e89deeb784b195fc93a0793aa1a445b17e7ca4e3 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment.h
@@ -13,14 +13,13 @@
namespace blink {
-class CORE_EXPORT NGFragment : public GarbageCollected<NGFragment> {
+class CORE_EXPORT NGFragment {
+ STACK_ALLOCATED();
+
public:
NGWritingMode WritingMode() const {
return static_cast<NGWritingMode>(writing_mode_);
}
- TextDirection Direction() const {
- return static_cast<TextDirection>(direction_);
- }
// Returns the border-box size.
LayoutUnit InlineSize() const;
@@ -36,22 +35,13 @@ class CORE_EXPORT NGFragment : public GarbageCollected<NGFragment> {
NGPhysicalFragment::NGFragmentType Type() const;
- NGPhysicalFragment* PhysicalFragment() const { return physical_fragment_; };
-
- DECLARE_TRACE();
-
protected:
- NGFragment(NGWritingMode writing_mode,
- TextDirection direction,
- NGPhysicalFragment* physical_fragment)
- : physical_fragment_(physical_fragment),
- writing_mode_(writing_mode),
- direction_(static_cast<unsigned>(direction)) {}
+ NGFragment(NGWritingMode writing_mode, NGPhysicalFragment* physical_fragment)
+ : physical_fragment_(physical_fragment), writing_mode_(writing_mode) {}
- Member<NGPhysicalFragment> physical_fragment_;
+ NGPhysicalFragment* physical_fragment_;
unsigned writing_mode_ : 3;
- unsigned direction_ : 1;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_floating_object.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698