-
commit-queue@webkit.org authored
<https://webkit.org/b/120058> Patch by Frédéric Wang <fred.wang@free.fr> on 2013-12-03 Reviewed by Chris Fleizach. Source/WebCore: Tests: mathml/presentation/maction-dynamic.html mathml/presentation/maction.html mathml/presentation/semantics.html This adds a new MathMLSelectElement class to prepare the implementation of the <maction> and <semantics> elements, for which only one "selected" child is visible. We now simply display the first child of the <semantics> element instead of hiding the annotations and this allows to handle the use case of SVG-in-MathML as generated by Instiki when bug 124128 is fixed ; Gecko's selection algorithm will be implemented later (bug 100626). We now also rely on the @actiontype and @selection attributes to select the visible <maction> child ; It remains to deal with the user interaction (bug 85734). * CMakeLists.txt: add the new files. * GNUmakefile.list.am: ditto * Target.pri: ditto * WebCore.vcxproj/WebCore.vcxproj: ditto * WebCore.vcxproj/WebCore.vcxproj.filters: ditto * WebCore.xcodeproj/project.pbxproj: ditto * css/mathml.css: remove the CSS rule for annotation/annotation-xml. * mathml/MathMLAllInOne.cpp: add the new cpp file. * mathml/MathMLSelectElement.cpp: Added. (WebCore::MathMLSelectElement::MathMLSelectElement): (WebCore::MathMLSelectElement::create): (WebCore::MathMLSelectElement::createRenderer): (WebCore::MathMLSelectElement::childShouldCreateRenderer): (WebCore::MathMLSelectElement::finishParsingChildren): (WebCore::MathMLSelectElement::childrenChanged): (WebCore::MathMLSelectElement::attributeChanged): (WebCore::MathMLSelectElement::updateSelectedChild): basic implementation for maction, semantics, maction@actiontype and maction@selection. * mathml/MathMLSelectElement.h: Added. * mathml/mathattrs.in: add actiontype and selection attributes. * mathml/mathtags.in: set element classes for maction, semantics, annotation and annotation-xml. LayoutTests: New tests for the selection of the visible child in the <maction> and <semantics> elements. * mathml/presentation/maction-dynamic-expected.html: Added. * mathml/presentation/maction-dynamic.html: Added. * mathml/presentation/maction-expected.html: Added. * mathml/presentation/maction.html: Added. * mathml/presentation/semantics-expected.html: Added. * mathml/presentation/semantics.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4b77b7b4