We currently pass Range, EAnnotateForInterchange, and EAbsoluteURLs variables through various member functions of MarkupAccumulator. But we should make all three member variables of MarkupAccumulator so that we don't pass around them needlessly.
Created attachment 64807 [details] cleanup
Comment on attachment 64807 [details] cleanup > + inline bool shouldResolveURLs() { return m_shouldResolveURLs == AbsoluteURLs; } > + inline bool shouldAnnotate() { return m_shouldAnnotate == AnnotateForInterchange; } No need for the inline keyword here. All function bodies in a class definition are treated as if marked within line. > + const Range* m_range; Since you're doing all the const, this could be const Range* const to make it clear that the range pointer is also constant. Not that I think the const is all that helpful. r=me
(In reply to comment #2) > (From update of attachment 64807 [details]) > > + inline bool shouldResolveURLs() { return m_shouldResolveURLs == AbsoluteURLs; } > > + inline bool shouldAnnotate() { return m_shouldAnnotate == AnnotateForInterchange; } > > No need for the inline keyword here. All function bodies in a class definition are treated as if marked within line. Will remove inline keyword. > > + const Range* m_range; > > Since you're doing all the const, this could be const Range* const to make it clear that the range pointer is also constant. Not that I think the const is all that helpful. Will add const to m_nodes and m_range. Having const signifies the fact m_range isn't supposed to change and neither is the Range object pointed by m_range. IMHO, it helps people reading the code because we then don't have to worry about the possibility of m_range being used as a shared state between member functions.
Committed r65680: <http://trac.webkit.org/changeset/65680>