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
--- a/gfx/src/nsCoord.h
+++ b/gfx/src/nsCoord.h
@@ -41,17 +41,17 @@ inline bool NS_IEEEIsNan(float aF) {
(pun.mBits & 0x007FFFFF) != 0;
}
#ifdef NS_COORD_IS_FLOAT
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)
inline void VERIFY_COORD(nscoord aCoord) {
#ifdef NS_COORD_IS_FLOAT
NS_ASSERTION(floorf(aCoord) == aCoord,
"Coords cannot have fractions");
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -36,17 +36,17 @@ load 243519-1.html
load 244490-1.html
load 254367-1.html
load 263359-1.html
load 265027-1.html
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
load 266445-1.html
asserts(2) load 266445-2.html
load 268157-1.html
load 269566-1.html
load 272647-1.html
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -136,17 +136,17 @@ load 387058-1.html
load 387058-2.html
load 387088-1.html
load 387209-1.html
load 387213-1.html
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
load 389635-1.html
load 390050-1.html
load 390050-2.html
load 390050-3.html
load 390762-1.html
@@ -394,18 +394,18 @@ load 533379-1.html
load 533379-2.html
load 534082-1.html
load 534366-1.html
load 534366-2.html
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
load 547843-1.xhtml
load 551635-1.html
load 553504-1.xhtml
load 564368-1.xhtml
load 564968.xhtml
@@ -553,17 +553,17 @@ load 885009-1.html
load 893496-1.html
load 893523.html
asserts(0-3) load 898871.html # bug 479160 - mostly OSX, sometimes Windows
asserts(0-3) load 914501.html # bug 1144852 - all platforms
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
asserts-if(Android,0-1) load 964078.html # bug 989718
load 970710.html
load 973701-1.xhtml
load 973701-2.xhtml
load 986899.html
@@ -626,17 +626,17 @@ load outline-on-frameset.xhtml
load summary-position-out-of-flow.html
load text-overflow-bug666751-1.html
load text-overflow-bug666751-2.html
load text-overflow-bug670564.xhtml
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-if(Android,2-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
asserts(2) load 1272983-2.html # bug 586628
load 1275059.html
load 1278007.html
load 1278080.html
load 1279814.html
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -100,17 +100,17 @@ load 515288-1.html
load 522394-1.svg
load 522394-2.svg
load 522394-3.svg
load 566216-1.svg
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
load 612662-2.svg
load 612736-1.svg
load 612736-2.svg
load 614367-1.svg
load 620034-1.html
--- a/layout/xul/crashtests/crashtests.list
+++ b/layout/xul/crashtests/crashtests.list
@@ -72,17 +72,17 @@ load 432058-1.xul
load 432068-1.xul
load 432068-2.xul
load 433296-1.xul
load 433429.xul
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
load 470272.html
load 472189.xul
load 475133.html
load 488210-1.xhtml
load 495728-1.xul