| 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, | |
| 83 | 82 |
| 84 NumberOfElementFlags = 7, // Required size of bitfield used to store the fla
gs. | 83 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; | 86 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; |
| 88 | 87 |
| 89 class CORE_EXPORT Element : public ContainerNode { | 88 class CORE_EXPORT Element : public ContainerNode { |
| 90 DEFINE_WRAPPERTYPEINFO(); | 89 DEFINE_WRAPPERTYPEINFO(); |
| 91 public: | 90 public: |
| 92 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); | 91 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); |
| 93 virtual ~Element(); | 92 virtual ~Element(); |
| 94 | 93 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone); | 367 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF
ocusTypeNone); |
| 369 virtual void updateFocusAppearance(bool restorePreviousSelection); | 368 virtual void updateFocusAppearance(bool restorePreviousSelection); |
| 370 virtual void blur(); | 369 virtual void blur(); |
| 371 // Whether this element can receive focus at all. Most elements are not | 370 // 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 | 371 // 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 | 372 // layoutObjectIsFocusable(), this method may be called when layout is not u
p to |
| 374 // date, so it must not use the layoutObject to determine focusability. | 373 // date, so it must not use the layoutObject to determine focusability. |
| 375 virtual bool supportsFocus() const; | 374 virtual bool supportsFocus() const; |
| 376 // Whether the node can actually be focused. | 375 // Whether the node can actually be focused. |
| 377 bool isFocusable() const; | 376 bool isFocusable() const; |
| 378 bool tabStop() const; | |
| 379 void setTabStop(bool); | |
| 380 void setTabStopInternal(bool); | |
| 381 bool isFocusedElementInDocument() const; | 377 bool isFocusedElementInDocument() const; |
| 382 virtual bool isKeyboardFocusable() const; | 378 virtual bool isKeyboardFocusable() const; |
| 383 virtual bool isMouseFocusable() const; | 379 virtual bool isMouseFocusable() const; |
| 384 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); | 380 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); |
| 385 virtual void dispatchBlurEvent(Element* newFocusedElement, WebFocusType); | 381 virtual void dispatchBlurEvent(Element* newFocusedElement, WebFocusType); |
| 386 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, WebFocusType); | 382 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, WebFocusType); |
| 387 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); | 383 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); |
| 388 | 384 |
| 389 String innerText(); | 385 String innerText(); |
| 390 String outerText(); | 386 String outerText(); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 875 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 880 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 876 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 881 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 877 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 882 { \ | 878 { \ |
| 883 return adoptRefWillBeNoop(new T(tagName, document)); \ | 879 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 884 } | 880 } |
| 885 | 881 |
| 886 } // namespace | 882 } // namespace |
| 887 | 883 |
| 888 #endif // Element_h | 884 #endif // Element_h |
| OLD | NEW |