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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual bool isKeyboardFocusable() const; | 377 virtual bool isKeyboardFocusable() const; |
378 virtual bool isMouseFocusable() const; | 378 virtual bool isMouseFocusable() const; |
379 virtual void willCallDefaultEventHandler(const Event&) OVERRIDE FINAL; | |
380 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType); | 379 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType); |
381 virtual void dispatchBlurEvent(Element* newFocusedElement); | 380 virtual void dispatchBlurEvent(Element* newFocusedElement); |
382 void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocused
Element); | 381 void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocused
Element); |
383 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); | 382 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); |
384 | 383 |
385 String innerText(); | 384 String innerText(); |
386 String outerText(); | 385 String outerText(); |
387 String innerHTML() const; | 386 String innerHTML() const; |
388 String outerHTML() const; | 387 String outerHTML() const; |
389 void setInnerHTML(const String&, ExceptionState&); | 388 void setInnerHTML(const String&, ExceptionState&); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 526 |
528 void clearTabIndexExplicitlyIfNeeded(); | 527 void clearTabIndexExplicitlyIfNeeded(); |
529 void setTabIndexExplicitly(short); | 528 void setTabIndexExplicitly(short); |
530 // Subclasses may override this method to affect focusability. Unlike | 529 // Subclasses may override this method to affect focusability. Unlike |
531 // supportsFocus, this method must be called on an up-to-date layout, so it | 530 // supportsFocus, this method must be called on an up-to-date layout, so it |
532 // may use the renderer to reason about focusability. This method cannot be | 531 // may use the renderer to reason about focusability. This method cannot be |
533 // moved to RenderObject because some focusable nodes don't have renderers, | 532 // moved to RenderObject because some focusable nodes don't have renderers, |
534 // e.g., HTMLOptionElement. | 533 // e.g., HTMLOptionElement. |
535 virtual bool rendererIsFocusable() const; | 534 virtual bool rendererIsFocusable() const; |
536 | 535 |
537 // These methods are overridden by subclasses whose default focus appearance
should not remain hidden on mouse focus. | |
538 virtual bool wasFocusedByMouse() const { return false; } | |
539 virtual void setWasFocusedByMouse(bool) { } | |
540 | |
541 // classAttributeChanged() exists to share code between | 536 // classAttributeChanged() exists to share code between |
542 // parseAttribute (called via setAttribute()) and | 537 // parseAttribute (called via setAttribute()) and |
543 // svgAttributeChanged (called when element.className.baseValue is set) | 538 // svgAttributeChanged (called when element.className.baseValue is set) |
544 void classAttributeChanged(const AtomicString& newClassString); | 539 void classAttributeChanged(const AtomicString& newClassString); |
545 | 540 |
546 PassRefPtr<RenderStyle> originalStyleForRenderer(); | 541 PassRefPtr<RenderStyle> originalStyleForRenderer(); |
547 | 542 |
548 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); | 543 Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&); |
549 | 544 |
550 private: | 545 private: |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 863 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
869 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 864 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
870 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 865 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
871 { \ | 866 { \ |
872 return adoptRefWillBeNoop(new T(tagName, document)); \ | 867 return adoptRefWillBeNoop(new T(tagName, document)); \ |
873 } | 868 } |
874 | 869 |
875 } // namespace | 870 } // namespace |
876 | 871 |
877 #endif // Element_h | 872 #endif // Element_h |
OLD | NEW |