зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1760184 [Wayland] Apply correction for negative anchor width r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D141433
This commit is contained in:
Родитель
83f95f6c5d
Коммит
02c1890996
|
@ -2255,13 +2255,13 @@ nsWindow::WaylandPopupGetPositionFromLayout() {
|
|||
anchorRectAppUnits.Inflate(popupMargin.mAnchorMargin);
|
||||
LOG(" after margins %s\n", ToString(anchorRectAppUnits).c_str());
|
||||
nscoord auPerDev = popupFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
anchorRect = LayoutDeviceIntRect::FromAppUnitsToNearest(anchorRectAppUnits,
|
||||
auPerDev);
|
||||
if (anchorRect.width < 0) {
|
||||
auto w = -anchorRect.width;
|
||||
anchorRect.width += w + 1;
|
||||
anchorRect.x += w;
|
||||
}
|
||||
anchorRect = LayoutDeviceIntRect::FromAppUnitsToNearest(anchorRectAppUnits,
|
||||
auPerDev);
|
||||
LOG(" final %s\n", ToString(anchorRect).c_str());
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче