OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e Inc. All rights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 enum AttributeModificationReason { | 272 enum AttributeModificationReason { |
273 ModifiedDirectly, | 273 ModifiedDirectly, |
274 ModifiedByCloning | 274 ModifiedByCloning |
275 }; | 275 }; |
276 | 276 |
277 // This method is called whenever an attribute is added, changed or removed. | 277 // This method is called whenever an attribute is added, changed or removed. |
278 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly); | 278 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly); |
279 virtual void parseAttribute(const QualifiedName&, const AtomicString&) { } | 279 virtual void parseAttribute(const QualifiedName&, const AtomicString&) { } |
280 | 280 |
| 281 virtual bool hasLegalLinkAttribute(const QualifiedName&) const; |
| 282 |
281 // Only called by the parser immediately after element construction. | 283 // Only called by the parser immediately after element construction. |
282 void parserSetAttributes(const Vector<Attribute>&); | 284 void parserSetAttributes(const Vector<Attribute>&); |
283 | 285 |
284 // Remove attributes that might introduce scripting from the vector leaving
the element unchanged. | 286 // Remove attributes that might introduce scripting from the vector leaving
the element unchanged. |
285 void stripScriptingAttributes(Vector<Attribute>&) const; | 287 void stripScriptingAttributes(Vector<Attribute>&) const; |
286 | 288 |
287 const ElementData* elementData() const { return m_elementData.get(); } | 289 const ElementData* elementData() const { return m_elementData.get(); } |
288 UniqueElementData& ensureUniqueElementData(); | 290 UniqueElementData& ensureUniqueElementData(); |
289 | 291 |
290 void synchronizeAllAttributes() const; | 292 void synchronizeAllAttributes() const; |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return element.predicate; } \ | 894 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return element.predicate; } \ |
893 DEFINE_NODE_TYPE_CASTS(thisType, predicate) | 895 DEFINE_NODE_TYPE_CASTS(thisType, predicate) |
894 | 896 |
895 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ | 897 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ |
896 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return is##thisType(element); } \ | 898 template <> inline bool isElementOfType<const thisType>(const Element& eleme
nt) { return is##thisType(element); } \ |
897 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) | 899 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) |
898 | 900 |
899 } // namespace | 901 } // namespace |
900 | 902 |
901 #endif | 903 #endif |
OLD | NEW |