Bug 1568772. Fix "Multiple glass backgrounds found?" warning. r=mattwoodrow

If we re-use the old item we hit the warning because we try to set the very same item as the glass item, but that is fine.

Differential Revision: https://phabricator.services.mozilla.com/D39308

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Timothy Nikkel 2019-07-25 16:42:46 +00:00
Родитель 12c9a1ee6c
Коммит d32f73219a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -474,7 +474,9 @@ class MergeState {
} // aNewItem can't be the glass item on the builder yet.
if (destItem->IsGlassItem()) {
mBuilder->Builder()->SetGlassDisplayItem(destItem);
if (destItem != oldItem || destItem != mBuilder->Builder()->GetGlassDisplayItem()) {
mBuilder->Builder()->SetGlassDisplayItem(destItem);
}
}
MergeChildLists(aNewItem, oldItem, destItem);