Skip to content
Commit c2c226b5 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Add Support for the semantics element.

https://bugs.webkit.org/show_bug.cgi?id=100626

Source/WebCore:

Patch by Frédéric Wang <fred.wang@free.fr> on 2014-01-07
Reviewed by Chris Fleizach.

Tests: mathml/presentation/semantics-2.html
       mathml/presentation/semantics-3.html
       mathml/presentation/semantics-4.html

This provides a complete support for the semantics element. When the first child is a content MathML, an annotation can be selected and displayed. The selection algorithm is identical to Gecko's one. The recognized annotations are text (e.g. LaTeX), presentation MathML, SVG and HTML.

* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::childShouldCreateRenderer):
(WebCore::MathMLElement::attributeChanged):
(WebCore::MathMLElement::isPresentationMathML):
* mathml/MathMLElement.h:
(WebCore::MathMLElement::isMathMLToken):
(WebCore::MathMLElement::isSemanticAnnotation):
(WebCore::MathMLElement::isPresentationMathML):
(WebCore::MathMLElement::updateSelectedChild):
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
(WebCore::MathMLSelectElement::getSelectedActionChild):
(WebCore::MathMLSelectElement::getSelectedSemanticsChild):
(WebCore::MathMLSelectElement::updateSelectedChild):
(WebCore::MathMLSelectElement::toggle):
* mathml/MathMLSelectElement.h:
* mathml/MathMLTextElement.h:
* mathml/mathattrs.in:
* mathml/mathtags.in:

LayoutTests:

Patch by Frédéric Wang <fred.wang@free.fr> on 2014-01-07
Reviewed by Chris Fleizach.

* TestExpectations:
* mathml/presentation/semantics-2-expected.html: Added.
* mathml/presentation/semantics-2.html: Added.
* mathml/presentation/semantics-3-expected.html: Added.
* mathml/presentation/semantics-3.html: Added.
* mathml/presentation/semantics-4-expected.html: Added.
* mathml/presentation/semantics-4.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5bc6cc33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment