mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 03:49:37 +00:00
Bug 1582528. Restrict visual and dirty rect when building the display list for svg contents that cannot overflow. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D46555 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
6c211da0ae
commit
239c12b7f0
@ -764,13 +764,21 @@ void nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
nsRect visibleRect = aBuilder->GetVisibleRect();
|
||||
nsRect dirtyRect = aBuilder->GetDirtyRect();
|
||||
|
||||
// Per-spec, we always clip root-<svg> even when 'overflow' has its initial
|
||||
// value of 'visible'. See also the "visual overflow" comments in Reflow.
|
||||
DisplayListClipState::AutoSaveRestore autoSR(aBuilder);
|
||||
if (mIsRootContent || StyleDisplay()->IsScrollableOverflow()) {
|
||||
autoSR.ClipContainingBlockDescendantsToContentBox(aBuilder, this);
|
||||
visibleRect = visibleRect.Intersect(GetContentRectRelativeToSelf());
|
||||
dirtyRect = dirtyRect.Intersect(GetContentRectRelativeToSelf());
|
||||
}
|
||||
|
||||
nsDisplayListBuilder::AutoBuildingDisplayList building(
|
||||
aBuilder, this, visibleRect, dirtyRect);
|
||||
|
||||
if ((aBuilder->IsForEventDelivery() &&
|
||||
NS_SVGDisplayListHitTestingEnabled()) ||
|
||||
(!aBuilder->IsForEventDelivery() && NS_SVGDisplayListPaintingEnabled())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user