WebCore:
2008-03-23 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
http://bugs.webkit.org/show_bug.cgi?id=17062
* svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
(WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
(WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
(WebCore::SVGAltGlyphElement::setGlyphRef):
(WebCore::SVGAltGlyphElement::glyphRef):
(WebCore::SVGAltGlyphElement::setFormat):
(WebCore::SVGAltGlyphElement::format):
(WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
(WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
which is right for everything besides the alternate glyph substitution itself.
* svg/SVGAltGlyphElement.h: Added. Header for new element.
(WebCore::SVGAltGlyphElement::contextElement):
* svg/SVGAltGlyphElement.idl: Added. Interface for new element.
* svg/SVGTSpanElement.cpp:
(WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::childShouldCreateRenderer): ditto
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
* svg/svgtags.in: Add altGlyph
* DerivedSources.make: Add new files
* GNUmakefile.am: ditto
* WebCore.SVG.exp: Add new ObjC DOM class
* WebCore.pro: Add new files
* WebCore.vcproj/WebCore.vcproj: ditto
* WebCore.xcodeproj/project.pbxproj: ditto
* bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
* bindings/objc/DOM.mm:
(WebCore::createElementClassMap): ditto
* bindings/objc/DOMInternal.h: Include altGlyph header
* bindings/objc/DOMSVG.h: Include altGlyph header
LayoutTests:
2008-03-23 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- updated test results for "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
http://bugs.webkit.org/show_bug.cgi?id=17062
* platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
* platform/mac/svg/text/text-altglyph-01-b-expected.txt:
* svg/dom/altGlyph-dom-expected.txt: Added.
* svg/dom/altGlyph-dom.xhtml: Added.
* svg/dom/resources/altGlyph-dom.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e396441..298b873 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2008-03-23 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
+ http://bugs.webkit.org/show_bug.cgi?id=17062
+
+ * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
+ (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
+ (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
+ (WebCore::SVGAltGlyphElement::setGlyphRef):
+ (WebCore::SVGAltGlyphElement::glyphRef):
+ (WebCore::SVGAltGlyphElement::setFormat):
+ (WebCore::SVGAltGlyphElement::format):
+ (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
+ (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
+ which is right for everything besides the alternate glyph substitution itself.
+ * svg/SVGAltGlyphElement.h: Added. Header for new element.
+ (WebCore::SVGAltGlyphElement::contextElement):
+ * svg/SVGAltGlyphElement.idl: Added. Interface for new element.
+ * svg/SVGTSpanElement.cpp:
+ (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
+ * svg/SVGTextElement.cpp:
+ (WebCore::SVGTextElement::childShouldCreateRenderer): ditto
+ * svg/SVGTextPathElement.cpp:
+ (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
+ * svg/svgtags.in: Add altGlyph
+ * DerivedSources.make: Add new files
+ * GNUmakefile.am: ditto
+ * WebCore.SVG.exp: Add new ObjC DOM class
+ * WebCore.pro: Add new files
+ * WebCore.vcproj/WebCore.vcproj: ditto
+ * WebCore.xcodeproj/project.pbxproj: ditto
+ * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
+ * bindings/objc/DOM.mm:
+ (WebCore::createElementClassMap): ditto
+ * bindings/objc/DOMInternal.h: Include altGlyph header
+ * bindings/objc/DOMSVG.h: Include altGlyph header
+
2008-03-23 Robert Blaut <webkit@blaut.biz>
Reviewed by eseidel. Landed by eseidel.
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 240570a..dc0eb84 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -178,6 +178,7 @@
SQLResultSetRowList \
SQLTransaction \
SVGAElement \
+ SVGAltGlyphElement \
SVGAngle \
SVGAnimateColorElement \
SVGAnimateElement \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 1a21c93..98e7963 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1325,6 +1325,7 @@
DerivedSources/SVGElementFactory.cpp \
DerivedSources/SVGNames.cpp \
DerivedSources/JSSVGAElement.h \
+ DerivedSources/JSSVGAltGlyphElement.h \
DerivedSources/JSSVGAngle.h \
DerivedSources/JSSVGAnimatedAngle.h \
DerivedSources/JSSVGAnimateColorElement.h \
@@ -1456,6 +1457,7 @@
DerivedSources/JSSVGMissingGlyphElement.h \
DerivedSources/JSSVGZoomEvent.h \
DerivedSources/JSSVGAElement.cpp \
+ DerivedSources/JSSVGAltGlyphElement.cpp \
DerivedSources/JSSVGAngle.cpp \
DerivedSources/JSSVGAnimatedAngle.cpp \
DerivedSources/JSSVGAnimateColorElement.cpp \
@@ -1590,6 +1592,7 @@
IDL_BINDINGS += \
WebCore/svg/SVGZoomEvent.idl \
WebCore/svg/SVGAElement.idl \
+ WebCore/svg/SVGAltGlyphElement.idl \
WebCore/svg/SVGAngle.idl \
WebCore/svg/SVGAnimateColorElement.idl \
WebCore/svg/SVGAnimatedAngle.idl \
@@ -1749,6 +1752,7 @@
WebCore/svg/TimeScheduler.cpp \
WebCore/svg/ColorDistance.cpp \
WebCore/svg/SVGAElement.cpp \
+ WebCore/svg/SVGAltGlyphElement.cpp \
WebCore/svg/SVGAngle.cpp \
WebCore/svg/SVGAnimateColorElement.cpp \
WebCore/svg/SVGAnimatedPathData.cpp \
diff --git a/WebCore/WebCore.SVG.exp b/WebCore/WebCore.SVG.exp
index 6cf820b..1e56700 100644
--- a/WebCore/WebCore.SVG.exp
+++ b/WebCore/WebCore.SVG.exp
@@ -1,4 +1,5 @@
.objc_class_name_DOMSVGAElement
+.objc_class_name_DOMSVGAltGlyphElement
.objc_class_name_DOMSVGAngle
.objc_class_name_DOMSVGAnimateColorElement
.objc_class_name_DOMSVGAnimatedAngle
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 686186b..cbb3f08 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1299,6 +1299,7 @@
IDL_BINDINGS += svg/SVGZoomEvent.idl \
svg/SVGAElement.idl \
+ svg/SVGAltGlyphElement.idl \
svg/SVGAngle.idl \
svg/SVGAnimateColorElement.idl \
svg/SVGAnimatedAngle.idl \
@@ -1451,6 +1452,7 @@
svg/TimeScheduler.cpp \
svg/ColorDistance.cpp \
svg/SVGAElement.cpp \
+ svg/SVGAltGlyphElement.cpp \
svg/SVGAngle.cpp \
svg/SVGAnimateColorElement.cpp \
svg/SVGAnimatedPathData.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 98676eb..035f938 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -1675,6 +1675,22 @@
>
</File>
<File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.h"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.h"
+ >
+ </File>
+ <File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAngle.cpp"
>
</File>
@@ -10267,6 +10283,14 @@
>
</File>
<File
+ RelativePath="..\svg\SVGAltGlyphElement.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\svg\SVGAltGlyphElement.h"
+ >
+ </File>
+ <File
RelativePath="..\svg\SVGAngle.cpp"
>
</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index be96e88..0f5e44f 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -509,6 +509,8 @@
5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; };
650F53DC09D15DDA00C9B0C8 /* CSSGrammar.h in Headers */ = {isa = PBXBuildFile; fileRef = 650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */; };
650F53DD09D15DDF00C9B0C8 /* CSSGrammar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6565814409D13043000E61D7 /* CSSGrammar.cpp */; };
+ 6515EC910D9723FF0063D49A /* JSSVGAltGlyphElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6515EC8F0D9723FF0063D49A /* JSSVGAltGlyphElement.cpp */; };
+ 6515EC920D9723FF0063D49A /* JSSVGAltGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6515EC900D9723FF0063D49A /* JSSVGAltGlyphElement.h */; };
6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B693099DF0270090D781 /* CDATASection.cpp */; };
6550B69E099DF0270090D781 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B694099DF0270090D781 /* CDATASection.h */; };
6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B695099DF0270090D781 /* CharacterData.cpp */; };
@@ -519,6 +521,9 @@
6550B6A4099DF0270090D781 /* EditingText.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B69A099DF0270090D781 /* EditingText.h */; };
6550B6A5099DF0270090D781 /* Text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B69B099DF0270090D781 /* Text.cpp */; };
6550B6A6099DF0270090D781 /* Text.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B69C099DF0270090D781 /* Text.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 65653F2D0D9727D200CA9723 /* SVGAltGlyphElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65653F2A0D9727D200CA9723 /* SVGAltGlyphElement.cpp */; };
+ 65653F2E0D9727D200CA9723 /* SVGAltGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */; };
+ 65653F2F0D9727D200CA9723 /* SVGAltGlyphElement.idl in Resources */ = {isa = PBXBuildFile; fileRef = 65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */; };
656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */; };
6565815109D13043000E61D7 /* CSSValueKeywords.h in Headers */ = {isa = PBXBuildFile; fileRef = 6565814809D13043000E61D7 /* CSSValueKeywords.h */; };
656581B209D14EE6000E61D7 /* UserAgentStyleSheets.h in Headers */ = {isa = PBXBuildFile; fileRef = 656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */; };
@@ -552,6 +557,9 @@
65A21468097A329100B9050A /* Page.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21467097A329100B9050A /* Page.h */; settings = {ATTRIBUTES = (Private, ); }; };
65A21484097A3F5300B9050A /* FrameTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65A21482097A3F5300B9050A /* FrameTree.cpp */; };
65A21485097A3F5300B9050A /* FrameTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A21483097A3F5300B9050A /* FrameTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 65AA6BAF0D974A00000541AE /* DOMSVGAltGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAC0D974A00000541AE /* DOMSVGAltGlyphElement.h */; };
+ 65AA6BB00D974A00000541AE /* DOMSVGAltGlyphElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65AA6BAD0D974A00000541AE /* DOMSVGAltGlyphElement.mm */; };
+ 65AA6BB10D974A00000541AE /* DOMSVGAltGlyphElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AA6BAE0D974A00000541AE /* DOMSVGAltGlyphElementInternal.h */; };
65BF022E0974816300C43196 /* Frame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65BF02290974816300C43196 /* Frame.cpp */; };
65BF022F0974816300C43196 /* Frame.h in Headers */ = {isa = PBXBuildFile; fileRef = 65BF022A0974816300C43196 /* Frame.h */; settings = {ATTRIBUTES = (Private, ); }; };
65BF02300974816300C43196 /* FramePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 65BF022B0974816300C43196 /* FramePrivate.h */; };
@@ -4861,6 +4869,8 @@
550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
5DCF836C0D59159800953BC6 /* PluginInfoStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginInfoStore.h; sourceTree = "<group>"; };
650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSGrammar.h; sourceTree = "<group>"; };
+ 6515EC8F0D9723FF0063D49A /* JSSVGAltGlyphElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSSVGAltGlyphElement.cpp; path = ../../../../symroots/Debug/DerivedSources/WebCore/JSSVGAltGlyphElement.cpp; sourceTree = SOURCE_ROOT; };
+ 6515EC900D9723FF0063D49A /* JSSVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSSVGAltGlyphElement.h; path = ../../../../symroots/Debug/DerivedSources/WebCore/JSSVGAltGlyphElement.h; sourceTree = SOURCE_ROOT; };
6548E24809E1E04D00AF8020 /* Document.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Document.idl; sourceTree = "<group>"; };
6550B693099DF0270090D781 /* CDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDATASection.cpp; sourceTree = "<group>"; };
6550B694099DF0270090D781 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = "<group>"; };
@@ -4872,6 +4882,9 @@
6550B69A099DF0270090D781 /* EditingText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EditingText.h; sourceTree = "<group>"; };
6550B69B099DF0270090D781 /* Text.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Text.cpp; sourceTree = "<group>"; };
6550B69C099DF0270090D781 /* Text.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Text.h; sourceTree = "<group>"; };
+ 65653F2A0D9727D200CA9723 /* SVGAltGlyphElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAltGlyphElement.cpp; sourceTree = "<group>"; };
+ 65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAltGlyphElement.h; sourceTree = "<group>"; };
+ 65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAltGlyphElement.idl; sourceTree = "<group>"; };
656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; };
656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.gperf; sourceTree = "<group>"; };
656580EF09D12B20000E61D7 /* CSSPropertyNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPropertyNames.h; sourceTree = "<group>"; };
@@ -4918,6 +4931,9 @@
65A21482097A3F5300B9050A /* FrameTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FrameTree.cpp; sourceTree = "<group>"; };
65A21483097A3F5300B9050A /* FrameTree.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FrameTree.h; sourceTree = "<group>"; };
65A640F00533BB1F0085E777 /* BlockExceptions.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = BlockExceptions.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ 65AA6BAC0D974A00000541AE /* DOMSVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMSVGAltGlyphElement.h; path = ../../../../symroots/Debug/DerivedSources/WebCore/DOMSVGAltGlyphElement.h; sourceTree = SOURCE_ROOT; };
+ 65AA6BAD0D974A00000541AE /* DOMSVGAltGlyphElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DOMSVGAltGlyphElement.mm; path = ../../../../symroots/Debug/DerivedSources/WebCore/DOMSVGAltGlyphElement.mm; sourceTree = SOURCE_ROOT; };
+ 65AA6BAE0D974A00000541AE /* DOMSVGAltGlyphElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMSVGAltGlyphElementInternal.h; path = ../../../../symroots/Debug/DerivedSources/WebCore/DOMSVGAltGlyphElementInternal.h; sourceTree = SOURCE_ROOT; };
65BF02290974816300C43196 /* Frame.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Frame.cpp; sourceTree = "<group>"; };
65BF022A0974816300C43196 /* Frame.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Frame.h; sourceTree = "<group>"; };
65BF022B0974816300C43196 /* FramePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FramePrivate.h; sourceTree = "<group>"; };
@@ -8901,6 +8917,9 @@
85ACEF750ACDCFCE001214FF /* DOMSVGAElement.mm */,
A8E544150CA9D1C10097D09B /* DOMSVGAElementInternal.h */,
854163690AC7180B0001E01B /* DOMSVGAngle.h */,
+ 65AA6BAC0D974A00000541AE /* DOMSVGAltGlyphElement.h */,
+ 65AA6BAD0D974A00000541AE /* DOMSVGAltGlyphElement.mm */,
+ 65AA6BAE0D974A00000541AE /* DOMSVGAltGlyphElementInternal.h */,
854163680AC7180B0001E01B /* DOMSVGAngle.mm */,
A8E544130CA9D1C10097D09B /* DOMSVGAngleInternal.h */,
850361280ACE007B001F3D9E /* DOMSVGAnimateColorElement.h */,
@@ -10432,6 +10451,8 @@
A83B790A0CCAFF47000B0825 /* SVG */ = {
isa = PBXGroup;
children = (
+ 6515EC8F0D9723FF0063D49A /* JSSVGAltGlyphElement.cpp */,
+ 6515EC900D9723FF0063D49A /* JSSVGAltGlyphElement.h */,
B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */,
B20111060AB7740500DB0E68 /* JSSVGAElement.h */,
B222F6960AB771950022EFAD /* JSSVGAngle.cpp */,
@@ -10897,6 +10918,9 @@
B22277E00D00BF1F0071B782 /* SVGAngle.cpp */,
B22277E10D00BF1F0071B782 /* SVGAngle.h */,
B22277E20D00BF1F0071B782 /* SVGAngle.idl */,
+ 65653F2A0D9727D200CA9723 /* SVGAltGlyphElement.cpp */,
+ 65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */,
+ 65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */,
B22277E30D00BF1F0071B782 /* SVGAnimateColorElement.cpp */,
B22277E40D00BF1F0071B782 /* SVGAnimateColorElement.h */,
B22277E50D00BF1F0071B782 /* SVGAnimateColorElement.idl */,
@@ -14560,6 +14584,10 @@
9382AAB40D8C386100F357A6 /* NodeWithIndex.h in Headers */,
9382AAB50D8C386100F357A6 /* NodeWithIndexBefore.h in Headers */,
9382AAB60D8C386100F357A6 /* NodeWithIndexAfter.h in Headers */,
+ 6515EC920D9723FF0063D49A /* JSSVGAltGlyphElement.h in Headers */,
+ 65653F2E0D9727D200CA9723 /* SVGAltGlyphElement.h in Headers */,
+ 65AA6BAF0D974A00000541AE /* DOMSVGAltGlyphElement.h in Headers */,
+ 65AA6BB10D974A00000541AE /* DOMSVGAltGlyphElementInternal.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -14675,6 +14703,7 @@
A77979180D6B9D0C003851B9 /* CanvasPixelArray.idl in Resources */,
A779791B0D6B9D0C003851B9 /* ImageData.idl in Resources */,
BCA83E370D7CDC4E003421A8 /* Clipboard.idl in Resources */,
+ 65653F2F0D9727D200CA9723 /* SVGAltGlyphElement.idl in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -16198,6 +16227,9 @@
A9D248080D757E7D00FDF959 /* JSMimeTypeArray.cpp in Sources */,
1CE3F8B40D89CFDC00FB035F /* MainThread.cpp in Sources */,
512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */,
+ 6515EC910D9723FF0063D49A /* JSSVGAltGlyphElement.cpp in Sources */,
+ 65653F2D0D9727D200CA9723 /* SVGAltGlyphElement.cpp in Sources */,
+ 65AA6BB00D974A00000541AE /* DOMSVGAltGlyphElement.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebCore/bindings/js/JSSVGElementWrapperFactory.cpp b/WebCore/bindings/js/JSSVGElementWrapperFactory.cpp
index 29ead3d..ef147c9 100644
--- a/WebCore/bindings/js/JSSVGElementWrapperFactory.cpp
+++ b/WebCore/bindings/js/JSSVGElementWrapperFactory.cpp
@@ -23,6 +23,7 @@
#include "JSSVGElementWrapperFactory.h"
#include "JSSVGAElement.h"
+#include "JSSVGAltGlyphElement.h"
#include "JSSVGAnimateColorElement.h"
#include "JSSVGAnimateElement.h"
#include "JSSVGAnimateTransformElement.h"
@@ -96,6 +97,7 @@
#include "SVGNames.h"
#include "SVGAElement.h"
+#include "SVGAltGlyphElement.h"
#include "SVGAnimateColorElement.h"
#include "SVGAnimateElement.h"
#include "SVGAnimateTransformElement.h"
@@ -245,6 +247,7 @@
#define FOR_EACH_TAG(macro) \
macro(a, A) \
+ macro(altGlyph, AltGlyph) \
macro(circle, Circle) \
macro(clipPath, ClipPath) \
macro(cursor, Cursor) \
diff --git a/WebCore/bindings/objc/DOM.mm b/WebCore/bindings/objc/DOM.mm
index 69204be..2189e08 100644
--- a/WebCore/bindings/objc/DOM.mm
+++ b/WebCore/bindings/objc/DOM.mm
@@ -191,6 +191,7 @@
#if ENABLE(SVG)
addElementClass(SVGNames::aTag, [DOMSVGAElement class]);
+ addElementClass(SVGNames::altGlyphTag, [DOMSVGAltGlyphElement class]);
#if ENABLE(SVG_ANIMATION)
addElementClass(SVGNames::animateTag, [DOMSVGAnimateElement class]);
addElementClass(SVGNames::animateColorTag, [DOMSVGAnimateColorElement class]);
diff --git a/WebCore/bindings/objc/DOMInternal.h b/WebCore/bindings/objc/DOMInternal.h
index 5bd8c77..b6d5b9a 100644
--- a/WebCore/bindings/objc/DOMInternal.h
+++ b/WebCore/bindings/objc/DOMInternal.h
@@ -148,6 +148,7 @@
#if ENABLE(SVG)
#import "DOMSVGAElementInternal.h"
+#import "DOMSVGAltGlyphElementInternal.h"
#import "DOMSVGAngleInternal.h"
#import "DOMSVGAnimateColorElementInternal.h"
#import "DOMSVGAnimateElementInternal.h"
diff --git a/WebCore/bindings/objc/DOMSVG.h b/WebCore/bindings/objc/DOMSVG.h
index 8a7388f..f1321d8c 100644
--- a/WebCore/bindings/objc/DOMSVG.h
+++ b/WebCore/bindings/objc/DOMSVG.h
@@ -25,6 +25,7 @@
*/
#import <WebCore/DOMSVGAElement.h>
+#import <WebCore/DOMSVGAltGlyphElement.h>
#import <WebCore/DOMSVGAngle.h>
#import <WebCore/DOMSVGAnimateColorElement.h>
#import <WebCore/DOMSVGAnimateElement.h>
diff --git a/WebCore/svg/SVGAltGlyphElement.cpp b/WebCore/svg/SVGAltGlyphElement.cpp
new file mode 100644
index 0000000..03696a0
--- /dev/null
+++ b/WebCore/svg/SVGAltGlyphElement.cpp
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+ 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ Copyright (C) 2008 Apple Computer, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+
+#if ENABLE(SVG)
+#include "SVGAltGlyphElement.h"
+
+#include "ExceptionCode.h"
+#include "RenderInline.h"
+#include "RenderSVGTSpan.h"
+#include "SVGNames.h"
+
+namespace WebCore {
+
+SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document* doc)
+ : SVGTextPositioningElement(tagName, doc)
+{
+}
+
+SVGAltGlyphElement::~SVGAltGlyphElement()
+{
+}
+
+void SVGAltGlyphElement::setGlyphRef(const AtomicString& type, ExceptionCode& ec)
+{
+ ec = NO_MODIFICATION_ALLOWED_ERR;
+}
+
+const AtomicString& SVGAltGlyphElement::glyphRef() const
+{
+ return getAttribute(SVGNames::glyphRefAttr);
+}
+
+void SVGAltGlyphElement::setFormat(const AtomicString& type, ExceptionCode& ec)
+{
+ ec = NO_MODIFICATION_ALLOWED_ERR;
+}
+
+const AtomicString& SVGAltGlyphElement::format() const
+{
+ return getAttribute(SVGNames::formatAttr);
+}
+
+bool SVGAltGlyphElement::childShouldCreateRenderer(Node* child) const
+{
+ if (child->isTextNode())
+ return true;
+
+ return false;
+}
+
+RenderObject* SVGAltGlyphElement::createRenderer(RenderArena* arena, RenderStyle*)
+{
+ return new (arena) RenderSVGTSpan(this);
+}
+
+}
+
+#endif // ENABLE(SVG)
+
+// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAltGlyphElement.h b/WebCore/svg/SVGAltGlyphElement.h
new file mode 100644
index 0000000..dde6ee7
--- /dev/null
+++ b/WebCore/svg/SVGAltGlyphElement.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ Copyright (C) 2008 Apple Computer, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef SVGAltGlyphElement_h
+#define SVGAltGlyphElement_h
+#if ENABLE(SVG)
+
+#include "AtomicString.h"
+#include "SVGTextPositioningElement.h"
+#include "SVGURIReference.h"
+
+namespace WebCore
+{
+ class SVGAltGlyphElement : public SVGTextPositioningElement, public SVGURIReference
+ {
+ public:
+ SVGAltGlyphElement(const QualifiedName&, Document*);
+ virtual ~SVGAltGlyphElement();
+
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ bool childShouldCreateRenderer(Node*) const;
+
+ const AtomicString& glyphRef() const;
+ void setGlyphRef(const AtomicString&, ExceptionCode&);
+ const AtomicString& format() const;
+ void setFormat(const AtomicString&, ExceptionCode&);
+
+ protected:
+ virtual const SVGElement* contextElement() const { return this; }
+ };
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
+
+// vim:ts=4:noet
diff --git a/WebCore/svg/SVGAltGlyphElement.idl b/WebCore/svg/SVGAltGlyphElement.idl
new file mode 100644
index 0000000..9e770ee
--- /dev/null
+++ b/WebCore/svg/SVGAltGlyphElement.idl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2008 Apple Computer, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module svg {
+
+ interface [Conditional=SVG] SVGAltGlyphElement : SVGTextPositioningElement, SVGURIReference {
+ attribute DOMString glyphRef
+ setter raises(DOMException);
+ attribute DOMString format
+ setter raises(DOMException);
+ };
+
+}
diff --git a/WebCore/svg/SVGTSpanElement.cpp b/WebCore/svg/SVGTSpanElement.cpp
index 45a7727..41ad6ff 100644
--- a/WebCore/svg/SVGTSpanElement.cpp
+++ b/WebCore/svg/SVGTSpanElement.cpp
@@ -42,7 +42,7 @@
bool SVGTSpanElement::childShouldCreateRenderer(Node* child) const
{
- if (child->isTextNode() || child->hasTagName(SVGNames::tspanTag) ||
+ if (child->isTextNode() || child->hasTagName(SVGNames::altGlyphTag) || child->hasTagName(SVGNames::tspanTag) ||
child->hasTagName(SVGNames::trefTag) || child->hasTagName(SVGNames::textPathTag))
return true;
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index 7b65fa2..e836694 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -104,7 +104,7 @@
bool SVGTextElement::childShouldCreateRenderer(Node* child) const
{
- if (child->isTextNode() || child->hasTagName(SVGNames::tspanTag) ||
+ if (child->isTextNode() || child->hasTagName(SVGNames::altGlyphTag) || child->hasTagName(SVGNames::tspanTag) ||
child->hasTagName(SVGNames::trefTag) || child->hasTagName(SVGNames::aTag) || child->hasTagName(SVGNames::textPathTag))
return true;
return false;
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index 47c08f5..e4cdfdd 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -82,7 +82,7 @@
bool SVGTextPathElement::childShouldCreateRenderer(Node* child) const
{
- if (child->isTextNode() || child->hasTagName(SVGNames::trefTag) ||
+ if (child->isTextNode() || child->hasTagName(SVGNames::altGlyphTag) || child->hasTagName(SVGNames::trefTag) ||
child->hasTagName(SVGNames::tspanTag) || child->hasTagName(SVGNames::textPathTag))
return true;
diff --git a/WebCore/svg/svgtags.in b/WebCore/svg/svgtags.in
index 0aa34e5..eb03f06 100644
--- a/WebCore/svg/svgtags.in
+++ b/WebCore/svg/svgtags.in
@@ -1,6 +1,6 @@
a
-#if 0
altGlyph
+#if 0
altGlyphDef
altGlyphItem
#endif