зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1915051 - Add an assertion to ensure hit testing and rendering are not out of sync. r=hiro,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D220201
This commit is contained in:
Родитель
a1ca766a0a
Коммит
16bc52cd2d
|
@ -847,6 +847,17 @@ void nsDisplayListBuilder::UpdateShouldBuildAsyncZoomContainer() {
|
|||
mBuildAsyncZoomContainer = !mIsRelativeToLayoutViewport &&
|
||||
!document->Fullscreen() &&
|
||||
nsLayoutUtils::AllowZoomingForDocument(document);
|
||||
|
||||
// If mIsRelativeToLayoutViewport == false, hit-testing on this
|
||||
// display list will take into account the pres shell resolution.
|
||||
// If we're not building an async zoom container (meaning, the
|
||||
// resolution will not take effect visually), the resolution better
|
||||
// be 1.0, otherwise rendering and hit-testing are out of sync.
|
||||
#ifdef DEBUG
|
||||
if (!mIsRelativeToLayoutViewport && !mBuildAsyncZoomContainer) {
|
||||
MOZ_ASSERT(document->GetPresShell()->GetResolution() == 1.0f);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Certain prefs may cause display list items to be added or removed when they
|
||||
|
|
Загрузка…
Ссылка в новой задаче