mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 579323. Part 1.8: Rename InvalidateOverflowRect to InvalidateFrameSubtree. r=tnikkel
--HG-- rename : layout/generic/nsFrameFrame.cpp => layout/generic/nsSubDocumentFrame.cpp extra : rebase_source : f7bd38670a03e8a7f3f8c40838af114be79b06f1
This commit is contained in:
parent
bc09a0496e
commit
c7acef03ff
@ -972,7 +972,7 @@ nsHTMLInputElement::SetIndeterminateInternal(PRBool aValue,
|
||||
// Repaint the frame
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
if (frame)
|
||||
frame->InvalidateOverflowRect();
|
||||
frame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
// Notify the document so it can update :indeterminate pseudoclass rules
|
||||
@ -1619,7 +1619,7 @@ nsHTMLInputElement::SetCheckedInternal(PRBool aChecked, PRBool aNotify)
|
||||
if (mType == NS_FORM_INPUT_CHECKBOX || mType == NS_FORM_INPUT_RADIO) {
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
if (frame) {
|
||||
frame->InvalidateOverflowRect();
|
||||
frame->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7743,7 +7743,7 @@ InvalidateCanvasIfNeeded(nsIPresShell* presShell, nsIContent* node)
|
||||
|
||||
nsIViewManager::UpdateViewBatch batch(presShell->GetViewManager());
|
||||
nsIFrame* rootFrame = presShell->GetRootFrame();
|
||||
rootFrame->InvalidateOverflowRect();
|
||||
rootFrame->InvalidateFrameSubtree();
|
||||
batch.EndUpdateViewBatch(NS_VMREFRESH_DEFERRED);
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ nsFrameManager::RemoveFrame(nsIAtom* aListName,
|
||||
// that doesn't change the size of the parent.)
|
||||
// This has to sure to invalidate the entire overflow rect; this
|
||||
// is important in the presence of absolute positioning
|
||||
aOldFrame->InvalidateOverflowRect();
|
||||
aOldFrame->InvalidateFrameSubtree();
|
||||
|
||||
NS_ASSERTION(!aOldFrame->GetPrevContinuation() ||
|
||||
// exception for nsCSSFrameConstructor::RemoveFloatingFirstLetterFrames
|
||||
|
@ -100,7 +100,7 @@ nsCanvasFrame::ScrollPositionWillChange(nscoord aX, nscoord aY)
|
||||
{
|
||||
if (mDoPaintFocus) {
|
||||
mDoPaintFocus = PR_FALSE;
|
||||
PresContext()->FrameManager()->GetRootFrame()->InvalidateOverflowRect();
|
||||
PresContext()->FrameManager()->GetRootFrame()->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ nsCanvasFrame::SetHasFocus(PRBool aHasFocus)
|
||||
{
|
||||
if (mDoPaintFocus != aHasFocus) {
|
||||
mDoPaintFocus = aHasFocus;
|
||||
PresContext()->FrameManager()->GetRootFrame()->InvalidateOverflowRect();
|
||||
PresContext()->FrameManager()->GetRootFrame()->InvalidateFrameSubtree();
|
||||
|
||||
if (!mAddedScrollPositionListener) {
|
||||
nsIScrollableFrame* sf =
|
||||
|
@ -724,7 +724,7 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
|
||||
if ((aFlags & NS_FRAME_INVALIDATE_ON_MOVE) &&
|
||||
!(aKidFrame->GetStateBits() & NS_FRAME_FIRST_REFLOW) &&
|
||||
aKidFrame->GetPosition() != nsPoint(aX, aY)) {
|
||||
aKidFrame->InvalidateOverflowRect();
|
||||
aKidFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
aKidFrame->SetPosition(nsPoint(aX, aY));
|
||||
}
|
||||
@ -1130,7 +1130,7 @@ nsContainerFrame::DeleteNextInFlowChild(nsPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
aNextInFlow->InvalidateOverflowRect();
|
||||
aNextInFlow->InvalidateFrameSubtree();
|
||||
|
||||
// Take the next-in-flow out of the parent's child list
|
||||
#ifdef DEBUG
|
||||
|
@ -3754,7 +3754,7 @@ LayerActivityTracker::NotifyExpired(LayerActivity* aObject)
|
||||
nsIFrame* f = aObject->mFrame;
|
||||
aObject->mFrame = nsnull;
|
||||
f->Properties().Delete(LayerActivityProperty());
|
||||
f->InvalidateOverflowRect();
|
||||
f->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
void
|
||||
@ -3960,12 +3960,18 @@ nsIFrame::InvalidateRectDifference(const nsRect& aR1, const nsRect& aR2)
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::InvalidateOverflowRect()
|
||||
nsIFrame::InvalidateFrameSubtree()
|
||||
{
|
||||
Invalidate(GetOverflowRectRelativeToSelf());
|
||||
FrameLayerBuilder::InvalidateThebesLayersInSubtree(this);
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::InvalidateOverflowRect()
|
||||
{
|
||||
Invalidate(GetOverflowRectRelativeToSelf());
|
||||
}
|
||||
|
||||
NS_DECLARE_FRAME_PROPERTY(DeferInvalidatesProperty, nsIFrame::DestroyRegion)
|
||||
|
||||
void
|
||||
@ -4640,7 +4646,7 @@ nsIFrame::SetSelected(PRBool aSelected, SelectionType aType)
|
||||
}
|
||||
|
||||
// Repaint this frame subtree's entire area
|
||||
InvalidateOverflowRect();
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1263,7 +1263,7 @@ public:
|
||||
virtual void NotifyExpired(nsGfxScrollFrameInner *aObject) {
|
||||
RemoveObject(aObject);
|
||||
aObject->mScrollingActive = PR_FALSE;
|
||||
aObject->mOuter->InvalidateOverflowRect();
|
||||
aObject->mOuter->InvalidateFrameSubtree();
|
||||
}
|
||||
};
|
||||
|
||||
@ -2968,7 +2968,7 @@ static void LayoutAndInvalidate(nsBoxLayoutState& aState,
|
||||
if (aScrollbarIsBeingHidden) {
|
||||
aBox->GetParent()->Invalidate(aBox->GetOverflowRect() + aBox->GetPosition());
|
||||
} else {
|
||||
aBox->InvalidateOverflowRect();
|
||||
aBox->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
nsBoxFrame::LayoutChildAt(aState, aBox, aRect);
|
||||
@ -2976,7 +2976,7 @@ static void LayoutAndInvalidate(nsBoxLayoutState& aState,
|
||||
if (aScrollbarIsBeingHidden) {
|
||||
aBox->GetParent()->Invalidate(aBox->GetOverflowRect() + aBox->GetPosition());
|
||||
} else {
|
||||
aBox->InvalidateOverflowRect();
|
||||
aBox->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1972,8 +1972,16 @@ public:
|
||||
* of ContainerLayers associated with frames in this subtree are
|
||||
* completely invalidated.
|
||||
*/
|
||||
void InvalidateFrameSubtree();
|
||||
|
||||
/**
|
||||
* Invalidate the overflow area for this frame. Invalidates this
|
||||
* frame's overflow rect. Does not necessarily cause ThebesLayers for
|
||||
* descendant frames to be repainted; only this frame can be relied on
|
||||
* to be repainted.
|
||||
*/
|
||||
void InvalidateOverflowRect();
|
||||
|
||||
|
||||
/**
|
||||
* Computes a rect that encompasses everything that might be painted by
|
||||
* this frame. This includes this frame, all its descendent frames, this
|
||||
|
@ -822,12 +822,12 @@ nsSubDocumentFrame::EndSwapDocShells(nsIFrame* aOther)
|
||||
if (weakThis.IsAlive()) {
|
||||
PresContext()->PresShell()->
|
||||
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
InvalidateOverflowRect();
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
if (weakOther.IsAlive()) {
|
||||
other->PresContext()->PresShell()->
|
||||
FrameNeedsReflow(other, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
|
||||
other->InvalidateOverflowRect();
|
||||
other->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ void nsTableCellFrame::VerticallyAlignChild(nscoord aMaxAscent)
|
||||
|
||||
if (kidYTop != kidRect.y) {
|
||||
// Invalidate at the old position first
|
||||
firstKid->InvalidateOverflowRect();
|
||||
firstKid->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
firstKid->SetPosition(nsPoint(kidRect.x, kidYTop));
|
||||
@ -624,7 +624,7 @@ void nsTableCellFrame::VerticallyAlignChild(nscoord aMaxAscent)
|
||||
nsContainerFrame::PositionChildViews(firstKid);
|
||||
|
||||
// Invalidate new overflow rect
|
||||
firstKid->InvalidateOverflowRect();
|
||||
firstKid->InvalidateFrameSubtree();
|
||||
}
|
||||
if (HasView()) {
|
||||
nsContainerFrame::SyncFrameViewAfterReflow(PresContext(), this,
|
||||
@ -926,7 +926,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
|
||||
|
||||
// XXXbz is this invalidate actually needed, really?
|
||||
if (GetStateBits() & NS_FRAME_IS_DIRTY) {
|
||||
InvalidateOverflowRect();
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
@ -2881,12 +2881,12 @@ nsTableFrame::ReflowChildren(nsTableReflowState& aReflowState,
|
||||
nsRect kidRect = kidFrame->GetRect();
|
||||
if (kidRect.y != aReflowState.y) {
|
||||
// invalidate the old position
|
||||
kidFrame->InvalidateOverflowRect();
|
||||
kidFrame->InvalidateFrameSubtree();
|
||||
kidRect.y = aReflowState.y;
|
||||
kidFrame->SetRect(kidRect); // move to the new position
|
||||
RePositionViews(kidFrame);
|
||||
// invalidate the new position
|
||||
kidFrame->InvalidateOverflowRect();
|
||||
kidFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
aReflowState.y += kidRect.height;
|
||||
|
||||
@ -3072,10 +3072,10 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
else {
|
||||
if (amountUsed > 0 && yOriginRow != rowRect.y &&
|
||||
!(GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
rowFrame->SetPosition(nsPoint(rowRect.x, yOriginRow));
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
yOriginRow += rowRect.height + cellSpacingY;
|
||||
yEndRG += rowRect.height + cellSpacingY;
|
||||
@ -3084,7 +3084,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
if (amountUsed > 0) {
|
||||
if (rgRect.y != yOriginRG) {
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
nsRect origRgRect = rgRect;
|
||||
@ -3100,11 +3100,11 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
}
|
||||
else if (amountUsed > 0 && yOriginRG != rgRect.y) {
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
rgFrame->SetPosition(nsPoint(rgRect.x, yOriginRG));
|
||||
// Make sure child views are properly positioned
|
||||
nsTableFrame::RePositionViews(rgFrame);
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
yOriginRG = yEndRG;
|
||||
}
|
||||
@ -3213,7 +3213,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
amountForRow = NS_MIN(amountForRow, aAmount - amountUsed);
|
||||
|
||||
if (yOriginRow != rowRect.y) {
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
// update the row height
|
||||
@ -3235,10 +3235,10 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
else {
|
||||
if (amountUsed > 0 && yOriginRow != rowRect.y) {
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
rowFrame->SetPosition(nsPoint(rowRect.x, yOriginRow));
|
||||
nsTableFrame::RePositionViews(rowFrame);
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
yOriginRow += rowRect.height + cellSpacingY;
|
||||
yEndRG += rowRect.height + cellSpacingY;
|
||||
@ -3247,7 +3247,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
if (amountUsed > 0) {
|
||||
if (rgRect.y != yOriginRG) {
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
rgFrame->SetRect(nsRect(rgRect.x, yOriginRG, rgRect.width,
|
||||
@ -3259,11 +3259,11 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
|
||||
// Make sure child views are properly positioned
|
||||
}
|
||||
else if (amountUsed > 0 && yOriginRG != rgRect.y) {
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
rgFrame->SetPosition(nsPoint(rgRect.x, yOriginRG));
|
||||
// Make sure child views are properly positioned
|
||||
nsTableFrame::RePositionViews(rgFrame);
|
||||
rgFrame->InvalidateOverflowRect();
|
||||
rgFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
yOriginRG = yEndRG;
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
}
|
||||
else {
|
||||
if (x != kidRect.x) {
|
||||
kidFrame->InvalidateOverflowRect();
|
||||
kidFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
desiredSize.width = cellDesiredSize.width;
|
||||
@ -978,12 +978,12 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
else {
|
||||
if (kidRect.x != x) {
|
||||
// Invalidate the old position
|
||||
kidFrame->InvalidateOverflowRect();
|
||||
kidFrame->InvalidateFrameSubtree();
|
||||
// move to the new position
|
||||
kidFrame->SetPosition(nsPoint(x, kidRect.y));
|
||||
nsTableFrame::RePositionViews(kidFrame);
|
||||
// invalidate the new position
|
||||
kidFrame->InvalidateOverflowRect();
|
||||
kidFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
// we need to account for the cell's width even if it isn't reflowed
|
||||
x += kidRect.width;
|
||||
@ -1152,7 +1152,7 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
|
||||
|
||||
if (aRowOffset != 0) {
|
||||
// We're moving, so invalidate our old position
|
||||
InvalidateOverflowRect();
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
nsRect rowRect = GetRect();
|
||||
@ -1273,7 +1273,7 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
|
||||
|
||||
if (aRowOffset == 0 && cRect.TopLeft() != oldCellRect.TopLeft()) {
|
||||
// We're moving the cell. Invalidate the old overflow area
|
||||
cellFrame->InvalidateOverflowRect();
|
||||
cellFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
cellFrame->SetRect(cRect);
|
||||
|
@ -816,7 +816,7 @@ nsTableRowGroupFrame::CalculateRowHeights(nsPresContext* aPresContext,
|
||||
if (movedFrame || (rowHeight != rowBounds.height)) {
|
||||
// Resize/move the row to its final size and position
|
||||
if (movedFrame) {
|
||||
rowFrame->InvalidateOverflowRect();
|
||||
rowFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
rowFrame->SetRect(nsRect(rowBounds.x, yOrigin, rowBounds.width,
|
||||
@ -881,7 +881,7 @@ nsTableRowGroupFrame::CollapseRowGroupIfNecessary(nscoord aYTotalOffset,
|
||||
groupRect.width = aWidth;
|
||||
|
||||
if (aYTotalOffset != 0) {
|
||||
InvalidateOverflowRect();
|
||||
InvalidateFrameSubtree();
|
||||
}
|
||||
|
||||
SetRect(groupRect);
|
||||
@ -906,10 +906,10 @@ nsTableRowGroupFrame::SlideChild(nsRowGroupReflowState& aReflowState,
|
||||
nsPoint newPosition = oldPosition;
|
||||
newPosition.y = aReflowState.y;
|
||||
if (oldPosition.y != newPosition.y) {
|
||||
aKidFrame->InvalidateOverflowRect();
|
||||
aKidFrame->InvalidateFrameSubtree();
|
||||
aKidFrame->SetPosition(newPosition);
|
||||
nsTableFrame::RePositionViews(aKidFrame);
|
||||
aKidFrame->InvalidateOverflowRect();
|
||||
aKidFrame->InvalidateFrameSubtree();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user