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

Unified Diff: Source/core/editing/TextIterator.h

Issue 319083004: Oilpan: add Element/Node Member fields to stack allocated objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/core/dom/shadow/ComposedTreeWalker.h ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.h
diff --git a/Source/core/editing/TextIterator.h b/Source/core/editing/TextIterator.h
index b6be1fa052cc0aebaef12b39dd84f93b75b12e9d..b19ffaa7fcd73923daa179632e3437c0a997cc2d 100644
--- a/Source/core/editing/TextIterator.h
+++ b/Source/core/editing/TextIterator.h
@@ -74,6 +74,7 @@ private:
// chunks so as to optimize for performance of the iteration.
class TextIterator {
+ STACK_ALLOCATED();
public:
explicit TextIterator(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
// [start, end] indicates the document range that the iteration should take place within (both ends inclusive).
@@ -139,22 +140,22 @@ private:
// Current position, not necessarily of the text being returned, but position
// as we walk through the DOM tree.
- Node* m_node;
+ RawPtrWillBeMember<Node> m_node;
int m_offset;
IterationProgress m_iterationProgress;
BitStack m_fullyClippedStack;
int m_shadowDepth;
// The range.
- Node* m_startContainer;
+ RawPtrWillBeMember<Node> m_startContainer;
int m_startOffset;
- Node* m_endContainer;
+ RawPtrWillBeMember<Node> m_endContainer;
int m_endOffset;
- Node* m_pastEndNode;
+ RawPtrWillBeMember<Node> m_pastEndNode;
// The current text and its position, in the form to be returned from the iterator.
- Node* m_positionNode;
- mutable Node* m_positionOffsetBaseNode;
+ RawPtrWillBeMember<Node> m_positionNode;
+ mutable RawPtrWillBeMember<Node> m_positionOffsetBaseNode;
mutable int m_positionStartOffset;
mutable int m_positionEndOffset;
int m_textLength;
@@ -171,7 +172,7 @@ private:
RenderText *m_firstLetterText;
// Used to do the whitespace collapsing logic.
- Node* m_lastTextNode;
+ RawPtrWillBeMember<Node> m_lastTextNode;
bool m_lastTextNodeEndedWithCollapsedSpace;
UChar m_lastCharacter;
@@ -213,6 +214,7 @@ private:
// at points where replaced elements break up the text flow. The text comes back in
// chunks so as to optimize for performance of the iteration.
class SimplifiedBackwardsTextIterator {
+ STACK_ALLOCATED();
public:
explicit SimplifiedBackwardsTextIterator(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
@@ -247,21 +249,21 @@ private:
// Current position, not necessarily of the text being returned, but position
// as we walk through the DOM tree.
- Node* m_node;
+ RawPtrWillBeMember<Node> m_node;
int m_offset;
bool m_handledNode;
bool m_handledChildren;
BitStack m_fullyClippedStack;
// End of the range.
- Node* m_startNode;
+ RawPtrWillBeMember<Node> m_startNode;
int m_startOffset;
// Start of the range.
- Node* m_endNode;
+ RawPtrWillBeMember<Node> m_endNode;
int m_endOffset;
// The current text and its position, in the form to be returned from the iterator.
- Node* m_positionNode;
+ RawPtrWillBeMember<Node> m_positionNode;
int m_positionStartOffset;
int m_positionEndOffset;
@@ -270,7 +272,7 @@ private:
int m_textLength;
// Used to do the whitespace logic.
- Node* m_lastTextNode;
+ RawPtrWillBeMember<Node> m_lastTextNode;
UChar m_lastCharacter;
// Used for whitespace characters that aren't in the DOM, so we can point at them.
@@ -295,6 +297,7 @@ private:
// Builds on the text iterator, adding a character position so we can walk one
// character at a time, or faster, as needed. Useful for searching.
class CharacterIterator {
+ STACK_ALLOCATED();
public:
explicit CharacterIterator(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
CharacterIterator(const Position& start, const Position& end, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
@@ -324,6 +327,7 @@ private:
};
class BackwardsCharacterIterator {
+ STACK_ALLOCATED();
public:
explicit BackwardsCharacterIterator(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBehavior);
« no previous file with comments | « Source/core/dom/shadow/ComposedTreeWalker.h ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698