haikuwebkit/LayoutTests/svg/custom/conditional-processing-1-ex...

5 lines
145 B
XML
Raw Permalink Normal View History

[SVG] Accept HTML and MathML namespaces as valid requiredExtensions https://bugs.webkit.org/show_bug.cgi?id=88188 Patch by Frédéric Wang <fred.wang@free.fr> on 2014-01-15 Reviewed by Chris Fleizach. Source/WebCore: When HTML and MathML are used as foreign objects of an SVG image, it is important for Web authors to be able to specify a fallback content for SVG-only readers or browsers without MathML support. We rely on the requiredExtensions for that purpose and we use the XHTML/MathML namespaces as suggested in SVG Tiny 1.2 and implemented in Gecko. Tests: svg/custom/conditional-processing-1.svg svg/custom/conditional-processing-2.html svg/dom/SVGTests.html * svg/SVGSwitchElement.cpp: Remove an incorrect FIXME comment and replace it with a reference to bug 74749. (WebCore::SVGSwitchElement::childShouldCreateRenderer): * svg/SVGTests.cpp: Check if the list of required extensions contains only the XHTML/MathML namespaces. (WebCore::SVGTests::hasExtension): (WebCore::SVGTests::isValid): LayoutTests: conditional-processing-1 verifies that indeed a renderer object is only created for the first "valid" SVG element of a <switch>, contrary to what an incorrect FIXME comment said. conditional-processing-2 verifies that the <switch> takes into account XHTML and MathML namespaces in the requiredExtensions attribute to decide which SVG element is "valid". SVGTests.html verifies the SVGTests interface of SVG DOM: three SVGStringList attributes (already tested in svg/dom/SVGStringList.html) and the hasExtension() function. * svg/custom/conditional-processing-1-expected.svg: Added. * svg/custom/conditional-processing-1.svg: Added. * svg/custom/conditional-processing-2-expected.html: Added. * svg/custom/conditional-processing-2.html: Added. * svg/dom/SVGTests-expected.txt: Added. * svg/dom/SVGTests.html: Added. * svg/dom/script-tests/SVGTests.js: Added. Canonical link: https://commits.webkit.org/145060@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-01-15 19:01:44 +00:00
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
<rect width="100" height="100" fill="green"/>
</svg>