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
Reported 2009-06-29 08:59:51 PDT
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
Note You need to log in before you can comment on or make changes to this bug.