Backed out changeset 9545a05173c4 (bug 1769269) for causing multiple failures widget related. CLOSED TREE

This commit is contained in:
Iulian Moraru 2022-05-13 21:25:04 +03:00
Родитель bdd514047e
Коммит b0d5d7d487
1 изменённых файлов: 3 добавлений и 9 удалений

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

@ -162,17 +162,11 @@ static ThumbRect GetThumbRect(const LayoutDeviceRect& aRect,
}
thickness *= aScale;
// Compute the thumb rect.
const float outerSpacing =
((aParams.isOverlay || aParams.isSmall) ? 1.0f : 2.0f) * aScale;
LayoutDeviceRect thumbRect = aRect;
thumbRect.Deflate(1.0f * aScale);
// Compute the thumb rect. The thumb rect is centered in non-overlay mode,
// and spaced in overlay mode.
const float outerSpacing = [&] {
if (aParams.isOverlay) {
return 1.0f * aScale;
}
float size = aParams.isHorizontal ? thumbRect.Height() : thumbRect.Width();
return (size - thickness) / 2.0f;
}();
if (aParams.isHorizontal) {
float bottomEdge = thumbRect.YMost() - outerSpacing;
thumbRect.SetBoxY(bottomEdge - thickness, bottomEdge);