Skip to content

Commit

Permalink
Backed out changeset cbc8ceae73a2 (bug 576927) for test_value_cloning…
Browse files Browse the repository at this point in the history
….html bustage CLOSED TREE

--HG--
extra : commitid : KD1fFkxta16
  • Loading branch information
KWierso committed Nov 16, 2015
1 parent 31d3e04 commit e4aa9d3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion layout/base/nsPresContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ class nsPresContext : public nsIObserver {

float TextZoom() { return mTextZoom; }
void SetTextZoom(float aZoom) {
MOZ_ASSERT(aZoom > 0.0f, "invalid zoom factor");
if (aZoom == mTextZoom)
return;

Expand Down
7 changes: 2 additions & 5 deletions layout/style/nsStyleStruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,13 @@ nsChangeHint nsStyleFont::CalcDifference(const nsStyleFont& aOther) const
/* static */ nscoord
nsStyleFont::ZoomText(nsPresContext *aPresContext, nscoord aSize)
{
MOZ_ASSERT(aSize >= 0, "negative font size");
return NSCoordSaturatingNonnegativeMultiply(aSize, aPresContext->TextZoom());
return nscoord(float(aSize) * aPresContext->TextZoom());
}

/* static */ nscoord
nsStyleFont::UnZoomText(nsPresContext *aPresContext, nscoord aSize)
{
MOZ_ASSERT(aSize >= 0, "negative font size");
return NSCoordSaturatingNonnegativeMultiply(aSize,
1.0 / aPresContext->TextZoom());
return nscoord(float(aSize) / aPresContext->TextZoom());
}

/* static */ already_AddRefed<nsIAtom>
Expand Down
2 changes: 0 additions & 2 deletions layout/style/nsStyleStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ struct nsStyleFont {
}
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);
// aSize must be non-negative; the result is clamped to 0 .. nscoord_MAX
static nscoord UnZoomText(nsPresContext* aPresContext, nscoord aSize);
static already_AddRefed<nsIAtom> GetLanguage(nsPresContext* aPresContext);

Expand Down

0 comments on commit e4aa9d3

Please sign in to comment.