Bug 1669982 - Add a log to catch suspicious calls to SetDisplayPortMargins. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D93493
This commit is contained in:
Kartikaya Gupta 2020-10-14 20:26:55 +00:00
Родитель 871634702e
Коммит c1f643dd3c
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -666,6 +666,16 @@ bool DisplayPortUtils::SetDisplayPortMargins(nsIContent* aContent,
return false;
}
if (currentData && currentData->mMargins.mVisualOffset != CSSPoint() &&
aMargins.mVisualOffset == CSSPoint()) {
// If we hit this, then it's possible that we're setting a displayport
// that is wrong because the old one had a layout/visual adjustment and
// the new one does not.
MOZ_LOG(sDisplayportLog, LogLevel::Warning,
("Dropping visual offset %s",
ToString(currentData->mMargins.mVisualOffset).c_str()));
}
nsIFrame* scrollFrame = nsLayoutUtils::GetScrollFrameFromContent(aContent);
nsRect oldDisplayPort;