Changeset 199548 in webkit
- Timestamp:
- Apr 14, 2016 11:27:51 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r199547 r199548 1 2016-04-14 Frederic Wang <fred.wang@free.fr> 2 3 RenderMathMLOperator: Add helper function to retrieve italic correction 4 https://bugs.webkit.org/show_bug.cgi?id=156572 5 6 Reviewed by Darin Adler. 7 8 No new tests, the helper function will only be used in bug 153918. 9 10 * rendering/mathml/RenderMathMLOperator.cpp: 11 (WebCore::RenderMathMLOperator::italicCorrection): Return the italic correction from the MATH table if it's a large operator. 12 * rendering/mathml/RenderMathMLOperator.h: Declare italicCorrection. 13 1 14 2016-04-14 Frederic Wang <fwang@igalia.com> 2 15 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r199547 r199548 203 203 } 204 204 205 LayoutUnit RenderMathMLOperator::italicCorrection() const 206 { 207 if (isLargeOperatorInDisplayStyle()) { 208 const auto& primaryFont = style().fontCascade().primaryFont(); 209 if (auto* mathData = primaryFont.mathData()) { 210 StretchyData largeOperator = getDisplayStyleLargeOperator(m_textContent); 211 return mathData->getItalicCorrection(primaryFont, largeOperator.variant().glyph); 212 } 213 } 214 return 0; 215 } 216 205 217 void RenderMathMLOperator::stretchTo(LayoutUnit heightAboveBaseline, LayoutUnit depthBelowBaseline) 206 218 { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h
r199547 r199548 52 52 bool isLargeOperatorInDisplayStyle() const { return !hasOperatorFlag(MathMLOperatorDictionary::Stretchy) && hasOperatorFlag(MathMLOperatorDictionary::LargeOp); } 53 53 bool isVertical() const { return m_isVertical; } 54 LayoutUnit italicCorrection() const; 54 55 55 56 void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
Note: See TracChangeset
for help on using the changeset viewer.