OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2009, 2014 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class SVGElementRareData; | 44 class SVGElementRareData; |
45 class SVGFitToViewBox; | 45 class SVGFitToViewBox; |
46 class SVGSVGElement; | 46 class SVGSVGElement; |
47 class SVGUseElement; | 47 class SVGUseElement; |
48 | 48 |
49 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); | 49 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName
ToIdMap, const QualifiedName& attrName); |
50 | 50 |
51 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; | 51 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet; |
52 | 52 |
53 class SVGElement : public Element { | 53 class SVGElement : public Element { |
| 54 DEFINE_WRAPPERTYPEINFO(); |
54 public: | 55 public: |
55 virtual ~SVGElement(); | 56 virtual ~SVGElement(); |
56 virtual void attach(const AttachContext&) OVERRIDE; | 57 virtual void attach(const AttachContext&) OVERRIDE; |
57 virtual void detach(const AttachContext&) OVERRIDE; | 58 virtual void detach(const AttachContext&) OVERRIDE; |
58 | 59 |
59 virtual short tabIndex() const OVERRIDE; | 60 virtual short tabIndex() const OVERRIDE; |
60 virtual bool supportsFocus() const OVERRIDE { return false; } | 61 virtual bool supportsFocus() const OVERRIDE { return false; } |
61 | 62 |
62 bool isOutermostSVGSVGElement() const; | 63 bool isOutermostSVGSVGElement() const; |
63 | 64 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 private: | 182 private: |
182 RawPtrWillBeMember<SVGElement> m_targetElement; | 183 RawPtrWillBeMember<SVGElement> m_targetElement; |
183 }; | 184 }; |
184 | 185 |
185 void invalidateInstances(); | 186 void invalidateInstances(); |
186 | 187 |
187 virtual void trace(Visitor*) OVERRIDE; | 188 virtual void trace(Visitor*) OVERRIDE; |
188 | 189 |
189 static const AtomicString& eventParameterName(); | 190 static const AtomicString& eventParameterName(); |
190 | 191 |
| 192 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) OVERRIDE; |
| 193 |
191 protected: | 194 protected: |
192 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem
ent); | 195 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem
ent); |
193 | 196 |
194 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 197 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
195 | 198 |
196 // FIXME: |parseAttributeNew| is a new implementation of parseAttribute | 199 // FIXME: |parseAttributeNew| is a new implementation of parseAttribute |
197 // which maps attribute using |m_attributeToPropertyMap|. | 200 // which maps attribute using |m_attributeToPropertyMap|. |
198 // This is to replace |parseAttribute()| after all derived class switch to c
all this. | 201 // This is to replace |parseAttribute()| after all derived class switch to c
all this. |
199 void parseAttributeNew(const QualifiedName&, const AtomicString&); | 202 void parseAttributeNew(const QualifiedName&, const AtomicString&); |
200 | 203 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 inline bool is##thisType(const thisType* element); \ | 283 inline bool is##thisType(const thisType* element); \ |
281 inline bool is##thisType(const thisType& element); \ | 284 inline bool is##thisType(const thisType& element); \ |
282 inline bool is##thisType(const SVGElement* element) { return element && is##
thisType(*element); } \ | 285 inline bool is##thisType(const SVGElement* element) { return element && is##
thisType(*element); } \ |
283 inline bool is##thisType(const Node& node) { return node.isSVGElement() ? is
##thisType(toSVGElement(node)) : false; } \ | 286 inline bool is##thisType(const Node& node) { return node.isSVGElement() ? is
##thisType(toSVGElement(node)) : false; } \ |
284 inline bool is##thisType(const Node* node) { return node && is##thisType(*no
de); } \ | 287 inline bool is##thisType(const Node* node) { return node && is##thisType(*no
de); } \ |
285 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ | 288 template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { r
eturn is##thisType(node.get()); } \ |
286 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ | 289 template<typename T> inline bool is##thisType(const RefPtr<T>& node) { retur
n is##thisType(node.get()); } \ |
287 template <> inline bool isElementOfType<const thisType>(const SVGElement& el
ement) { return is##thisType(element); } \ | 290 template <> inline bool isElementOfType<const thisType>(const SVGElement& el
ement) { return is##thisType(element); } \ |
288 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) | 291 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) |
289 | 292 |
290 } | 293 } // namespace blink |
291 | 294 |
292 #include "core/SVGElementTypeHelpers.h" | 295 #include "core/SVGElementTypeHelpers.h" |
293 | 296 |
294 #endif | 297 #endif // SVGElement_h |
OLD | NEW |