Bug 1799425. Only set checkboard flag when adding background color item for root content document. r=emilio

Webrender uses this flag as a hint to separate mix blend containers so it should only be present on the root content document.

Differential Revision: https://phabricator.services.mozilla.com/D162046
This commit is contained in:
Timothy Nikkel
2022-11-15 23:03:49 +00:00
parent f986221d71
commit 4b581eb3a3
5 changed files with 50 additions and 4 deletions

View File

@@ -5428,7 +5428,8 @@ void PresShell::AddCanvasBackgroundColorItem(
if (!addedScrollingBackgroundColor || forceUnscrolledItem) {
nsDisplaySolidColor* item = MakeDisplayItem<nsDisplaySolidColor>(
aBuilder, aFrame, aBounds, bgcolor);
if (addedScrollingBackgroundColor) {
if (addedScrollingBackgroundColor &&
mPresContext->IsRootContentDocumentCrossProcess()) {
item->SetIsCheckerboardBackground();
}
AddDisplayItemToBottom(aBuilder, aList, item);