Backed out changeset cbc8ceae73a2 (bug 576927) for test_value_cloning.html bustage CLOSED TREE

--HG--
extra : commitid : KD1fFkxta16
This commit is contained in:
Wes Kocher 2015-11-16 11:00:32 -08:00
parent 31d3e04fd9
commit e4aa9d36de
3 changed files with 2 additions and 8 deletions

View File

@ -529,7 +529,6 @@ public:
float TextZoom() { return mTextZoom; } float TextZoom() { return mTextZoom; }
void SetTextZoom(float aZoom) { void SetTextZoom(float aZoom) {
MOZ_ASSERT(aZoom > 0.0f, "invalid zoom factor");
if (aZoom == mTextZoom) if (aZoom == mTextZoom)
return; return;

View File

@ -200,16 +200,13 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aOther) const
/* static */ nscoord /* static */ nscoord
nsStyleFont::ZoomText(nsPresContext *aPresContext, nscoord aSize) nsStyleFont::ZoomText(nsPresContext *aPresContext, nscoord aSize)
{ {
MOZ_ASSERT(aSize >= 0, "negative font size"); return nscoord(float(aSize) * aPresContext->TextZoom());
return NSCoordSaturatingNonnegativeMultiply(aSize, aPresContext->TextZoom());
} }
/* static */ nscoord /* static */ nscoord
nsStyleFont::UnZoomText(nsPresContext *aPresContext, nscoord aSize) nsStyleFont::UnZoomText(nsPresContext *aPresContext, nscoord aSize)
{ {
MOZ_ASSERT(aSize >= 0, "negative font size"); return nscoord(float(aSize) / aPresContext->TextZoom());
return NSCoordSaturatingNonnegativeMultiply(aSize,
1.0 / aPresContext->TextZoom());
} }
/* static */ already_AddRefed<nsIAtom> /* static */ already_AddRefed<nsIAtom>

View File

@ -119,9 +119,7 @@ struct nsStyleFont {
} }
static nsChangeHint CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2); static nsChangeHint CalcFontDifference(const nsFont& aFont1, const nsFont& aFont2);
// aSize must be non-negative; the result is clamped to 0 .. nscoord_MAX
static nscoord ZoomText(nsPresContext* aPresContext, nscoord aSize); static nscoord ZoomText(nsPresContext* aPresContext, nscoord aSize);
// aSize must be non-negative; the result is clamped to 0 .. nscoord_MAX
static nscoord UnZoomText(nsPresContext* aPresContext, nscoord aSize); static nscoord UnZoomText(nsPresContext* aPresContext, nscoord aSize);
static already_AddRefed<nsIAtom> GetLanguage(nsPresContext* aPresContext); static already_AddRefed<nsIAtom> GetLanguage(nsPresContext* aPresContext);