mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 919144. Part 6: nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay should call IsFixedPosFrameInDisplayPort and make fixed-pos frames intersect their overflow-rect with the viewport's displayport to get their dirty rect. r=mattwoodrow
This prevents insanely large fixed-pos elements from getting an over-huge dirty rect and building an enormous display list. This is also a step towards getting rid of nsDisplayListBuilder::mHasDisplayPort, which is good because the new code works on any subdocument that has a displayport. --HG-- extra : rebase_source : e853022dd2ce85af318f235f8851d9dd8b5001ac
This commit is contained in:
parent
5c4d418146
commit
c14b5d34af
@ -585,7 +585,14 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||
nsIFrame* aFrame,
|
||||
const nsRect& aDirtyRect)
|
||||
{
|
||||
nsRect dirty = aDirtyRect - aFrame->GetOffsetTo(aDirtyFrame);
|
||||
nsRect dirtyRectRelativeToDirtyFrame = aDirtyRect;
|
||||
nsRect displayPort;
|
||||
if (nsLayoutUtils::IsFixedPosFrameInDisplayPort(aFrame, &displayPort)) {
|
||||
NS_ASSERTION(aDirtyFrame == aFrame->GetParent(), "Dirty frame should be viewport frame");
|
||||
dirtyRectRelativeToDirtyFrame = displayPort;
|
||||
}
|
||||
|
||||
nsRect dirty = dirtyRectRelativeToDirtyFrame - aFrame->GetOffsetTo(aDirtyFrame);
|
||||
nsRect overflowRect = aFrame->GetVisualOverflowRect();
|
||||
|
||||
if (aFrame->IsTransformed() &&
|
||||
@ -599,10 +606,6 @@ void nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay(nsIFrame* aDirtyFrame,
|
||||
overflowRect.Inflate(nsPresContext::CSSPixelsToAppUnits(32));
|
||||
}
|
||||
|
||||
if (mHasDisplayPort && IsFixedFrame(aFrame)) {
|
||||
dirty = overflowRect;
|
||||
}
|
||||
|
||||
if (!dirty.IntersectRect(dirty, overflowRect))
|
||||
return;
|
||||
const DisplayItemClip* clip = mClipState.GetClipForContainingBlockDescendants();
|
||||
|
Loading…
Reference in New Issue
Block a user