mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 473847, progressmeters with large max don't work properly, caused by multiplication overflow, r+sr=dbaron
This commit is contained in:
parent
9157343457
commit
cbee03cb58
8
layout/reftests/bugs/473847-1-ref.xul
Normal file
8
layout/reftests/bugs/473847-1-ref.xul
Normal file
@ -0,0 +1,8 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<hbox height="40">
|
||||
<spacer flex="6000" style="background-color: red;"/>
|
||||
<spacer style="background-color: blue;"/>
|
||||
</hbox>
|
||||
|
||||
</window>
|
8
layout/reftests/bugs/473847-1.xul
Normal file
8
layout/reftests/bugs/473847-1.xul
Normal file
@ -0,0 +1,8 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<hbox height="40">
|
||||
<spacer flex="60000" style="background-color: red;"/>
|
||||
<spacer style="background-color: blue;"/>
|
||||
</hbox>
|
||||
|
||||
</window>
|
@ -1021,6 +1021,7 @@ fails == 461512-1.html 461512-1-ref.html # Bug 461512
|
||||
== 471356-1.html 471356-1-ref.html
|
||||
== 471594-1.xhtml 471594-1-ref.html
|
||||
== 472500-1.xul 472500-1-ref.xul
|
||||
== 473847-1.xul 473847-1-ref.xul
|
||||
== 474336-1.xul 474336-1-ref.xul
|
||||
== 474417-1.html 474417-1-ref.html
|
||||
== 474472-1.html 474472-1-ref.html
|
||||
|
@ -1255,7 +1255,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox,
|
||||
|
||||
// ----- look at our min and max limits make sure we aren't too small or too big -----
|
||||
if (!computedBoxSizes->valid) {
|
||||
PRInt32 newSize = pref + sizeRemaining*flex/spacerConstantsRemaining; //NSToCoordRound(float((sizeRemaining*flex)/spacerConstantsRemaining));
|
||||
PRInt32 newSize = pref + PRInt32(PRInt64(sizeRemaining) * flex / spacerConstantsRemaining);
|
||||
|
||||
if (newSize<=min) {
|
||||
computedBoxSizes->size = min;
|
||||
@ -1297,7 +1297,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox,
|
||||
flex = boxSizes->flex;
|
||||
|
||||
if (!computedBoxSizes->valid) {
|
||||
computedBoxSizes->size = pref + flex*sizeRemaining/spacerConstantsRemaining; //NSToCoordFloor(float((flex*sizeRemaining)/spacerConstantsRemaining));
|
||||
computedBoxSizes->size = pref + PRInt32(PRInt64(sizeRemaining) * flex / spacerConstantsRemaining);
|
||||
computedBoxSizes->valid = PR_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user