| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 bool shouldIgnoreAttributeCase() const; | 164 bool shouldIgnoreAttributeCase() const; |
| 165 | 165 |
| 166 // Call this to get the value of the id attribute for style resolution purpo
ses. | 166 // Call this to get the value of the id attribute for style resolution purpo
ses. |
| 167 // The value will already be lowercased if the document is in compatibility
mode, | 167 // The value will already be lowercased if the document is in compatibility
mode, |
| 168 // so this function is not suitable for non-style uses. | 168 // so this function is not suitable for non-style uses. |
| 169 const AtomicString& idForStyleResolution() const; | 169 const AtomicString& idForStyleResolution() const; |
| 170 | 170 |
| 171 // Internal methods that assume the existence of attribute storage, one shou
ld use hasAttributes() | 171 // Internal methods that assume the existence of attribute storage, one shou
ld use hasAttributes() |
| 172 // before calling them. This is not a trivial getter and its return value sh
ould be cached for | 172 // before calling them. This is not a trivial getter and its return value sh
ould be cached for |
| 173 // performance. | 173 // performance. |
| 174 AttributeIteratorAccessor attributesIterator() const { return elementData()-
>attributesIterator(); } | 174 AttributeCollection attributes() const { return elementData()->attributes();
} |
| 175 size_t attributeCount() const; | 175 size_t attributeCount() const; |
| 176 const Attribute& attributeAt(unsigned index) const; | 176 const Attribute& attributeAt(unsigned index) const; |
| 177 const Attribute* findAttributeByName(const QualifiedName&) const; | 177 const Attribute* findAttributeByName(const QualifiedName&) const; |
| 178 size_t findAttributeIndexByName(const QualifiedName& name) const { return el
ementData()->findAttributeIndexByName(name); } | 178 size_t findAttributeIndexByName(const QualifiedName& name) const { return el
ementData()->findAttributeIndexByName(name); } |
| 179 size_t findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreA
ttributeCase) const { return elementData()->findAttributeIndexByName(name, shoul
dIgnoreAttributeCase); } | 179 size_t findAttributeIndexByName(const AtomicString& name, bool shouldIgnoreA
ttributeCase) const { return elementData()->findAttributeIndexByName(name, shoul
dIgnoreAttributeCase); } |
| 180 | 180 |
| 181 void scrollIntoView(bool alignToTop = true); | 181 void scrollIntoView(bool alignToTop = true); |
| 182 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); | 182 void scrollIntoViewIfNeeded(bool centerIfNeeded = true); |
| 183 | 183 |
| 184 void scrollByLines(int lines); | 184 void scrollByLines(int lines); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 bool removeInlineStyleProperty(CSSPropertyID); | 277 bool removeInlineStyleProperty(CSSPropertyID); |
| 278 void removeAllInlineStyleProperties(); | 278 void removeAllInlineStyleProperties(); |
| 279 | 279 |
| 280 void synchronizeStyleAttributeInternal() const; | 280 void synchronizeStyleAttributeInternal() const; |
| 281 | 281 |
| 282 const StylePropertySet* presentationAttributeStyle(); | 282 const StylePropertySet* presentationAttributeStyle(); |
| 283 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } | 283 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } |
| 284 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } | 284 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } |
| 285 | 285 |
| 286 // For exposing to DOM only. | 286 // For exposing to DOM only. |
| 287 NamedNodeMap* attributes() const; | 287 NamedNodeMap* attributesForBindings() const; |
| 288 | 288 |
| 289 enum AttributeModificationReason { | 289 enum AttributeModificationReason { |
| 290 ModifiedDirectly, | 290 ModifiedDirectly, |
| 291 ModifiedByCloning | 291 ModifiedByCloning |
| 292 }; | 292 }; |
| 293 | 293 |
| 294 // This method is called whenever an attribute is added, changed or removed. | 294 // This method is called whenever an attribute is added, changed or removed. |
| 295 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly); | 295 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly); |
| 296 virtual void parseAttribute(const QualifiedName&, const AtomicString&); | 296 virtual void parseAttribute(const QualifiedName&, const AtomicString&); |
| 297 | 297 |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 884 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 885 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 885 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 886 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 886 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 887 { \ | 887 { \ |
| 888 return adoptRefWillBeNoop(new T(tagName, document)); \ | 888 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 889 } | 889 } |
| 890 | 890 |
| 891 } // namespace | 891 } // namespace |
| 892 | 892 |
| 893 #endif | 893 #endif |
| OLD | NEW |