-
leo.yang@torchmobile.com.cn authored
https://bugs.webkit.org/show_bug.cgi?id=60850 Reviewed by Nikolas Zimmermann. SVG spec: http://www.w3.org/TR/SVG/text.html#AlternateGlyphDefinitions. This patch is to implement SVG <altGlyphDef>, <altGlyphItem> and <glyphRef> elements for alternative glyph features. Source/WebCore: NOTE: x, y, dx, dy, format and glyphRef attributes on <glyphRef> are not honored yet, so neither are the reaction of dynamic change of them. They will be honored in separated patches. Test: svg/W3C-SVG-1.1/text-altglyph-01-b.svg With this patch this test works as expected. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOM.mm: (WebCore::createElementClassMap): * bindings/objc/DOMSVG.h: * page/DOMWindow.idl: * svg/SVGAllInOne.cpp: * svg/SVGAltGlyphDefElement.cpp: Added. (WebCore::SVGAltGlyphDefElement::SVGAltGlyphDefElement): (WebCore::SVGAltGlyphDefElement::create): (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements): * svg/SVGAltGlyphDefElement.h: Added. * svg/SVGAltGlyphDefElement.idl: Added. * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::hasValidGlyphElements): * svg/SVGAltGlyphElement.h: * svg/SVGAltGlyphItemElement.cpp: Added. (WebCore::SVGAltGlyphItemElement::SVGAltGlyphItemElement): (WebCore::SVGAltGlyphItemElement::create): (WebCore::SVGAltGlyphItemElement::hasValidGlyphElements): * svg/SVGAltGlyphItemElement.h: Added. * svg/SVGAltGlyphItemElement.idl: Added. * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): * svg/SVGGlyphRefElement.cpp: Added. (WebCore::SVGGlyphRefElement::SVGGlyphRefElement): (WebCore::SVGGlyphRefElement::create): (WebCore::SVGGlyphRefElement::hasValidGlyphElement): (WebCore::SVGGlyphRefElement::parseMappedAttribute): (WebCore::SVGGlyphRefElement::glyphRef): (WebCore::SVGGlyphRefElement::setGlyphRef): (WebCore::SVGGlyphRefElement::setX): (WebCore::SVGGlyphRefElement::setY): (WebCore::SVGGlyphRefElement::setDx): (WebCore::SVGGlyphRefElement::setDy): * svg/SVGGlyphRefElement.h: Added. * svg/SVGGlyphRefElement.idl: Added. * svg/svgtags.in: Source/WebKit/mac: * MigrateHeaders.make: LayoutTests: Updated test expectation. * platform/chromium-linux/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4e9a267a