ASSERTION FAILED: !isAnonymous() in WebCore::RenderMathMLOperator::updateTokenContent
authorfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Nov 2017 08:14:33 +0000 (08:14 +0000)
committerfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Nov 2017 08:14:33 +0000 (08:14 +0000)
commit94f794617d0c8bbfc352b3d417253c7c60194b35
tree70a38bb4d207ef600ed584da07f989745dcd6c41
parent52b65f833ecf4e15b82dc9981c0fe2aae3e9fb2d
ASSERTION FAILED: !isAnonymous() in WebCore::RenderMathMLOperator::updateTokenContent
https://bugs.webkit.org/show_bug.cgi?id=166011

Patch by Frederic Wang <fwang@igalia.com> on 2017-11-16
Reviewed by Alejandro G. Castro.

Source/WebCore:

RenderMathMLFencedOperator does not support mathvariant or displaystyle transforms. This is
one of several issues of the mfenced element (see bug 160509). However,
MathMLStyle::updateStyleIfNeeded() still tries to use the implementation of the parent
RenderMathMLOperator class, which only works for non-anonymous operators. This patch skips
the updateTokenContent() calls for anonymous mfenced operators in order to avoid ASSERTION
failures.

Test: mathml/mfenced-displaystyle-and-mathvariant-crash.html

* rendering/mathml/MathMLStyle.cpp:
(WebCore::MathMLStyle::updateStyleIfNeeded): Skip anonymous token elements.

LayoutTests:

Add a crash test checking displaystyle and mathvariant on mfenced operators.

* mathml/mfenced-displaystyle-and-mathvariant-crash-expected.txt: Added.
* mathml/mfenced-displaystyle-and-mathvariant-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/mathml/mfenced-displaystyle-and-mathvariant-crash-expected.txt [new file with mode: 0644]
LayoutTests/mathml/mfenced-displaystyle-and-mathvariant-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/mathml/MathMLStyle.cpp