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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF ocusTypeNone); | 367 virtual void focus(bool restorePreviousSelection = true, WebFocusType = WebF ocusTypeNone); |
368 virtual void updateFocusAppearance(bool restorePreviousSelection); | 368 virtual void updateFocusAppearance(bool restorePreviousSelection); |
369 virtual void blur(); | 369 virtual void blur(); |
370 // 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 |
371 // 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 |
372 // rendererIsFocusable(), this method may be called when layout is not up to | 372 // rendererIsFocusable(), this method may be called when layout is not up to |
373 // date, so it must not use the renderer to determine focusability. | 373 // date, so it must not use the renderer to determine focusability. |
374 virtual bool supportsFocus() const; | 374 virtual bool supportsFocus() const; |
375 // Whether the node can actually be focused. | 375 // Whether the node can actually be focused. |
376 bool isFocusable() const; | 376 bool isFocusable() const; |
377 bool isTabStop() const; | |
378 void setIsTabStop(bool); | |
377 virtual bool isKeyboardFocusable() const; | 379 virtual bool isKeyboardFocusable() const; |
378 virtual bool isMouseFocusable() const; | 380 virtual bool isMouseFocusable() const; |
379 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); | 381 virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType); |
380 virtual void dispatchBlurEvent(Element* newFocusedElement); | 382 virtual void dispatchBlurEvent(Element* newFocusedElement); |
381 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol dFocusedElement, WebFocusType); | 383 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol dFocusedElement, WebFocusType); |
382 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse dElement); | 384 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse dElement); |
383 | 385 |
384 String innerText(); | 386 String innerText(); |
385 String outerText(); | 387 String outerText(); |
386 String innerHTML() const; | 388 String innerHTML() const; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
641 void removeAttrNodeList(); | 643 void removeAttrNodeList(); |
642 void detachAllAttrNodesFromElement(); | 644 void detachAllAttrNodesFromElement(); |
643 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); | 645 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); |
644 void detachAttrNodeAtIndex(Attr*, size_t index); | 646 void detachAttrNodeAtIndex(Attr*, size_t index); |
645 | 647 |
646 bool isJavaScriptURLAttribute(const Attribute&) const; | 648 bool isJavaScriptURLAttribute(const Attribute&) const; |
647 | 649 |
648 v8::Handle<v8::Object> wrapCustomElement(v8::Isolate*, v8::Handle<v8::Object > creationContext); | 650 v8::Handle<v8::Object> wrapCustomElement(v8::Isolate*, v8::Handle<v8::Object > creationContext); |
649 | 651 |
650 RefPtrWillBeMember<ElementData> m_elementData; | 652 RefPtrWillBeMember<ElementData> m_elementData; |
653 bool m_isTabStop; | |
hayato
2015/02/20 08:46:31
How about moving this to ElementRareData?
kochi
2015/02/20 09:43:05
Yes, I should have done...
Done.
| |
651 }; | 654 }; |
652 | 655 |
653 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); | 656 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); |
654 template <typename T> bool isElementOfType(const Node&); | 657 template <typename T> bool isElementOfType(const Node&); |
655 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } | 658 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } |
656 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } | 659 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } |
657 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } | 660 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } |
658 | 661 |
659 // Type casting. | 662 // Type casting. |
660 template<typename T> inline T& toElement(Node& node) | 663 template<typename T> inline T& toElement(Node& node) |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
879 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
880 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
881 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
882 { \ | 885 { \ |
883 return adoptRefWillBeNoop(new T(tagName, document)); \ | 886 return adoptRefWillBeNoop(new T(tagName, document)); \ |
884 } | 887 } |
885 | 888 |
886 } // namespace | 889 } // namespace |
887 | 890 |
888 #endif // Element_h | 891 #endif // Element_h |
OLD | NEW |