OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 static HashSet<AtomicString>& clipperFilterMaskerTags() | 48 static HashSet<AtomicString>& clipperFilterMaskerTags() |
49 { | 49 { |
50 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ()); | 50 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ()); |
51 if (s_tagList.isEmpty()) { | 51 if (s_tagList.isEmpty()) { |
52 // "container elements": http://www.w3.org/TR/SVG11/intro.html#TermConta
inerElement | 52 // "container elements": http://www.w3.org/TR/SVG11/intro.html#TermConta
inerElement |
53 // "graphics elements" : http://www.w3.org/TR/SVG11/intro.html#TermGraph
icsElement | 53 // "graphics elements" : http://www.w3.org/TR/SVG11/intro.html#TermGraph
icsElement |
54 s_tagList.add(aTag.localName()); | 54 s_tagList.add(aTag.localName()); |
55 s_tagList.add(circleTag.localName()); | 55 s_tagList.add(circleTag.localName()); |
56 s_tagList.add(ellipseTag.localName()); | 56 s_tagList.add(ellipseTag.localName()); |
57 #if ENABLE(SVG_FONTS) | |
58 s_tagList.add(glyphTag.localName()); | |
59 #endif | |
60 s_tagList.add(gTag.localName()); | 57 s_tagList.add(gTag.localName()); |
61 s_tagList.add(imageTag.localName()); | 58 s_tagList.add(imageTag.localName()); |
62 s_tagList.add(lineTag.localName()); | 59 s_tagList.add(lineTag.localName()); |
63 s_tagList.add(markerTag.localName()); | 60 s_tagList.add(markerTag.localName()); |
64 s_tagList.add(maskTag.localName()); | 61 s_tagList.add(maskTag.localName()); |
65 #if ENABLE(SVG_FONTS) | |
66 s_tagList.add(missing_glyphTag.localName()); | |
67 #endif | |
68 s_tagList.add(pathTag.localName()); | 62 s_tagList.add(pathTag.localName()); |
69 s_tagList.add(polygonTag.localName()); | 63 s_tagList.add(polygonTag.localName()); |
70 s_tagList.add(polylineTag.localName()); | 64 s_tagList.add(polylineTag.localName()); |
71 s_tagList.add(rectTag.localName()); | 65 s_tagList.add(rectTag.localName()); |
72 s_tagList.add(svgTag.localName()); | 66 s_tagList.add(svgTag.localName()); |
73 s_tagList.add(textTag.localName()); | 67 s_tagList.add(textTag.localName()); |
74 s_tagList.add(useTag.localName()); | 68 s_tagList.add(useTag.localName()); |
75 | 69 |
76 // Not listed in the definitions is the clipPath element, the SVG spec s
ays though: | 70 // Not listed in the definitions is the clipPath element, the SVG spec s
ays though: |
77 // The "clipPath" element or any of its children can specify property "c
lip-path". | 71 // The "clipPath" element or any of its children can specify property "c
lip-path". |
78 // So we have to add clipPathTag here, otherwhise clip-path on clipPath
will fail. | 72 // So we have to add clipPathTag here, otherwhise clip-path on clipPath
will fail. |
79 // (Already mailed SVG WG, waiting for a solution) | 73 // (Already mailed SVG WG, waiting for a solution) |
80 s_tagList.add(clipPathTag.localName()); | 74 s_tagList.add(clipPathTag.localName()); |
81 | 75 |
82 // Not listed in the definitions are the text content elements, though f
ilter/clipper/masker on tspan/text/.. is allowed. | 76 // Not listed in the definitions are the text content elements, though f
ilter/clipper/masker on tspan/text/.. is allowed. |
83 // (Already mailed SVG WG, waiting for a solution) | 77 // (Already mailed SVG WG, waiting for a solution) |
84 #if ENABLE(SVG_FONTS) | |
85 s_tagList.add(altGlyphTag.localName()); | |
86 #endif | |
87 s_tagList.add(textPathTag.localName()); | 78 s_tagList.add(textPathTag.localName()); |
88 s_tagList.add(tspanTag.localName()); | 79 s_tagList.add(tspanTag.localName()); |
89 | 80 |
90 // Not listed in the definitions is the foreignObject element, but clip-
path | 81 // Not listed in the definitions is the foreignObject element, but clip-
path |
91 // is a supported attribute. | 82 // is a supported attribute. |
92 s_tagList.add(foreignObjectTag.localName()); | 83 s_tagList.add(foreignObjectTag.localName()); |
93 | 84 |
94 // Elements that we ignore, as it doesn't make any sense. | 85 // Elements that we ignore, as it doesn't make any sense. |
95 // defs, pattern, switch (FIXME: Mail SVG WG about these) | 86 // defs, pattern, switch (FIXME: Mail SVG WG about these) |
96 // symbol (is converted to a svg element, when referenced by use, we can
safely ignore it.) | 87 // symbol (is converted to a svg element, when referenced by use, we can
safely ignore it.) |
(...skipping 12 matching lines...) Expand all Loading... |
109 s_tagList.add(polylineTag.localName()); | 100 s_tagList.add(polylineTag.localName()); |
110 } | 101 } |
111 | 102 |
112 return s_tagList.contains(element.localName()); | 103 return s_tagList.contains(element.localName()); |
113 } | 104 } |
114 | 105 |
115 static HashSet<AtomicString>& fillAndStrokeTags() | 106 static HashSet<AtomicString>& fillAndStrokeTags() |
116 { | 107 { |
117 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ()); | 108 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ()); |
118 if (s_tagList.isEmpty()) { | 109 if (s_tagList.isEmpty()) { |
119 #if ENABLE(SVG_FONTS) | |
120 s_tagList.add(altGlyphTag.localName()); | |
121 #endif | |
122 s_tagList.add(circleTag.localName()); | 110 s_tagList.add(circleTag.localName()); |
123 s_tagList.add(ellipseTag.localName()); | 111 s_tagList.add(ellipseTag.localName()); |
124 s_tagList.add(lineTag.localName()); | 112 s_tagList.add(lineTag.localName()); |
125 s_tagList.add(pathTag.localName()); | 113 s_tagList.add(pathTag.localName()); |
126 s_tagList.add(polygonTag.localName()); | 114 s_tagList.add(polygonTag.localName()); |
127 s_tagList.add(polylineTag.localName()); | 115 s_tagList.add(polylineTag.localName()); |
128 s_tagList.add(rectTag.localName()); | 116 s_tagList.add(rectTag.localName()); |
129 s_tagList.add(textTag.localName()); | 117 s_tagList.add(textTag.localName()); |
130 s_tagList.add(textPathTag.localName()); | 118 s_tagList.add(textPathTag.localName()); |
131 s_tagList.add(tspanTag.localName()); | 119 s_tagList.add(tspanTag.localName()); |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 if (RenderSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) | 686 if (RenderSVGResourcePaintServer* stroke = m_fillStrokeData->stroke) |
699 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); | 687 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke->
element()); |
700 } | 688 } |
701 | 689 |
702 if (m_linkedResource) | 690 if (m_linkedResource) |
703 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); | 691 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_
linkedResource->element()); |
704 } | 692 } |
705 #endif | 693 #endif |
706 | 694 |
707 } | 695 } |
OLD | NEW |