| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 // This is called only when the node is focused. | 412 // This is called only when the node is focused. |
| 413 virtual bool shouldHaveFocusAppearance() const; | 413 virtual bool shouldHaveFocusAppearance() const; |
| 414 | 414 |
| 415 // Whether the node is inert. This can't be in Element because text nodes | 415 // Whether the node is inert. This can't be in Element because text nodes |
| 416 // must be recognized as inert to prevent text selection. | 416 // must be recognized as inert to prevent text selection. |
| 417 bool isInert() const; | 417 bool isInert() const; |
| 418 | 418 |
| 419 bool isContentEditable() const; | 419 bool isContentEditable() const; |
| 420 bool isContentRichlyEditable() const; | 420 bool isContentRichlyEditable() const; |
| 421 | 421 |
| 422 bool hasEditableStyle(EditableType editableType = ContentIsEditable) const | 422 bool hasEditableStyle(EditableType = ContentIsEditable) const; |
| 423 { | 423 bool layoutObjectIsRichlyEditable(EditableType = ContentIsEditable) const; |
| 424 switch (editableType) { | |
| 425 case ContentIsEditable: | |
| 426 return hasEditableStyle(Editable); | |
| 427 case HasEditableAXRole: | |
| 428 return isEditableToAccessibility(Editable); | |
| 429 } | |
| 430 ASSERT_NOT_REACHED(); | |
| 431 return false; | |
| 432 } | |
| 433 | |
| 434 bool layoutObjectIsRichlyEditable(EditableType editableType = ContentIsEdita
ble) const | |
| 435 { | |
| 436 switch (editableType) { | |
| 437 case ContentIsEditable: | |
| 438 return hasEditableStyle(RichlyEditable); | |
| 439 case HasEditableAXRole: | |
| 440 return isEditableToAccessibility(RichlyEditable); | |
| 441 } | |
| 442 ASSERT_NOT_REACHED(); | |
| 443 return false; | |
| 444 } | |
| 445 | 424 |
| 446 virtual LayoutRect boundingBox() const; | 425 virtual LayoutRect boundingBox() const; |
| 447 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } | 426 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } |
| 448 | 427 |
| 449 unsigned nodeIndex() const; | 428 unsigned nodeIndex() const; |
| 450 | 429 |
| 451 // Returns the DOM ownerDocument attribute. This method never returns null,
except in the case | 430 // Returns the DOM ownerDocument attribute. This method never returns null,
except in the case |
| 452 // of a Document node. | 431 // of a Document node. |
| 453 Document* ownerDocument() const; | 432 Document* ownerDocument() const; |
| 454 | 433 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 private: | 767 private: |
| 789 // Gets nodeName without caching AtomicStrings. Used by | 768 // Gets nodeName without caching AtomicStrings. Used by |
| 790 // debugName. Compositor may call debugName from the "impl" thread | 769 // debugName. Compositor may call debugName from the "impl" thread |
| 791 // during "commit". The main thread is stopped at that time, but | 770 // during "commit". The main thread is stopped at that time, but |
| 792 // it is not safe to cache AtomicStrings because those are | 771 // it is not safe to cache AtomicStrings because those are |
| 793 // per-thread. | 772 // per-thread. |
| 794 virtual String debugNodeName() const; | 773 virtual String debugNodeName() const; |
| 795 | 774 |
| 796 void checkSlotChange(); | 775 void checkSlotChange(); |
| 797 | 776 |
| 798 enum EditableLevel { Editable, RichlyEditable }; | |
| 799 bool hasEditableStyle(EditableLevel) const; | |
| 800 bool isEditableToAccessibility(EditableLevel) const; | |
| 801 | |
| 802 bool isUserActionElementActive() const; | 777 bool isUserActionElementActive() const; |
| 803 bool isUserActionElementInActiveChain() const; | 778 bool isUserActionElementInActiveChain() const; |
| 804 bool isUserActionElementHovered() const; | 779 bool isUserActionElementHovered() const; |
| 805 bool isUserActionElementFocused() const; | 780 bool isUserActionElementFocused() const; |
| 806 | 781 |
| 807 void recalcDistribution(); | 782 void recalcDistribution(); |
| 808 | 783 |
| 809 void setStyleChange(StyleChangeType); | 784 void setStyleChange(StyleChangeType); |
| 810 | 785 |
| 811 virtual ComputedStyle* nonLayoutObjectComputedStyle() const { return nullptr
; } | 786 virtual ComputedStyle* nonLayoutObjectComputedStyle() const { return nullptr
; } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 } // namespace blink | 892 } // namespace blink |
| 918 | 893 |
| 919 #ifndef NDEBUG | 894 #ifndef NDEBUG |
| 920 // Outside the WebCore namespace for ease of invocation from gdb. | 895 // Outside the WebCore namespace for ease of invocation from gdb. |
| 921 void showNode(const blink::Node*); | 896 void showNode(const blink::Node*); |
| 922 void showTree(const blink::Node*); | 897 void showTree(const blink::Node*); |
| 923 void showNodePath(const blink::Node*); | 898 void showNodePath(const blink::Node*); |
| 924 #endif | 899 #endif |
| 925 | 900 |
| 926 #endif // Node_h | 901 #endif // Node_h |
| OLD | NEW |