зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383492: stylo: Change nscoord_MAX to 1<<30 - 1 ; r=emilio,dbaron
nscoord_MAX is (1<<30) so that we can check for overflow *after* adding two nscoords. However, (nscoord_MAX + nscoord_MAX) will still overflow. Subtracting one makes this no longer possible. MozReview-Commit-ID: BtbQRMp5kWm
This commit is contained in:
Родитель
9fd9221a68
Коммит
e632c1393e
|
@ -46,7 +46,7 @@ typedef float nscoord;
|
|||
#define nscoord_MAX NS_IEEEPositiveInfinity()
|
||||
#else
|
||||
typedef int32_t nscoord;
|
||||
#define nscoord_MAX nscoord(1 << 30)
|
||||
#define nscoord_MAX nscoord((1 << 30) - 1)
|
||||
#endif
|
||||
|
||||
#define nscoord_MIN (-nscoord_MAX)
|
||||
|
@ -132,8 +132,8 @@ inline nscoord _nscoordSaturatingMultiply(nscoord aCoord, float aScale,
|
|||
#else
|
||||
float product = aCoord * aScale;
|
||||
if (requireNotNegative ? aCoord > 0 : (aCoord > 0) == (aScale > 0))
|
||||
return NSToCoordRoundWithClamp(std::min<float>(nscoord_MAX, product));
|
||||
return NSToCoordRoundWithClamp(std::max<float>(nscoord_MIN, product));
|
||||
return NSToCoordRoundWithClamp(std::min<float>((float)nscoord_MAX, product));
|
||||
return NSToCoordRoundWithClamp(std::max<float>((float)nscoord_MIN, product));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ load 265736-1.html
|
|||
load 265736-2.html
|
||||
load 265899-1.html
|
||||
load 265973-1.html
|
||||
asserts(6-12) load 265986-1.html # Bug 512405
|
||||
asserts-if(!stylo,6-12) load 265986-1.html # Bug 512405 , bug 718883
|
||||
load 265999-1.html
|
||||
load 266222-1.html
|
||||
asserts(1-7) load 266360-1.html # bug 576358
|
||||
|
|
|
@ -2444,7 +2444,7 @@ static void ConstrainToCoordValues(float& aStart, float& aSize)
|
|||
float excess = aSize - nscoord_MAX;
|
||||
excess /= 2;
|
||||
aStart += excess;
|
||||
aSize = nscoord_MAX;
|
||||
aSize = (float)nscoord_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ load 387215-1.xhtml
|
|||
load 387219-1.xhtml
|
||||
load 387233-1.html
|
||||
load 387233-2.html
|
||||
load 387282-1.html
|
||||
asserts-if(stylo,2) load 387282-1.html
|
||||
load 388175-1.html
|
||||
load 388367-1.html
|
||||
load 388709-1.html
|
||||
|
@ -399,8 +399,8 @@ load 536692-1.xhtml
|
|||
load 537645.xhtml
|
||||
load 541277-1.html
|
||||
load 541277-2.html
|
||||
load 541714-1.html
|
||||
load 541714-2.html
|
||||
asserts-if(stylo,2) load 541714-1.html # bug 634161
|
||||
asserts-if(stylo,3) load 541714-2.html # bug 634161
|
||||
load 542136-1.html
|
||||
load 545571-1.html
|
||||
load 547338.xul
|
||||
|
@ -558,7 +558,7 @@ load 914891.html
|
|||
load 915475.xhtml
|
||||
load 927558.html
|
||||
load 943509-1.html
|
||||
asserts(2-8) load 944909-1.html
|
||||
asserts-if(stylo,2-8) load 944909-1.html
|
||||
load 946167-1.html
|
||||
load 947158.html
|
||||
load 949932.html
|
||||
|
@ -631,7 +631,7 @@ load text-overflow-bug671796.xhtml
|
|||
load text-overflow-bug713610.html
|
||||
load text-overflow-form-elements.html
|
||||
load text-overflow-iframe.html
|
||||
asserts-if(Android,2-4) asserts-if(!Android,4) load 1225005.html # bug 682647 and bug 448083
|
||||
asserts(1-4) load 1225005.html # bug 682647 and bug 448083
|
||||
load 1233191.html
|
||||
asserts-if(stylo,0-15) load 1271765.html # bug 1324684
|
||||
asserts(2) load 1272983-1.html # bug 586628
|
||||
|
|
|
@ -105,7 +105,7 @@ load 587336-1.html
|
|||
load 590291-1.svg
|
||||
load 601999-1.html
|
||||
load 605626-1.svg
|
||||
asserts(2) load 606914.xhtml # bug 606914
|
||||
asserts-if(!stylo,2) load 606914.xhtml # bug 606914, bug 718883
|
||||
load 610594-1.html
|
||||
load 610954-1.html
|
||||
load 612662-1.svg
|
||||
|
|
|
@ -77,7 +77,7 @@ load 434458-1.xul
|
|||
load 452185.html
|
||||
load 460900-1.xul
|
||||
load 464149-1.xul
|
||||
asserts-if(winWidget,1) asserts-if(Android,0-1) load 464407-1.xhtml # Bug 450974 on win, Bug 1267054 on Android
|
||||
asserts-if(winWidget,1) asserts-if(Android,0-1) asserts-if(stylo,0-1) load 464407-1.xhtml # Bug 450974 on win, Bug 1267054 on Android, bug 718883 for stylo
|
||||
load 467080.xul
|
||||
load 467481-1.xul
|
||||
load 470063-1.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче