import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1231404 - SubscriptBaselineDropMin or SuperscriptBaselineDropMax are not read from the MATH table. r=jfkthame (4293e32fef)
- Bug 953408 - switch to unprefixed hyphens property in tests. r=jfkthame (2ee7ee6bd4)
- Bug 1207061 - Reftest for buggy bidi font that fails with graphite 1.3.2. r=jdaggett (3d1ae98e9e)
- Bug 1161900 - Basic reftest to check that Balinese two-part vowel characters are shaped properly. r=jdaggett (5bd6653da0)
- Bug 686225 - Reftest for Indic shaping with buggy OS X (AAT) fonts. r=jdaggett (76e81fba3e)
- Bug 1156111 patch 1 - Give layout/reftests/ its own moz.build file. r=gps (8c1b128a6b)
- Bug 1156111 patch 2 - Add BUG_COMPONENT metadata for tests in layout/reftests/. r=gps (c9089a56cf)
This commit is contained in:
2023-10-03 21:59:56 +08:00
parent f830c933ef
commit e9dee823ef
134 changed files with 559 additions and 133 deletions
+17 -4
View File
@@ -203,6 +203,14 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
scriptSpace = nsPresContext::CSSPointsToAppUnits(0.5f);
}
// Try and read sub and sup drops from the MATH table.
if (mathFont) {
subDrop = mathFont->
GetMathConstant(gfxFontEntry::SubscriptBaselineDropMin, oneDevPixel);
supDrop = mathFont->
GetMathConstant(gfxFontEntry::SuperscriptBaselineDropMax, oneDevPixel);
}
// force the scriptSpace to be at least 1 pixel
nscoord onePixel = nsPresContext::CSSPixelsToAppUnits(1);
scriptSpace = std::max(onePixel, scriptSpace);
@@ -390,8 +398,11 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
// subscript
subScriptFrame = childFrame;
GetReflowAndBoundingMetricsFor(subScriptFrame, subScriptSize, bmSubScript);
// get the subdrop from the subscript font
GetSubDropFromChild (subScriptFrame, subDrop, aFontSizeInflation);
if (!mathFont) {
// get the subdrop from the subscript font
GetSubDropFromChild (subScriptFrame, subDrop, aFontSizeInflation);
}
// parameter v, Rule 18a, App. G, TeXbook
minSubScriptShift = bmBase.descent + subDrop;
trySubScriptShift = std::max(minSubScriptShift,subScriptShift);
@@ -431,8 +442,10 @@ nsMathMLmmultiscriptsFrame::PlaceMultiScript(nsPresContext* aPresContext,
// supscript
supScriptFrame = childFrame;
GetReflowAndBoundingMetricsFor(supScriptFrame, supScriptSize, bmSupScript);
// get the supdrop from the supscript font
GetSupDropFromChild (supScriptFrame, supDrop, aFontSizeInflation);
if (!mathFont) {
// get the supdrop from the supscript font
GetSupDropFromChild (supScriptFrame, supDrop, aFontSizeInflation);
}
// parameter u, Rule 18a, App. G, TeXbook
minSupScriptShift = bmBase.ascent - supDrop;
nscoord superscriptBottomMin;