Changeset 241942 in webkit
- Timestamp:
- Feb 22, 2019 2:42:43 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r241934 r241942 1 2019-02-22 Rob Buis <rbuis@igalia.com> 2 3 Fix unitless usage of mathsize 4 https://bugs.webkit.org/show_bug.cgi?id=194940 5 6 Reviewed by Frédéric Wang. 7 8 Tests lengths-1.html and length-3.html now pass. 9 10 * TestExpectations: 11 1 12 2019-02-21 Simon Fraser <simon.fraser@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r241824 r241942 720 720 721 721 # These MathML WPT tests fail. 722 webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-1.html [ ImageOnlyFailure ]723 722 webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2.html [ ImageOnlyFailure ] 724 webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-3.html [ Failure ]725 723 726 724 # These webmessaging WPT tests time out. -
trunk/Source/WebCore/ChangeLog
r241934 r241942 1 2019-02-22 Rob Buis <rbuis@igalia.com> 2 3 Fix unitless usage of mathsize 4 https://bugs.webkit.org/show_bug.cgi?id=194940 5 6 Reviewed by Frédéric Wang. 7 8 Convert unitless lengths to percentage values to correct the computed 9 font size. 10 11 * mathml/MathMLElement.cpp: 12 (WebCore::convertToPercentageIfNeeded): 13 (WebCore::MathMLElement::collectStyleForPresentationAttribute): 14 1 15 2019-02-21 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Source/WebCore/mathml/MathMLElement.cpp
r229694 r241942 98 98 } 99 99 100 static String convertToPercentageIfNeeded(const AtomicString& value) 101 { 102 bool ok = false; 103 float unitlessValue = value.toFloat(&ok); 104 if (ok) 105 return String::format("%.3f%%", unitlessValue * 100.0); 106 return value; 107 } 108 100 109 void MathMLElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style) 101 110 { … … 105 114 // The following three values of mathsize are handled in WebCore/css/mathml.css 106 115 if (value != "normal" && value != "small" && value != "big") 107 addPropertyToPresentationAttributeStyle(style, CSSPropertyFontSize, value);116 addPropertyToPresentationAttributeStyle(style, CSSPropertyFontSize, convertToPercentageIfNeeded(value)); 108 117 } else if (name == mathcolorAttr) 109 118 addPropertyToPresentationAttributeStyle(style, CSSPropertyColor, value);
Note: See TracChangeset
for help on using the changeset viewer.