WebCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Mar 2008 05:36:30 +0000 (05:36 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Mar 2008 05:36:30 +0000 (05:36 +0000)
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

24 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt
LayoutTests/platform/mac/svg/text/text-altglyph-01-b-expected.txt
LayoutTests/svg/dom/altGlyph-dom-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/altGlyph-dom.xhtml [new file with mode: 0644]
LayoutTests/svg/dom/resources/altGlyph-dom.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/GNUmakefile.am
WebCore/WebCore.SVG.exp
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSSVGElementWrapperFactory.cpp
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMInternal.h
WebCore/bindings/objc/DOMSVG.h
WebCore/svg/SVGAltGlyphElement.cpp [new file with mode: 0644]
WebCore/svg/SVGAltGlyphElement.h [new file with mode: 0644]
WebCore/svg/SVGAltGlyphElement.idl [new file with mode: 0644]
WebCore/svg/SVGTSpanElement.cpp
WebCore/svg/SVGTextElement.cpp
WebCore/svg/SVGTextPathElement.cpp
WebCore/svg/svgtags.in

index ec5afc2e5e8d92b9f30f7465f0ed2e78f938f134..6812413000c2e0a0d8c13561d3720189d2b4db34 100644 (file)
@@ -1,3 +1,16 @@
+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.
+
 2008-03-23  Robert Blaut  <webkit@blaut.biz>
 
         Reviewed by eseidel.  Landed by eseidel.
index bb52e36c54b5fa65822a1dd45a7c1b0f5baec455..8ea9f413224ea301fafc5f6c16a0860ea966bdf3 100644 (file)
@@ -10,11 +10,37 @@ layer at (0,0) size 480x360
         RenderSVGInlineText {#text} at (0,-27) size 463x33
           chunk 1 text run 1 at (5.00,90.00) startOffset 0 endOffset 32 width 463.00: "and many-to-many chars to glyphs"
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (49.33,189.33) size 419.33x96.33
-        RenderSVGText {text}
-        RenderSVGText {text} at (50,270) size 38x67 contains 1 chunk(s)
-          RenderSVGInlineText {#text} at (0,-52) size 38x67
-            chunk 1 text run 1 at (50.00,270.00) startOffset 0 endOffset 1 width 37.50: "D"
+      RenderSVGContainer {g} at (49.33,137.33) size 419.33x148.33
+        RenderSVGText {text} at (140,190) size 188x67 contains 1 chunk(s)
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (0,-52) size 38x67
+              chunk 1 text run 1 at (140.00,190.00) startOffset 0 endOffset 1 width 37.50: "H"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (37,-52) size 38x67
+              chunk 1 text run 2 at (177.50,190.00) startOffset 0 endOffset 1 width 37.50: "A"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (75,-52) size 38x67
+              chunk 1 text run 3 at (215.00,190.00) startOffset 0 endOffset 1 width 37.50: "P"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (112,-52) size 38x67
+              chunk 1 text run 4 at (252.50,190.00) startOffset 0 endOffset 1 width 37.50: "P"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (150,-52) size 38x67
+              chunk 1 text run 5 at (290.00,190.00) startOffset 0 endOffset 1 width 37.50: "Y"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+        RenderSVGText {text} at (50,270) size 113x67 contains 1 chunk(s)
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (0,-52) size 38x67
+              chunk 1 text run 1 at (50.00,270.00) startOffset 0 endOffset 1 width 37.50: "S"
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (37,-52) size 38x67
+              chunk 1 text run 2 at (87.50,270.00) startOffset 0 endOffset 1 width 37.50: "A"
+          RenderSVGInlineText {#text} at (75,-52) size 38x67
+            chunk 1 text run 3 at (125.00,270.00) startOffset 0 endOffset 1 width 37.50: "D"
         RenderSVGText {text} at (280,270) size 188x67 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-52) size 188x67
             chunk 1 text run 1 at (280.00,270.00) startOffset 0 endOffset 5 width 157.50: "SASSY"
index d7b23cba053f5844e72265c6993b247b1139e0e5..15df5f3355bf924fb7eef28bda9c88c52ba5a870 100644 (file)
@@ -10,11 +10,37 @@ layer at (0,0) size 800x600
         RenderSVGInlineText {#text} at (0,-27) size 463x33
           chunk 1 text run 1 at (5.00,90.00) startOffset 0 endOffset 32 width 463.00: "and many-to-many chars to glyphs"
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGContainer {g} at (82.22,315.56) size 698.89x160.56
-        RenderSVGText {text}
-        RenderSVGText {text} at (50,270) size 38x67 contains 1 chunk(s)
-          RenderSVGInlineText {#text} at (0,-52) size 38x67
-            chunk 1 text run 1 at (50.00,270.00) startOffset 0 endOffset 1 width 37.50: "D"
+      RenderSVGContainer {g} at (82.22,228.89) size 698.89x247.22
+        RenderSVGText {text} at (140,190) size 188x67 contains 1 chunk(s)
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (0,-52) size 38x67
+              chunk 1 text run 1 at (140.00,190.00) startOffset 0 endOffset 1 width 37.50: "H"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (37,-52) size 38x67
+              chunk 1 text run 2 at (177.50,190.00) startOffset 0 endOffset 1 width 37.50: "A"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (75,-52) size 38x67
+              chunk 1 text run 3 at (215.00,190.00) startOffset 0 endOffset 1 width 37.50: "P"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (112,-52) size 38x67
+              chunk 1 text run 4 at (252.50,190.00) startOffset 0 endOffset 1 width 37.50: "P"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (150,-52) size 38x67
+              chunk 1 text run 5 at (290.00,190.00) startOffset 0 endOffset 1 width 37.50: "Y"
+          RenderSVGInlineText {#text} at (0,0) size 0x0
+        RenderSVGText {text} at (50,270) size 113x67 contains 1 chunk(s)
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (0,-52) size 38x67
+              chunk 1 text run 1 at (50.00,270.00) startOffset 0 endOffset 1 width 37.50: "S"
+          RenderSVGTSpan {altGlyph} at (0,0) size 38x67
+            RenderSVGInlineText {#text} at (37,-52) size 38x67
+              chunk 1 text run 2 at (87.50,270.00) startOffset 0 endOffset 1 width 37.50: "A"
+          RenderSVGInlineText {#text} at (75,-52) size 38x67
+            chunk 1 text run 3 at (125.00,270.00) startOffset 0 endOffset 1 width 37.50: "D"
         RenderSVGText {text} at (280,270) size 188x67 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-52) size 188x67
             chunk 1 text run 1 at (280.00,270.00) startOffset 0 endOffset 5 width 157.50: "SASSY"
diff --git a/LayoutTests/svg/dom/altGlyph-dom-expected.txt b/LayoutTests/svg/dom/altGlyph-dom-expected.txt
new file mode 100644 (file)
index 0000000..7075a22
--- /dev/null
@@ -0,0 +1,15 @@
+一&M000076; 丁
+This test checks that SVG altGlyph elements create the appropriate DOM object.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS altGlyph.tagName is "altGlyph"
+PASS altGlyph.namespaceURI is "http://www.w3.org/2000/svg"
+PASS altGlyph.format is "image/svg+xml"
+PASS altGlyph.format = 'x' threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
+PASS altGlyph.getStartPositionOfChar(0).x is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/altGlyph-dom.xhtml b/LayoutTests/svg/dom/altGlyph-dom.xhtml
new file mode 100644 (file)
index 0000000..bad0561
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html 
+xmlns="http://www.w3.org/1999/xhtml" 
+xmlns:xlink="http://www.w3.org/1999/xlink"
+>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css" />
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+
+<svg xmlns="http://www.w3.org/2000/svg" width="220" height="100">
+  <defs>
+    <font horiz-adv-x="512">
+      <font-face
+        font-family="Mojikyo-test"
+        units-per-em="1024"
+        panose-1="2 0 6 9 0 0 0 0 0 0"
+        ascent="870"
+        descent="-141"
+        baseline="0"/>
+      <missing-glyph horiz-adv-x="1024"><path d="M400 400V620H620V400H400z"/></missing-glyph>
+      <glyph id="M000076" unicode="&#x4e00;" horiz-adv-x="1024"><path d="M537 -47Q501 -108 486 -62V235H99Q58 235 78 264Q92 256 120 256H486V430H243Q202 430 221 459Q235 450 263 450H486V624H171Q130 624 149 654Q163 645 192 645H486V737Q486 794 472 820Q503 820 523 814T554
+798T567 778T569 760T560 744T548 730T541 712T537 680V645H762Q765 648 769 659T778 675T788 683T807 686T847 678T890 660T913 646T919 636T906 628T871 624H537V450H691Q693 454 697 465T706 481T717 488T735 491T775 483T818 465T841 451T847 441T835 433T800
+430H537V256H798Q801 259 805 270T814 286T824 293T843 296T883 288T926 271T949 256T955 246T942 238T907 235H537V-47z"/></glyph>
+    </font>
+  </defs>
+<g>
+<text x="0" y="80" style="font-family:MingLiU; font-size:72;fill:black">&#x4e00;
+<tspan style="font-family:Mojikyo-test">
+<altGlyph format="image/svg+xml" id="altGlyph" xlink:href="#M000076">&amp;M000076;</altGlyph> </tspan>&#x4e01; </text> </g> </svg>
+
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/altGlyph-dom.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+
+</html>
diff --git a/LayoutTests/svg/dom/resources/altGlyph-dom.js b/LayoutTests/svg/dom/resources/altGlyph-dom.js
new file mode 100644 (file)
index 0000000..04c08a6
--- /dev/null
@@ -0,0 +1,16 @@
+description(
+
+"This test checks that SVG altGlyph elements create the appropriate DOM object."
+
+);
+
+var altGlyph = document.getElementById("altGlyph");
+shouldBe("altGlyph.tagName", '"altGlyph"');
+shouldBe("altGlyph.namespaceURI", '"http://www.w3.org/2000/svg"');
+shouldBe("altGlyph.format", '"image/svg+xml"');
+shouldThrow("altGlyph.format = 'x'");
+
+shouldBe("altGlyph.getStartPositionOfChar(0).x", '0');
+
+
+successfullyParsed = true;
index e396441b55315dbe1e579b0fa7ac59df50ad6eb4..298b87397fa8107623b70d06fb7958c6d29e3369 100644 (file)
@@ -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.
index 240570ac6648fa4360e1346c3a7ba397a6955893..dc0eb849f2286cd05b2e14fdaf23176c0717977e 100644 (file)
@@ -178,6 +178,7 @@ DOM_CLASSES = \
     SQLResultSetRowList \
     SQLTransaction \
     SVGAElement \
+    SVGAltGlyphElement \
     SVGAngle \
     SVGAnimateColorElement \
     SVGAnimateElement \
index 1a21c932406bf89c1787bc0ddf1446d5a2796a5c..98e7963b266edb0bd5c0b9e8bf9a3615155366a4 100644 (file)
@@ -1325,6 +1325,7 @@ webcore_built_sources += \
        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 @@ webcore_built_sources += \
        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 @@ webcore_built_sources += \
 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_sources += \
        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 \
index 6cf820b3fc31e53490f1972d02578da637d9b821..1e5670097a42fb8dca7369d8201ca498a79af883 100644 (file)
@@ -1,4 +1,5 @@
 .objc_class_name_DOMSVGAElement
+.objc_class_name_DOMSVGAltGlyphElement
 .objc_class_name_DOMSVGAngle
 .objc_class_name_DOMSVGAnimateColorElement
 .objc_class_name_DOMSVGAnimatedAngle
index 686186b5f34ac5c90bcd34a4f2dea7ba25fb2dd9..cbb3f08be3278917a1fe4b56283f642940173c78 100644 (file)
@@ -1299,6 +1299,7 @@ contains(DEFINES, ENABLE_SVG=1) {
 
     IDL_BINDINGS += svg/SVGZoomEvent.idl \
         svg/SVGAElement.idl \
+        svg/SVGAltGlyphElement.idl \
         svg/SVGAngle.idl \
         svg/SVGAnimateColorElement.idl \
         svg/SVGAnimatedAngle.idl \
@@ -1451,6 +1452,7 @@ contains(DEFINES, ENABLE_SVG=1) {
         svg/TimeScheduler.cpp \
         svg/ColorDistance.cpp \
         svg/SVGAElement.cpp \
+        svg/SVGAltGlyphElement.cpp \
         svg/SVGAngle.cpp \
         svg/SVGAnimateColorElement.cpp \
         svg/SVGAnimatedPathData.cpp \
index 98676eba7046c568a99f9481db0b693b3ab1f5a5..035f93814e07782d0d21ed26dde35667df281f02 100644 (file)
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAElement.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAltGlyphElement.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSSVGAngle.cpp"\r
                                >\r
                                RelativePath="..\svg\SVGAElement.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\svg\SVGAltGlyphElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\svg\SVGAltGlyphElement.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\svg\SVGAngle.cpp"\r
                                >\r
index be96e88ed59b0e24f0b7cf29576397d4861d12d3..0f5e44fb29faa6bce7a04a04bdd7f932f757cc89 100644 (file)
                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 */; };
                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 */; };
                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 */; };
                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>"; };
                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>"; };
                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>"; };
                                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 */,
                A83B790A0CCAFF47000B0825 /* SVG */ = {
                        isa = PBXGroup;
                        children = (
+                               6515EC8F0D9723FF0063D49A /* JSSVGAltGlyphElement.cpp */,
+                               6515EC900D9723FF0063D49A /* JSSVGAltGlyphElement.h */,
                                B20111050AB7740500DB0E68 /* JSSVGAElement.cpp */,
                                B20111060AB7740500DB0E68 /* JSSVGAElement.h */,
                                B222F6960AB771950022EFAD /* JSSVGAngle.cpp */,
                                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 */,
                                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;
                };
                                A77979180D6B9D0C003851B9 /* CanvasPixelArray.idl in Resources */,
                                A779791B0D6B9D0C003851B9 /* ImageData.idl in Resources */,
                                BCA83E370D7CDC4E003421A8 /* Clipboard.idl in Resources */,
+                               65653F2F0D9727D200CA9723 /* SVGAltGlyphElement.idl in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                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;
                };
index 29ead3d0d109938fe8af1ca0e8f63e92dc4d6cac..ef147c9ca8db2e8e438382ddb50d8e2af1073b00 100644 (file)
@@ -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 @@ typedef JSNode* (*CreateSVGElementWrapperFunction)(ExecState*, PassRefPtr<SVGEle
 
 #define FOR_EACH_TAG(macro) \
     macro(a, A) \
+    macro(altGlyph, AltGlyph) \
     macro(circle, Circle) \
     macro(clipPath, ClipPath) \
     macro(cursor, Cursor) \
index 69204be83092993de4cdd99d987f6dea36750e65..2189e08526821243b9fcb5fc7a116e813a5eb109 100644 (file)
@@ -191,6 +191,7 @@ static void createElementClassMap()
 
 #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]);
index 5bd8c773653a7aa0c6dc3f25a626d8c0151c8894..b6d5b9a1bce88068aeddd22bef5e27be0f3e88da 100644 (file)
 
 #if ENABLE(SVG)
 #import "DOMSVGAElementInternal.h"
+#import "DOMSVGAltGlyphElementInternal.h"
 #import "DOMSVGAngleInternal.h"
 #import "DOMSVGAnimateColorElementInternal.h"
 #import "DOMSVGAnimateElementInternal.h"
index 8a7388f9f7825faead47a68c67b9b4dbc0bc6861..f1321d8c399384cd168251f59ce19d3127a82ab0 100644 (file)
@@ -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 (file)
index 0000000..03696a0
--- /dev/null
@@ -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 (file)
index 0000000..dde6ee7
--- /dev/null
@@ -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 (file)
index 0000000..9e770ee
--- /dev/null
@@ -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);
+    };
+
+}
index 45a772771be145715dfe51a345518c9149f77ed0..41ad6fff297227574e5650b146eac2e48a95462d 100644 (file)
@@ -42,7 +42,7 @@ SVGTSpanElement::~SVGTSpanElement()
 
 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;
 
index 7b65fa244b1d715a5ab425cffad173a0afd604b4..e836694615f5245ae9e99b710059c6d4c7894c10 100644 (file)
@@ -104,7 +104,7 @@ RenderObject* SVGTextElement::createRenderer(RenderArena* arena, RenderStyle* st
 
 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;
index 47c08f5eecb477260b7b2cf47a68f939ce9c0e22..e4cdfddcd74e4f46b7f5e02c616330b6c06bf1e2 100644 (file)
@@ -82,7 +82,7 @@ RenderObject* SVGTextPathElement::createRenderer(RenderArena* arena, RenderStyle
 
 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;
 
index 0aa34e5f2878e17c3af8902fa4ba374bcd668e8d..eb03f060b113fb3998c90d55a96015a4b142027e 100644 (file)
@@ -1,6 +1,6 @@
 a
-#if 0 
 altGlyph
+#if 0 
 altGlyphDef
 altGlyphItem
 #endif