Logo Search packages:      
Sourcecode: xulrunner-1.9 version File versions  Download package

nsIContent * nsIContent::FindFirstNonNativeAnonymous (  )  const [virtual, inherited]

Returns |this| if it is not native anonymous, otherwise first non native anonymous ancestor.

Definition at line 432 of file nsGenericElement.cpp.

References nsIContent::GetBindingParent(), nsINode::GetParent(), and nsIContent::IsNativeAnonymous().

{
  // This handles also nested native anonymous content.
  nsIContent* content = GetBindingParent();
  nsIContent* possibleResult = 
    !IsNativeAnonymous() ? const_cast<nsIContent*>(this) : nsnull;
  while (content) {
    if (content->IsNativeAnonymous()) {
      content = possibleResult = content->GetParent();
    } else {
      content = content->GetBindingParent();
    }
  }

  return possibleResult;
}


Generated by  Doxygen 1.6.0   Back to index