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; }
|
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;
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user