Currently, MathML is completely handled in the generic AccessibilityRenderObject and it's sometimes not very convenient to work with. We could improve the organization a bit and move MathML-specific code into a separate AccessibilityMathMLElement class:
The case isAnonymousMathOperator() can be moved into AccessibilityMathMLElement.
2) computeAccessibilityIsIgnored (and its helper function isIgnoredElementWithinMathTree)
We can easily return the boolean value for math elements. However, we also ignore anonymous RenderBlock inside MathML which are *not* mathml renderers, so some special handling must be kept in AccessibilityRenderObject.
We can move the mapping mathTag => DocumentMathRole into AccessibilityMathMLElement.
4) All the other math functions (isMathElement, mathRadicandObject etc) can directly be moved into AccessibilityMathMLElement.
Created attachment 282253 [details]
Created attachment 282323 [details]
@Chris: can you please take a look at this patch?
Comment on attachment 282323 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=282323&action=review
> + if (!m_renderer || !m_renderer->isRenderMathMLOperator())
this can be written in one line
Committed r202961: <http://trac.webkit.org/changeset/202961>