Summary: | Range, EAnnotateForInterchange, and EAbsoluteURLs should be member variables of MarkupAccumulator | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | HTML Editing | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Enhancement | CC: | abarth, darin, ojan, tkent, tony | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | 43936 | ||||||
Bug Blocks: | 44288 | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2010-08-18 20:31:57 PDT
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> |