| 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-2011, 2013, 2014 Apple Inc. All rights reserved. | 6 * Copyright (C) 2003-2011, 2013, 2014 Apple 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 virtual bool isPresentationAttribute(const QualifiedName&) const { | 349 virtual bool isPresentationAttribute(const QualifiedName&) const { |
| 350 return false; | 350 return false; |
| 351 } | 351 } |
| 352 virtual void collectStyleForPresentationAttribute(const QualifiedName&, | 352 virtual void collectStyleForPresentationAttribute(const QualifiedName&, |
| 353 const AtomicString&, | 353 const AtomicString&, |
| 354 MutableStylePropertySet*) {} | 354 MutableStylePropertySet*) {} |
| 355 | 355 |
| 356 // For exposing to DOM only. | 356 // For exposing to DOM only. |
| 357 NamedNodeMap* attributesForBindings() const; | 357 NamedNodeMap* attributesForBindings() const; |
| 358 | 358 |
| 359 enum AttributeModificationReason { ModifiedDirectly, ModifiedByCloning }; | 359 enum class AttributeModificationReason { kDirectly, kByParser, kByCloning }; |
| 360 | 360 |
| 361 // This method is called whenever an attribute is added, changed or removed. | 361 // |attributeChanged| is called whenever an attribute is added, changed or |
| 362 // removed. It handles very common attributes such as id, class, name, style, |
| 363 // and slot. |
| 364 // |
| 365 // While the owner document is parsed, this function is called after all |
| 366 // attributes in a start tag were added to the element. |
| 362 virtual void attributeChanged(const QualifiedName&, | 367 virtual void attributeChanged(const QualifiedName&, |
| 363 const AtomicString& oldValue, | 368 const AtomicString& oldValue, |
| 364 const AtomicString& newValue, | 369 const AtomicString& newValue, |
| 365 AttributeModificationReason = ModifiedDirectly); | 370 AttributeModificationReason); |
| 371 |
| 372 // |parseAttribute| is called by |attributeChanged|. If an element |
| 373 // implementation needs to check an attribute update, override this function. |
| 374 // |
| 375 // While the owner document is parsed, this function is called after all |
| 376 // attributes in a start tag were added to the element. |
| 366 virtual void parseAttribute(const QualifiedName&, | 377 virtual void parseAttribute(const QualifiedName&, |
| 367 const AtomicString& oldValue, | 378 const AtomicString& oldValue, |
| 368 const AtomicString& newValue); | 379 const AtomicString& newValue); |
| 369 | 380 |
| 370 virtual bool hasLegalLinkAttribute(const QualifiedName&) const; | 381 virtual bool hasLegalLinkAttribute(const QualifiedName&) const; |
| 371 virtual const QualifiedName& subResourceAttributeName() const; | 382 virtual const QualifiedName& subResourceAttributeName() const; |
| 372 | 383 |
| 373 // Only called by the parser immediately after element construction. | 384 // Only called by the parser immediately after element construction. |
| 374 void parserSetAttributes(const Vector<Attribute>&); | 385 void parserSetAttributes(const Vector<Attribute>&); |
| 375 | 386 |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 1185 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 1175 static T* create(const QualifiedName&, Document&) | 1186 static T* create(const QualifiedName&, Document&) |
| 1176 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 1187 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 1177 T* T::create(const QualifiedName& tagName, Document& document) { \ | 1188 T* T::create(const QualifiedName& tagName, Document& document) { \ |
| 1178 return new T(tagName, document); \ | 1189 return new T(tagName, document); \ |
| 1179 } | 1190 } |
| 1180 | 1191 |
| 1181 } // namespace blink | 1192 } // namespace blink |
| 1182 | 1193 |
| 1183 #endif // Element_h | 1194 #endif // Element_h |
| OLD | NEW |