Bug 26800
| Summary: | isAncestorNode and isDescendantNode: Confusing function names | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adam Comella <rigdern> |
| Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Trivial | CC: | burg |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Adam Comella
function isAncestorNode(ancestor)
It would seem that this function checks to see if "ancestor" is an ancestor of "this." However, it checks if "ancestor" is a descendant of "this." To clarify the meaning of the function, the function should be renamed to isAncestorNodeOf and the parameter should be renamed to potentialDescendant like this:
function isAncestorNodeOf(potentialDescendant)
Similar changes should be made to the isDescendantNode function:
function isDescendantNodeOf(potentialAncestor)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |