WebKit Bugzilla
Attachment 362701 Details for
Bug 180013
: WPT tests for MathML lengths fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-180013-20190222091607.patch (text/plain), 3.93 KB, created by
Rob Buis
on 2019-02-22 00:16:09 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2019-02-22 00:16:09 PST
Size:
3.93 KB
patch
obsolete
>Subversion Revision: 241761 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a6da53fe8e04ad79dd06c117c410a040b2b97e76..5717f1a0b43444a6ca1b04201636d286ea439c19 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-21 Rob Buis <rbuis@igalia.com> >+ >+ WPT tests for MathML lengths fail >+ https://bugs.webkit.org/show_bug.cgi?id=180013 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Covert unitless lengths to percentage values to correct the computed >+ font size. >+ >+ * mathml/MathMLElement.cpp: >+ (WebCore::convertToPercentageIfNeeded): >+ (WebCore::MathMLElement::collectStyleForPresentationAttribute): >+ > 2019-02-19 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r241722. >diff --git a/Source/WebCore/mathml/MathMLElement.cpp b/Source/WebCore/mathml/MathMLElement.cpp >index 5ffa23f241e00ad403fec6781d17638103628d7d..d8cb1c4dab3d578acdd5514dcf4203039892eda8 100644 >--- a/Source/WebCore/mathml/MathMLElement.cpp >+++ b/Source/WebCore/mathml/MathMLElement.cpp >@@ -97,6 +97,15 @@ bool MathMLElement::isPresentationAttribute(const QualifiedName& name) const > return StyledElement::isPresentationAttribute(name); > } > >+static String convertToPercentageIfNeeded(const AtomicString& value) >+{ >+ bool ok = false; >+ float unitlessValue = value.toFloat(&ok); >+ if (ok) >+ return String::format("%.3f%%", unitlessValue * 100.0); >+ return value; >+} >+ > void MathMLElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style) > { > if (name == mathbackgroundAttr) >@@ -104,7 +113,7 @@ void MathMLElement::collectStyleForPresentationAttribute(const QualifiedName& na > else if (name == mathsizeAttr) { > // The following three values of mathsize are handled in WebCore/css/mathml.css > if (value != "normal" && value != "small" && value != "big") >- addPropertyToPresentationAttributeStyle(style, CSSPropertyFontSize, value); >+ addPropertyToPresentationAttributeStyle(style, CSSPropertyFontSize, convertToPercentageIfNeeded(value)); > } else if (name == mathcolorAttr) > addPropertyToPresentationAttributeStyle(style, CSSPropertyColor, value); > // FIXME: deprecated attributes that should loose in a conflict with a non deprecated attribute >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e26eaf6e984904ac4398e158332c2c689e209500..8948775e4c4a74eeaf28f2a0357faf354278720e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-02-21 Rob Buis <rbuis@igalia.com> >+ >+ WPT tests for MathML lengths fail >+ https://bugs.webkit.org/show_bug.cgi?id=180013 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests lengths-1.html and length-3.html now pass. >+ >+ * TestExpectations: >+ > 2019-02-19 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r241722. >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index c2c19fb1153ea659530df86108bd5fff7d9cb26a..61015fcc2f96c7decdf2c7f8f580792732dcf71e 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -719,9 +719,7 @@ imported/w3c/web-platform-tests/html/browsers/windows/nested-browsing-contexts/f > imported/w3c/web-platform-tests/html/browsers/windows/targeting-cross-origin-nested-browsing-contexts.sub.html [ Pass Failure ] > > # These MathML WPT tests fail. >-webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-1.html [ ImageOnlyFailure ] > webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2.html [ ImageOnlyFailure ] >-webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-3.html [ Failure ] > > # These webmessaging WPT tests time out. > webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 180013
: 362701