Bug 914919 - Downgrade BaseRect::Set*Edge assertions to be non-fatal. r=dholbert

This commit is contained in:
Corey Ford 2013-09-11 16:27:14 -07:00
parent 9e97c27fb4
commit 2c345af1a4
3 changed files with 15 additions and 5 deletions

View File

@ -7,8 +7,8 @@
#define MOZILLA_GFX_BASERECT_H_
#include <cmath>
#include <mozilla/Assertions.h>
#include <algorithm>
#include "nsDebug.h"
namespace mozilla {
namespace gfx {
@ -277,21 +277,21 @@ struct BaseRect {
// Moves one edge of the rect without moving the opposite edge.
void SetLeftEdge(T aX) {
MOZ_ASSERT(aX <= XMost());
NS_ASSERTION(aX <= XMost(), "Bad rect edge");
width = XMost() - aX;
x = aX;
}
void SetRightEdge(T aXMost) {
MOZ_ASSERT(aXMost >= x);
NS_ASSERTION(aXMost >= x, "Bad rect edge");
width = aXMost - x;
}
void SetTopEdge(T aY) {
MOZ_ASSERT(aY <= YMost());
NS_ASSERTION(aY <= YMost(), "Bad rect edge");
height = YMost() - aY;
y = aY;
}
void SetBottomEdge(T aYMost) {
MOZ_ASSERT(aYMost >= y);
NS_ASSERTION(aYMost >= y, "Bad rect edge");
height = aYMost - y;
}

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div style="position: sticky; right: 75px; padding-left: 84862313px;"></div>
</body>
</html>

View File

@ -501,3 +501,4 @@ asserts(1-4) test-pref(layout.css.flexbox.enabled,true) load 876074-1.html # bug
load 885009-1.html
load 893523.html
test-pref(layout.css.sticky.enabled,true) load 914891.html
asserts(1) test-pref(layout.css.sticky.enabled,true) load 914919.html