| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 typedef int AffectedSelectorMask; | 70 typedef int AffectedSelectorMask; |
| 71 | 71 |
| 72 enum SpellcheckAttributeState { | 72 enum SpellcheckAttributeState { |
| 73 SpellcheckAttributeTrue, | 73 SpellcheckAttributeTrue, |
| 74 SpellcheckAttributeFalse, | 74 SpellcheckAttributeFalse, |
| 75 SpellcheckAttributeDefault | 75 SpellcheckAttributeDefault |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 enum ElementFlags { | 78 enum ElementFlags { |
| 79 TabIndexWasSetExplicitly = 1 << 0, | 79 TabIndexWasSetExplicitly = 1 << 0, |
| 80 HasPendingResources = 1 << 1, | |
| 81 | 80 |
| 82 NumberOfElementFlags = 2, // Required size of bitfield used to store the fla
gs. | 81 NumberOfElementFlags = 2, // Required size of bitfield used to store the fla
gs. |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 class Element : public ContainerNode { | 84 class Element : public ContainerNode { |
| 86 DEFINE_WRAPPERTYPEINFO(); | 85 DEFINE_WRAPPERTYPEINFO(); |
| 87 public: | 86 public: |
| 88 static PassRefPtr<Element> create(const QualifiedName&, Document*); | 87 static PassRefPtr<Element> create(const QualifiedName&, Document*); |
| 89 virtual ~Element(); | 88 virtual ~Element(); |
| 90 | 89 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 virtual bool isValidFormControlElement() { return false; } | 337 virtual bool isValidFormControlElement() { return false; } |
| 339 virtual bool isInRange() const { return false; } | 338 virtual bool isInRange() const { return false; } |
| 340 virtual bool isOutOfRange() const { return false; } | 339 virtual bool isOutOfRange() const { return false; } |
| 341 | 340 |
| 342 virtual bool canContainRangeEndPoint() const override { return true; } | 341 virtual bool canContainRangeEndPoint() const override { return true; } |
| 343 | 342 |
| 344 // Used for disabled form elements; if true, prevents mouse events from bein
g dispatched | 343 // Used for disabled form elements; if true, prevents mouse events from bein
g dispatched |
| 345 // to event listeners, and prevents DOMActivate events from being sent at al
l. | 344 // to event listeners, and prevents DOMActivate events from being sent at al
l. |
| 346 virtual bool isDisabledFormControl() const { return false; } | 345 virtual bool isDisabledFormControl() const { return false; } |
| 347 | 346 |
| 348 bool hasPendingResources() const { return hasElementFlag(HasPendingResources
); } | |
| 349 void setHasPendingResources() { setElementFlag(HasPendingResources); } | |
| 350 void clearHasPendingResources() { clearElementFlag(HasPendingResources); } | |
| 351 virtual void buildPendingResource() { }; | |
| 352 | |
| 353 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition>); | 347 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition>); |
| 354 CustomElementDefinition* customElementDefinition() const; | 348 CustomElementDefinition* customElementDefinition() const; |
| 355 | 349 |
| 356 bool isSpellCheckingEnabled() const; | 350 bool isSpellCheckingEnabled() const; |
| 357 | 351 |
| 358 // FIXME: public for RenderTreeBuilder, we shouldn't expose this though. | 352 // FIXME: public for RenderTreeBuilder, we shouldn't expose this though. |
| 359 PassRefPtr<RenderStyle> styleForRenderer(); | 353 PassRefPtr<RenderStyle> styleForRenderer(); |
| 360 | 354 |
| 361 bool hasID() const; | 355 bool hasID() const; |
| 362 bool hasClass() const; | 356 bool hasClass() const; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 static PassRefPtr<T> create(const QualifiedName&, Document&) | 679 static PassRefPtr<T> create(const QualifiedName&, Document&) |
| 686 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 680 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 687 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 681 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
| 688 { \ | 682 { \ |
| 689 return adoptRef(new T(tagName, document)); \ | 683 return adoptRef(new T(tagName, document)); \ |
| 690 } | 684 } |
| 691 | 685 |
| 692 } // namespace | 686 } // namespace |
| 693 | 687 |
| 694 #endif // Element_h | 688 #endif // Element_h |
| OLD | NEW |