[webkit-dev] AncestorChainWalker substance and style thoughts
rniwa at webkit.org
Mon Feb 18 18:17:29 PST 2013
See https://bugs.webkit.org/show_bug.cgi?id=110146 where we're going to
rename the class, member functions and variables.
On Mon, Feb 18, 2013 at 5:37 PM, Darin Adler <darin at apple.com> wrote:
> There is a function in AncestorChainWalker named parent. That name is a
> noun, so the function should be a const function that returns a value.
> Since it’s not, the function name should be a verb phrase, such as
> advanceToParent, or event just “advance” since it’s in the context of an
> ancestor chain walker.
The function crossingInsertionPoint should be named
> isCrossingInsertionPoint as the data member is. But also, since the walker
> sits still on a single node, I don’t think it makes sense to talk about the
> position as “is crossing”. It should be “just crossed” or something like
> that instead. Unless an insertion point is like a bridge and is not itself
> a “true node”.
The function that returns the current node in the ancestor chain is named
> “get”. That’s not a good name, and should be avoided if possible. It could
> be named “node” or “currentNode” instead.
Yup. Completely agree.
- R. Niwa
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev