mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Backed out changeset cbc8ceae73a2 (bug 576927) for test_value_cloning.html bustage CLOSED TREE
--HG-- extra : commitid : KD1fFkxta16
This commit is contained in:
parent
31d3e04fd9
commit
e4aa9d36de
@ -529,7 +529,6 @@ public:
|
||||
|
||||
float TextZoom() { return mTextZoom; }
|
||||
void SetTextZoom(float aZoom) {
|
||||
MOZ_ASSERT(aZoom > 0.0f, "invalid zoom factor");
|
||||
if (aZoom == mTextZoom)
|
||||
return;
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user