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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 SpellcheckAttributeDefault | 72 SpellcheckAttributeDefault |
73 }; | 73 }; |
74 | 74 |
75 enum ElementFlags { | 75 enum ElementFlags { |
76 TabIndexWasSetExplicitly = 1 << 0, | 76 TabIndexWasSetExplicitly = 1 << 0, |
77 StyleAffectedByEmpty = 1 << 1, | 77 StyleAffectedByEmpty = 1 << 1, |
78 IsInCanvasSubtree = 1 << 2, | 78 IsInCanvasSubtree = 1 << 2, |
79 ContainsFullScreenElement = 1 << 3, | 79 ContainsFullScreenElement = 1 << 3, |
80 IsInTopLayer = 1 << 4, | 80 IsInTopLayer = 1 << 4, |
81 HasPendingResources = 1 << 5, | 81 HasPendingResources = 1 << 5, |
| 82 TabStopWasSetExplicitly = 1 << 6, |
82 | 83 |
83 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. | 84 NumberOfElementFlags = 7, // Required size of bitfield used to store the fla
gs. |
84 }; | 85 }; |
85 | 86 |
86 class CORE_EXPORT Element : public ContainerNode { | 87 class CORE_EXPORT Element : public ContainerNode { |
87 DEFINE_WRAPPERTYPEINFO(); | 88 DEFINE_WRAPPERTYPEINFO(); |
88 public: | 89 public: |
89 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); | 90 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); |
90 virtual ~Element(); | 91 virtual ~Element(); |
91 | 92 |
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); | 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); |
93 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); | 94 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 virtual void blur(); | 371 virtual void blur(); |
371 // Whether this element can receive focus at all. Most elements are not | 372 // Whether this element can receive focus at all. Most elements are not |
372 // focusable but some elements, such as form controls and links, are. Unlike | 373 // focusable but some elements, such as form controls and links, are. Unlike |
373 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to | 374 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to |
374 // date, so it must not use the renderer to determine focusability. | 375 // date, so it must not use the renderer to determine focusability. |
375 virtual bool supportsFocus() const; | 376 virtual bool supportsFocus() const; |
376 // Whether the node can actually be focused. | 377 // Whether the node can actually be focused. |
377 bool isFocusable() const; | 378 bool isFocusable() const; |
378 bool tabStop() const; | 379 bool tabStop() const; |
379 void setTabStop(bool); | 380 void setTabStop(bool); |
| 381 void setTabStopInternal(bool); |
380 virtual bool isKeyboardFocusable() const; | 382 virtual bool isKeyboardFocusable() const; |
381 virtual bool isMouseFocusable() const; | 383 virtual bool isMouseFocusable() const; |
382 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); | 384 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); |
383 virtual void dispatchBlurEvent(Element* newFocusedElement, WebFocusType); | 385 virtual void dispatchBlurEvent(Element* newFocusedElement, WebFocusType); |
384 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, WebFocusType); | 386 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, WebFocusType); |
385 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); | 387 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); |
386 | 388 |
387 String innerText(); | 389 String innerText(); |
388 String outerText(); | 390 String outerText(); |
389 String innerHTML() const; | 391 String innerHTML() const; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 884 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 885 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 886 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
885 { \ | 887 { \ |
886 return adoptRefWillBeNoop(new T(tagName, document)); \ | 888 return adoptRefWillBeNoop(new T(tagName, document)); \ |
887 } | 889 } |
888 | 890 |
889 } // namespace | 891 } // namespace |
890 | 892 |
891 #endif // Element_h | 893 #endif // Element_h |
OLD | NEW |