mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 576435 - Use the clamping variant of NSToCoordRound to avoid rounding nscoord_MAX. r=roc
This commit is contained in:
parent
4798898a62
commit
e390b7e97c
@ -19,7 +19,7 @@ load 399289-1.svg
|
||||
load 404470-1.html
|
||||
load 411603-1.html
|
||||
load 412588-1.html
|
||||
asserts-if(winWidget,2) load 413274-1.xhtml # Bug 576435
|
||||
load 413274-1.xhtml
|
||||
load 416461-1.xul
|
||||
load 418007-1.xhtml
|
||||
load 431705-1.xul
|
||||
|
@ -2742,12 +2742,10 @@ ComputeScriptLevelSize(const nsStyleFont* aFont, const nsStyleFont* aParentFont,
|
||||
// Compute the size we would have had if minscriptsize had never been
|
||||
// applied, also prevent overflow (bug 413274)
|
||||
*aUnconstrainedSize =
|
||||
NSToCoordRound(std::min(aParentFont->mScriptUnconstrainedSize*scriptLevelScale,
|
||||
double(nscoord_MAX)));
|
||||
NSToCoordRoundWithClamp(aParentFont->mScriptUnconstrainedSize*scriptLevelScale);
|
||||
// Compute the size we could get via scriptlevel change
|
||||
nscoord scriptLevelSize =
|
||||
NSToCoordRound(std::min(aParentFont->mSize*scriptLevelScale,
|
||||
double(nscoord_MAX)));
|
||||
NSToCoordRoundWithClamp(aParentFont->mSize*scriptLevelScale);
|
||||
if (scriptLevelScale <= 1.0) {
|
||||
if (aParentFont->mSize <= minScriptSize) {
|
||||
// We can't decrease the font size at all, so just stick to no change
|
||||
|
Loading…
x
Reference in New Issue
Block a user