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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.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_block_child_iterator.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h b/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h
index 0aee68ee038e46ac303fdcd0893cc926f2d92b1f..dc1a2fcb8395106b1b317362a4e7551b3335b88b 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.h
@@ -7,6 +7,7 @@
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
+#include "wtf/RefPtr.h"
namespace blink {
@@ -20,6 +21,8 @@ class NGBlockBreakToken;
// This class does not handle modifications to its arguments after it has been
// constructed.
class CORE_EXPORT NGBlockChildIterator {
+ STACK_ALLOCATED();
+
public:
NGBlockChildIterator(NGLayoutInputNode* first_child,
NGBlockBreakToken* break_token);
@@ -31,7 +34,7 @@ class CORE_EXPORT NGBlockChildIterator {
private:
Persistent<NGLayoutInputNode> child_;
- Persistent<NGBlockBreakToken> break_token_;
+ NGBlockBreakToken* break_token_;
// An index into break_token_'s ChildBreakTokens() vector. Used for keeping
// track of the next child break token to inspect.
@@ -39,11 +42,13 @@ class CORE_EXPORT NGBlockChildIterator {
};
struct NGBlockChildIterator::Entry {
+ STACK_ALLOCATED();
+
Entry(NGLayoutInputNode* node, NGBreakToken* token)
: node(node), token(token) {}
Persistent<NGLayoutInputNode> node;
- Persistent<NGBreakToken> token;
+ NGBreakToken* token;
bool operator==(const NGBlockChildIterator::Entry& other) const {
return node == other.node && token == other.token;

Powered by Google App Engine
This is Rietveld 408576698