| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 virtual short tabIndex() const; | 409 virtual short tabIndex() const; |
| 410 | 410 |
| 411 virtual Node* focusDelegate(); | 411 virtual Node* focusDelegate(); |
| 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 enum UserSelectAllTreatment { | 419 bool isContentEditable() const; |
| 420 UserSelectAllDoesNotAffectEditability, | |
| 421 UserSelectAllIsAlwaysNonEditable | |
| 422 }; | |
| 423 bool isContentEditable(UserSelectAllTreatment = UserSelectAllDoesNotAffectEd
itability) const; | |
| 424 bool isContentRichlyEditable() const; | 420 bool isContentRichlyEditable() const; |
| 425 | 421 |
| 426 bool hasEditableStyle(EditableType editableType = ContentIsEditable, UserSel
ectAllTreatment treatment = UserSelectAllIsAlwaysNonEditable) const | 422 bool hasEditableStyle(EditableType editableType = ContentIsEditable) const |
| 427 { | 423 { |
| 428 switch (editableType) { | 424 switch (editableType) { |
| 429 case ContentIsEditable: | 425 case ContentIsEditable: |
| 430 return hasEditableStyle(Editable, treatment); | 426 return hasEditableStyle(Editable); |
| 431 case HasEditableAXRole: | 427 case HasEditableAXRole: |
| 432 return isEditableToAccessibility(Editable); | 428 return isEditableToAccessibility(Editable); |
| 433 } | 429 } |
| 434 ASSERT_NOT_REACHED(); | 430 ASSERT_NOT_REACHED(); |
| 435 return false; | 431 return false; |
| 436 } | 432 } |
| 437 | 433 |
| 438 bool layoutObjectIsRichlyEditable(EditableType editableType = ContentIsEdita
ble) const | 434 bool layoutObjectIsRichlyEditable(EditableType editableType = ContentIsEdita
ble) const |
| 439 { | 435 { |
| 440 switch (editableType) { | 436 switch (editableType) { |
| 441 case ContentIsEditable: | 437 case ContentIsEditable: |
| 442 return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEdit
able); | 438 return hasEditableStyle(RichlyEditable); |
| 443 case HasEditableAXRole: | 439 case HasEditableAXRole: |
| 444 return isEditableToAccessibility(RichlyEditable); | 440 return isEditableToAccessibility(RichlyEditable); |
| 445 } | 441 } |
| 446 ASSERT_NOT_REACHED(); | 442 ASSERT_NOT_REACHED(); |
| 447 return false; | 443 return false; |
| 448 } | 444 } |
| 449 | 445 |
| 450 virtual LayoutRect boundingBox() const; | 446 virtual LayoutRect boundingBox() const; |
| 451 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } | 447 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } |
| 452 | 448 |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // Gets nodeName without caching AtomicStrings. Used by | 790 // Gets nodeName without caching AtomicStrings. Used by |
| 795 // debugName. Compositor may call debugName from the "impl" thread | 791 // debugName. Compositor may call debugName from the "impl" thread |
| 796 // during "commit". The main thread is stopped at that time, but | 792 // during "commit". The main thread is stopped at that time, but |
| 797 // it is not safe to cache AtomicStrings because those are | 793 // it is not safe to cache AtomicStrings because those are |
| 798 // per-thread. | 794 // per-thread. |
| 799 virtual String debugNodeName() const; | 795 virtual String debugNodeName() const; |
| 800 | 796 |
| 801 void checkSlotChange(); | 797 void checkSlotChange(); |
| 802 | 798 |
| 803 enum EditableLevel { Editable, RichlyEditable }; | 799 enum EditableLevel { Editable, RichlyEditable }; |
| 804 bool hasEditableStyle(EditableLevel, UserSelectAllTreatment = UserSelectAllI
sAlwaysNonEditable) const; | 800 bool hasEditableStyle(EditableLevel) const; |
| 805 bool isEditableToAccessibility(EditableLevel) const; | 801 bool isEditableToAccessibility(EditableLevel) const; |
| 806 | 802 |
| 807 bool isUserActionElementActive() const; | 803 bool isUserActionElementActive() const; |
| 808 bool isUserActionElementInActiveChain() const; | 804 bool isUserActionElementInActiveChain() const; |
| 809 bool isUserActionElementHovered() const; | 805 bool isUserActionElementHovered() const; |
| 810 bool isUserActionElementFocused() const; | 806 bool isUserActionElementFocused() const; |
| 811 | 807 |
| 812 void recalcDistribution(); | 808 void recalcDistribution(); |
| 813 | 809 |
| 814 void setStyleChange(StyleChangeType); | 810 void setStyleChange(StyleChangeType); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 } // namespace blink | 918 } // namespace blink |
| 923 | 919 |
| 924 #ifndef NDEBUG | 920 #ifndef NDEBUG |
| 925 // Outside the WebCore namespace for ease of invocation from gdb. | 921 // Outside the WebCore namespace for ease of invocation from gdb. |
| 926 void showNode(const blink::Node*); | 922 void showNode(const blink::Node*); |
| 927 void showTree(const blink::Node*); | 923 void showTree(const blink::Node*); |
| 928 void showNodePath(const blink::Node*); | 924 void showNodePath(const blink::Node*); |
| 929 #endif | 925 #endif |
| 930 | 926 |
| 931 #endif // Node_h | 927 #endif // Node_h |
| OLD | NEW |