Backed out changeset cb73c395a78d (bug 1135907) for crashtest failures due to assertions

This commit is contained in:
Carsten "Tomcat" Book 2015-03-19 10:40:42 +01:00
parent 00577fff19
commit f21fb58a72

View File

@ -848,10 +848,7 @@ GetMaxDisplayPortSize(nsIContent* aContent)
}
nsPresContext* presContext = frame->PresContext();
int32_t maxSizeInDevPixels = lm->GetMaxTextureSize();
if (maxSizeInDevPixels < 0) {
return nscoord_MAX;
}
uint32_t maxSizeInDevPixels = lm->GetMaxTextureSize();
return presContext->DevPixelsToAppUnits(maxSizeInDevPixels);
}
@ -1056,9 +1053,11 @@ GetDisplayPortImpl(nsIContent* aContent, nsRect *aResult, float aMultiplier)
if (!gfxPrefs::LayersTilesEnabled()) {
// Either we should have gotten a valid rect directly from the displayport
// base, or we should have computed a valid rect from the margins.
NS_ASSERTION(result.width <= GetMaxDisplayPortSize(aContent),
NS_ASSERTION(GetMaxDisplayPortSize(aContent) <= 0 ||
result.width < GetMaxDisplayPortSize(aContent),
"Displayport must be a valid texture size");
NS_ASSERTION(result.height <= GetMaxDisplayPortSize(aContent),
NS_ASSERTION(GetMaxDisplayPortSize(aContent) <= 0 ||
result.height < GetMaxDisplayPortSize(aContent),
"Displayport must be a valid texture size");
}