Bug 841192. Part 14: Convert all usage of nsDisplayClip(RoundedRect) to use DisplayListClipState/DisplayItemClip. r=mattwoodrow

This patch does several things. Sorry.

In BuildDisplayList implementations, instead of wrapping display items in nsDisplayClip, we
push clip state onto the nsDisplayListBuilder and give the display items an
explicit clip when they're created.

In FrameLayerBuilder, we use the explicit clips we find on display items instead of
computing our own.

We remove nsDisplayClip and everything that depends on it.

We remove ExplodeAnonymousChildLists. With nsDisplayClip gone, and
nsDisplayOptionEventGrabber removed in a previous patch, there are no
anonymous child lists.

nsDisplayItem::TryMerge implementations need to make sure they have the same
clip before being merged.

I ripped out the part of PruneDisplayListForExtraPage that adjusts clip rects.
As far as I can tell, it isn't actually necessary.
This commit is contained in:
Robert O'Callahan
2013-03-04 22:56:02 +13:00
parent f9819ba6db
commit 29d310bf8a
22 changed files with 581 additions and 989 deletions

View File

@@ -290,15 +290,14 @@ nsHTMLCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
nsDisplayList replacedContent;
DisplayListClipState::AutoClipContainingBlockDescendantsToContentBox
clip(aBuilder, this, DisplayListClipState::ASSUME_DRAWING_RESTRICTED_TO_CONTENT_RECT);
replacedContent.AppendNewToTop(
aLists.Content()->AppendNewToTop(
new (aBuilder) nsDisplayCanvas(aBuilder, this));
DisplaySelectionOverlay(aBuilder, &replacedContent,
DisplaySelectionOverlay(aBuilder, aLists.Content(),
nsISelectionDisplay::DISPLAY_IMAGES);
WrapReplacedContentForBorderRadius(aBuilder, &replacedContent, aLists);
}
nsIAtom*