mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 11:58:55 +00:00
Bug 1743533. Handle the visible rect of oop iframes that span multiple pages in print documents. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D132789
This commit is contained in:
parent
53092b50ed
commit
57a0ff75ad
@ -742,6 +742,28 @@ void nsDisplayListBuilder::BeginFrame() {
|
||||
}
|
||||
}
|
||||
|
||||
void nsDisplayListBuilder::AddEffectUpdate(dom::RemoteBrowser* aBrowser,
|
||||
const dom::EffectsInfo& aUpdate) {
|
||||
dom::EffectsInfo update = aUpdate;
|
||||
// For printing we create one display item for each page that an iframe
|
||||
// appears on, the proper visible rect is the union of all the visible rects
|
||||
// we get from each display item.
|
||||
nsPresContext* pc =
|
||||
mReferenceFrame ? mReferenceFrame->PresContext() : nullptr;
|
||||
if (pc && (pc->Type() != nsPresContext::eContext_Galley)) {
|
||||
Maybe<dom::EffectsInfo> existing = mEffectsUpdates.MaybeGet(aBrowser);
|
||||
if (existing.isSome()) {
|
||||
// Only the visible rect should differ, the scales should match.
|
||||
MOZ_ASSERT(existing->mScaleX == aUpdate.mScaleX &&
|
||||
existing->mScaleY == aUpdate.mScaleY &&
|
||||
existing->mTransformToAncestorScale ==
|
||||
aUpdate.mTransformToAncestorScale);
|
||||
update.mVisibleRect = update.mVisibleRect.Union(existing->mVisibleRect);
|
||||
}
|
||||
}
|
||||
mEffectsUpdates.InsertOrUpdate(aBrowser, update);
|
||||
}
|
||||
|
||||
void nsDisplayListBuilder::EndFrame() {
|
||||
NS_ASSERTION(!mInInvalidSubtree,
|
||||
"Someone forgot to cleanup mInInvalidSubtree!");
|
||||
|
@ -875,9 +875,8 @@ class nsDisplayListBuilder {
|
||||
return mEffectsUpdates;
|
||||
}
|
||||
|
||||
void AddEffectUpdate(dom::RemoteBrowser* aBrowser, dom::EffectsInfo aUpdate) {
|
||||
mEffectsUpdates.InsertOrUpdate(aBrowser, aUpdate);
|
||||
}
|
||||
void AddEffectUpdate(dom::RemoteBrowser* aBrowser,
|
||||
const dom::EffectsInfo& aUpdate);
|
||||
|
||||
/**
|
||||
* Allocate memory in our arena. It will only be freed when this display list
|
||||
|
Loading…
x
Reference in New Issue
Block a user