Bug 454821. Better signature for GetChildArray. r+sr=sicking
This commit is contained in:
@@ -4839,9 +4839,9 @@ nsGenericElement::GetChildAt(PRUint32 aIndex) const
|
||||
}
|
||||
|
||||
nsIContent * const *
|
||||
nsGenericElement::GetChildArray() const
|
||||
nsGenericElement::GetChildArray(PRUint32* aChildCount) const
|
||||
{
|
||||
return mAttrsAndChildren.GetChildArray();
|
||||
return mAttrsAndChildren.GetChildArray(aChildCount);
|
||||
}
|
||||
|
||||
PRInt32
|
||||
@@ -5095,7 +5095,6 @@ TryMatchingElementsInSubtree(nsINode* aRoot,
|
||||
ElementMatchedCallback aCallback,
|
||||
void* aClosure)
|
||||
{
|
||||
PRUint32 count = aRoot->GetChildCount();
|
||||
/* To improve the performance of '+' and '~' combinators and the :nth-*
|
||||
* selectors, we keep track of the immediately previous sibling data. That's
|
||||
* cheaper than heap-allocating all the datas and keeping track of them all,
|
||||
@@ -5104,7 +5103,8 @@ TryMatchingElementsInSubtree(nsINode* aRoot,
|
||||
char databuf[2 * sizeof(RuleProcessorData)];
|
||||
RuleProcessorData* prevSibling = nsnull;
|
||||
RuleProcessorData* data = reinterpret_cast<RuleProcessorData*>(databuf);
|
||||
nsIContent * const * kidSlot = aRoot->GetChildArray();
|
||||
PRUint32 count;
|
||||
nsIContent * const * kidSlot = aRoot->GetChildArray(&count);
|
||||
nsIContent * const * end = kidSlot + count;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
Reference in New Issue
Block a user