From 963794deaaf203d9c379104f4afed50db7b91204 Mon Sep 17 00:00:00 2001 From: Dorel Luca Date: Mon, 21 Dec 2020 05:00:07 +0200 Subject: [PATCH] Backed out changeset e514b3f35198 (bug 1682929) for crashtest failures in layout/generic/crashtests/553504-1.xhtml --- layout/base/nsLayoutUtils.cpp | 20 ++++++++++---------- layout/generic/crashtests/1682929.html | 12 ------------ layout/generic/crashtests/crashtests.list | 1 - 3 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 layout/generic/crashtests/1682929.html diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 05f03482b39b..62235562d8bf 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1100,7 +1100,7 @@ int32_t nsLayoutUtils::DoCompareTreePosition( // TODO: remove the uglyness, see bug 598468. NS_ASSERTION(gPreventAssertInCompareTreePosition || parent, "no common ancestor at all???"); -#endif // DEBUG +#endif // DEBUG if (!parent) { // different documents?? return 0; } @@ -4572,21 +4572,21 @@ static nscoord AddIntrinsicSizeOffset( nscoord coordOutsideSize = 0; if (!(aFlags & nsLayoutUtils::IGNORE_PADDING)) { - coordOutsideSize = NSCoordSaturatingAdd(coordOutsideSize, aOffsets.padding); + coordOutsideSize += aOffsets.padding; } - coordOutsideSize = NSCoordSaturatingAdd(coordOutsideSize, aOffsets.border); + coordOutsideSize += aOffsets.border; if (aBoxSizing == StyleBoxSizing::Border) { - min = NSCoordSaturatingAdd(min, coordOutsideSize); + min += coordOutsideSize; result = NSCoordSaturatingAdd(result, coordOutsideSize); coordOutsideSize = 0; } - coordOutsideSize = NSCoordSaturatingAdd(coordOutsideSize, aOffsets.margin); + coordOutsideSize += aOffsets.margin; - min = NSCoordSaturatingAdd(min, coordOutsideSize); + min += coordOutsideSize; result = NSCoordSaturatingAdd(result, coordOutsideSize); nscoord size; @@ -4597,13 +4597,13 @@ static nscoord AddIntrinsicSizeOffset( } else if (GetAbsoluteCoord(aStyleSize, size) || GetIntrinsicCoord(aStyleSize, aRenderingContext, aFrame, PROP_WIDTH, size)) { - result = NSCoordSaturatingAdd(size, coordOutsideSize); + result = size + coordOutsideSize; } nscoord maxSize = aFixedMaxSize ? *aFixedMaxSize : 0; if (aFixedMaxSize || GetIntrinsicCoord(aStyleMaxSize, aRenderingContext, aFrame, PROP_MAX_WIDTH, maxSize)) { - maxSize = NSCoordSaturatingAdd(maxSize, coordOutsideSize); + maxSize += coordOutsideSize; if (result > maxSize) { result = maxSize; } @@ -4612,7 +4612,7 @@ static nscoord AddIntrinsicSizeOffset( nscoord minSize = aFixedMinSize ? *aFixedMinSize : 0; if (aFixedMinSize || GetIntrinsicCoord(aStyleMinSize, aRenderingContext, aFrame, PROP_MIN_WIDTH, minSize)) { - minSize = NSCoordSaturatingAdd(minSize, coordOutsideSize); + minSize += coordOutsideSize; if (result < minSize) { result = minSize; } @@ -4632,7 +4632,7 @@ static nscoord AddIntrinsicSizeOffset( nscoord themeSize = pc->DevPixelsToAppUnits( aAxis == eAxisVertical ? devSize.height : devSize.width); // GetMinimumWidgetSize() returns a border-box width. - themeSize = NSCoordSaturatingAdd(themeSize, aOffsets.margin); + themeSize += aOffsets.margin; if (themeSize > result || !canOverride) { result = themeSize; } diff --git a/layout/generic/crashtests/1682929.html b/layout/generic/crashtests/1682929.html deleted file mode 100644 index 118fe52b0877..000000000000 --- a/layout/generic/crashtests/1682929.html +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index b9ae108263e4..a18a380d6336 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -790,4 +790,3 @@ load 1666592.html load 1670336.html HTTP load 1677518-1.html load 1680406.html -asserts(4-4) load 1682929.html # Huge sizes