-
dbarton@mathscribe.com authored
https://bugs.webkit.org/show_bug.cgi?id=99921 Reviewed by Eric Seidel. Source/WebCore: For parts of stretched parentheses and brackets, mathml.css currently uses the Symbol font, which on linux and Windows has greek letters at roman code points. To fix this, we switch to the STIXSizeOneSym font when available. However, this can cause vertical gaps between glyph parts, because of hard-coded constants in RenderMathMLOperator.cpp. We eliminate all these constants. We also shift glyphs upward by 1px and truncate them to avoid the gaps. Tested by existing tests, and one test added to LayoutTests/mathml/presentation/mo.xhtml. * css/mathml.css: (math, mfenced > *): - Set font-family for mn, mi, etc. (mo, mfenced): - Set font-family for mo and anonymous operators, including extension glyphs for stretched operators like parentheses and brackets. (math): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore): - Change 0x23d0 to 0x23aa for STIX & Cambria Math fonts. (WebCore::RenderMathMLOperator::glyphHeightForCharacter): (WebCore::RenderMathMLOperator::updateFromElement): (WebCore::RenderMathMLOperator::createStackableStyle): - Eliminate unused lineHeight and topRelative parameters, and the hard-coded font size of 14. (WebCore::RenderMathMLOperator::createGlyph): - Eliminate unused lineHeight and topRelative parameters. * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): Tools: Enable the STIXSizeOneSym font for testing. * DumpRenderTree/mac/DumpRenderTree.mm: (allowedFontFamilySet): * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm: (WTR::allowedFontFamilySet): LayoutTests: * mathml/presentation/mo.xhtml: * platform/chromium/TestExpectations: * platform/chromium/mathml/presentation/attributes-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/attributes-expected.txt: * platform/chromium/mathml/presentation/fenced-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/fenced-expected.txt: * platform/chromium/mathml/presentation/fenced-mi-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/fenced-mi-expected.txt: * platform/chromium/mathml/presentation/fractions-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/fractions-expected.txt: * platform/chromium/mathml/presentation/fractions-vertical-alignment-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/fractions-vertical-alignment-expected.txt: * platform/chromium/mathml/presentation/mo-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/mo-expected.txt: * platform/chromium/mathml/presentation/mo-stretch-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/mo-stretch-expected.txt: * platform/chromium/mathml/presentation/mroot-pref-width-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/mroot-pref-width-expected.txt: * platform/chromium/mathml/presentation/over-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/over-expected.txt: * platform/chromium/mathml/presentation/roots-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/roots-expected.txt: * platform/chromium/mathml/presentation/row-alignment-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/row-alignment-expected.txt: * platform/chromium/mathml/presentation/row-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/row-expected.txt: * platform/chromium/mathml/presentation/style-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/style-expected.txt: * platform/chromium/mathml/presentation/sub-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/sub-expected.txt: * platform/chromium/mathml/presentation/subsup-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/subsup-expected.txt: * platform/chromium/mathml/presentation/sup-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/sup-expected.txt: * platform/chromium/mathml/presentation/tables-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/tables-expected.txt: * platform/chromium/mathml/presentation/tokenElements-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/tokenElements-expected.txt: * platform/chromium/mathml/presentation/under-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/under-expected.txt: * platform/chromium/mathml/presentation/underover-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/presentation/underover-expected.txt: * platform/chromium/mathml/xHeight-expected.png: Modified property svn:mime-type. * platform/chromium/mathml/xHeight-expected.txt: * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f93c3a9d