|
Lines 420-425
nsINode::ChildNodes()
|
Link Here
|
---|
|
420 |
} |
420 |
} |
421 |
|
421 |
|
422 |
void |
422 |
void |
|
|
423 |
nsINode::InvalidateChildNodes() |
424 |
{ |
425 |
MOZ_ASSERT(IsElement() || !IsNodeOfType(nsINode::eATTRIBUTE)); |
426 |
|
427 |
nsSlots* slots = GetExistingSlots(); |
428 |
if (!slots || !slots->mChildNodes) { |
429 |
return; |
430 |
} |
431 |
|
432 |
auto childNodes = |
433 |
static_cast<nsParentNodeChildContentList*>(slots->mChildNodes.get()); |
434 |
childNodes->InvalidateCache(); |
435 |
} |
436 |
|
437 |
void |
423 |
nsINode::GetTextContentInternal(nsAString& aTextContent, OOMReporter& aError) |
438 |
nsINode::GetTextContentInternal(nsAString& aTextContent, OOMReporter& aError) |
424 |
{ |
439 |
{ |
425 |
SetDOMStringToNull(aTextContent); |
440 |
SetDOMStringToNull(aTextContent); |
Lines 1602-1613
nsINode::doInsertChildAt(nsIContent* aKi
|
Link Here
|
---|
|
1602 |
} |
1617 |
} |
1603 |
|
1618 |
|
1604 |
// Invalidate cached array of child nodes |
1619 |
// Invalidate cached array of child nodes |
1605 |
nsSlots* slots = GetExistingSlots(); |
1620 |
InvalidateChildNodes(); |
1606 |
if (slots && slots->mChildNodes) { |
|
|
1607 |
auto childNodes = |
1608 |
static_cast<nsParentNodeChildContentList*>(slots->mChildNodes.get()); |
1609 |
childNodes->InvalidateCache(); |
1610 |
} |
1611 |
|
1621 |
|
1612 |
nsIContent* parent = |
1622 |
nsIContent* parent = |
1613 |
IsNodeOfType(eDOCUMENT) ? nullptr : static_cast<nsIContent*>(this); |
1623 |
IsNodeOfType(eDOCUMENT) ? nullptr : static_cast<nsIContent*>(this); |
Lines 1931-1942
nsINode::doRemoveChildAt(uint32_t aIndex
|
Link Here
|
---|
|
1931 |
aChildArray.RemoveChildAt(aIndex); |
1941 |
aChildArray.RemoveChildAt(aIndex); |
1932 |
|
1942 |
|
1933 |
// Invalidate cached array of child nodes |
1943 |
// Invalidate cached array of child nodes |
1934 |
nsSlots* slots = GetExistingSlots(); |
1944 |
InvalidateChildNodes(); |
1935 |
if (slots && slots->mChildNodes) { |
|
|
1936 |
auto childNodes = |
1937 |
static_cast<nsParentNodeChildContentList*>(slots->mChildNodes.get()); |
1938 |
childNodes->InvalidateCache(); |
1939 |
} |
1940 |
|
1945 |
|
1941 |
if (aNotify) { |
1946 |
if (aNotify) { |
1942 |
nsNodeUtils::ContentRemoved(this, aKid, previousSibling); |
1947 |
nsNodeUtils::ContentRemoved(this, aKid, previousSibling); |