SVG: Missing implementation of <altGlyphDef>, <altGlyphItem> and <glyphRef>
authorleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 02:48:33 +0000 (02:48 +0000)
committerleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 02:48:33 +0000 (02:48 +0000)
commitcbbce259f1148925a30d06bdd8ff43964bfe2d9c
treebd533205a646e6abcfb1a1950ee93e3d03ae83b3
parenta2e9c098e3c4e0933aba07279846251403b49624
SVG: Missing implementation of <altGlyphDef>, <altGlyphItem> and <glyphRef>
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: https://svn.webkit.org/repository/webkit/trunk@91331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.png
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/bindings/objc/DOMSVG.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/svg/SVGAllInOne.cpp
Source/WebCore/svg/SVGAltGlyphDefElement.cpp [new file with mode: 0644]
Source/WebCore/svg/SVGAltGlyphDefElement.h [new file with mode: 0644]
Source/WebCore/svg/SVGAltGlyphDefElement.idl [new file with mode: 0644]
Source/WebCore/svg/SVGAltGlyphElement.cpp
Source/WebCore/svg/SVGAltGlyphElement.h
Source/WebCore/svg/SVGAltGlyphItemElement.cpp [new file with mode: 0644]
Source/WebCore/svg/SVGAltGlyphItemElement.h [new file with mode: 0644]
Source/WebCore/svg/SVGAltGlyphItemElement.idl [new file with mode: 0644]
Source/WebCore/svg/SVGFontData.cpp
Source/WebCore/svg/SVGGlyphRefElement.cpp [new file with mode: 0644]
Source/WebCore/svg/SVGGlyphRefElement.h [new file with mode: 0644]
Source/WebCore/svg/SVGGlyphRefElement.idl [new file with mode: 0644]
Source/WebCore/svg/svgtags.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/MigrateHeaders.make