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

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

Issue 2722763002: [LayoutNG] Switch NGBreakToken to being RefCounted. (Closed)
Patch Set: remove 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_break_token.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_break_token.h b/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
index 94fb6d19a6e7a226557f3ef0ff6e94878dc2bd4d..d055ba4179de9fd8e2abd0d6ed243ae97e989a53 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_break_token.h
@@ -6,12 +6,12 @@
#define NGBreakToken_h
#include "core/CoreExport.h"
+#include "core/layout/ng/ng_layout_input_node.h"
#include "platform/heap/Handle.h"
+#include "wtf/RefCounted.h"
namespace blink {
-class NGLayoutInputNode;
-
// A break token is a continuation token for layout. A single layout input node
// can have multiple fragments asssociated with it.
//
@@ -31,8 +31,7 @@ class NGLayoutInputNode;
// NGPhysicalFragment* fragment2 = node->Layout(space, fragment->BreakToken());
//
// The break token should encapsulate enough information to "resume" the layout.
-class CORE_EXPORT NGBreakToken
- : public GarbageCollectedFinalized<NGBreakToken> {
+class CORE_EXPORT NGBreakToken : public RefCounted<NGBreakToken> {
public:
virtual ~NGBreakToken() {}
@@ -48,8 +47,6 @@ class CORE_EXPORT NGBreakToken
// used with any other node.
NGLayoutInputNode* InputNode() const { return node_; }
- DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(node_); }
-
protected:
NGBreakToken(NGBreakTokenType type,
NGBreakTokenStatus status,
@@ -60,7 +57,7 @@ class CORE_EXPORT NGBreakToken
unsigned type_ : 1;
unsigned status_ : 1;
- Member<NGLayoutInputNode> node_;
+ Persistent<NGLayoutInputNode> node_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698