mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877957 - Don't use the context scale when determining the font size scale factor for non-display SVG text. r=longsonr
This commit is contained in:
parent
451cdd58c6
commit
d30b090356
@ -5058,16 +5058,6 @@ nsSVGTextFrame2::UpdateFontSizeScaleFactor()
|
||||
return mFontSizeScaleFactor != oldFontSizeScaleFactor;
|
||||
}
|
||||
|
||||
gfxMatrix m;
|
||||
if (!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD) ||
|
||||
mGetCanvasTMForFlag != FOR_OUTERSVG_TM) {
|
||||
m = GetCanvasTM(mGetCanvasTMForFlag);
|
||||
if (m.IsSingular()) {
|
||||
mFontSizeScaleFactor = 1.0;
|
||||
return mFontSizeScaleFactor != oldFontSizeScaleFactor;
|
||||
}
|
||||
}
|
||||
|
||||
double minSize = presContext->AppUnitsToFloatCSSPixels(min);
|
||||
|
||||
if (geometricPrecision) {
|
||||
@ -5076,11 +5066,22 @@ nsSVGTextFrame2::UpdateFontSizeScaleFactor()
|
||||
return mFontSizeScaleFactor != oldFontSizeScaleFactor;
|
||||
}
|
||||
|
||||
double maxSize = presContext->AppUnitsToFloatCSSPixels(max);
|
||||
|
||||
double contextScale = GetContextScale(m);
|
||||
// When we are non-display, we could be painted in different coordinate
|
||||
// spaces, and we don't want to have to reflow for each of these. We
|
||||
// just assume that the context scale is 1.0 for them all, so we don't
|
||||
// get stuck with a font size scale factor based on whichever referencing
|
||||
// frame happens to reflow first.
|
||||
double contextScale = 1.0;
|
||||
if (!(mState & NS_STATE_SVG_NONDISPLAY_CHILD)) {
|
||||
gfxMatrix m(GetCanvasTM(mGetCanvasTMForFlag));
|
||||
if (!m.IsSingular()) {
|
||||
contextScale = GetContextScale(m);
|
||||
}
|
||||
}
|
||||
mLastContextScale = contextScale;
|
||||
|
||||
double maxSize = presContext->AppUnitsToFloatCSSPixels(max);
|
||||
|
||||
// But we want to ignore any scaling required due to HiDPI displays, since
|
||||
// regular CSS text frames will still create text runs using the font size
|
||||
// in CSS pixels, and we want SVG text to have the same rendering as HTML
|
||||
|
Loading…
Reference in New Issue
Block a user