зеркало из https://github.com/mozilla/pjs.git
Bug 513502 - Don't allow fractional sizes for the length of the scrollbar thumb. r=roc
--HG-- extra : rebase_source : 5f297336e5acd0ffedea5944745db92f28770840
This commit is contained in:
Родитель
58e696ea10
Коммит
4c8ab6a1c7
|
@ -416,6 +416,11 @@ nsSliderFrame::DoLayout(nsBoxLayoutState& aState)
|
|||
thumbLength = PR_MAX(thumbLength, NSToCoordRound(availableLength * ratio));
|
||||
}
|
||||
|
||||
// Round the thumb's length to device pixels.
|
||||
nsPresContext* presContext = PresContext();
|
||||
thumbLength = presContext->DevPixelsToAppUnits(
|
||||
presContext->AppUnitsToDevPixels(thumbLength));
|
||||
|
||||
// mRatio translates the thumb position in app units to the value.
|
||||
mRatio = (minPos != maxPos) ? float(availableLength - thumbLength) / float(maxPos - minPos) : 1;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче