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 = ContentIsEditable) const; | |
423 bool layoutObjectIsRichlyEditable(EditableType = ContentIsEditable) const; | |
424 | |
425 virtual LayoutRect boundingBox() const; | 422 virtual LayoutRect boundingBox() const; |
426 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } | 423 IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundin
gBox()); } |
427 | 424 |
428 unsigned nodeIndex() const; | 425 unsigned nodeIndex() const; |
429 | 426 |
430 // Returns the DOM ownerDocument attribute. This method never returns null,
except in the case | 427 // Returns the DOM ownerDocument attribute. This method never returns null,
except in the case |
431 // of a Document node. | 428 // of a Document node. |
432 Document* ownerDocument() const; | 429 Document* ownerDocument() const; |
433 | 430 |
434 // Returns the document associated with this node. A Document node returns i
tself. | 431 // Returns the document associated with this node. A Document node returns i
tself. |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 // bindings/core/v8/ScriptWrappable.h about why this method is defined here. | 854 // bindings/core/v8/ScriptWrappable.h about why this method is defined here. |
858 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node) | 855 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node) |
859 { | 856 { |
860 return node; | 857 return node; |
861 } | 858 } |
862 | 859 |
863 // TODO(yoichio): Move to core/editing | 860 // TODO(yoichio): Move to core/editing |
864 CORE_EXPORT bool isRootEditableElement(const Node&); | 861 CORE_EXPORT bool isRootEditableElement(const Node&); |
865 CORE_EXPORT Element* rootEditableElement(const Node&); | 862 CORE_EXPORT Element* rootEditableElement(const Node&); |
866 CORE_EXPORT Element* rootEditableElement(const Node&, EditableType); | 863 CORE_EXPORT Element* rootEditableElement(const Node&, EditableType); |
| 864 CORE_EXPORT bool hasEditableStyle(const Node&, EditableType = ContentIsEditable)
; |
| 865 CORE_EXPORT bool layoutObjectIsRichlyEditable(const Node&, EditableType = Conten
tIsEditable); |
867 | 866 |
868 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. | 867 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
869 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node) | 868 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node) |
870 | 869 |
871 | 870 |
872 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ | 871 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ |
873 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) {
return to##thisType(node.get()); } \ | 872 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) {
return to##thisType(node.get()); } \ |
874 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate) | 873 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate) |
875 | 874 |
876 // This requires isClassName(const Node&). | 875 // This requires isClassName(const Node&). |
(...skipping 15 matching lines...) Expand all Loading... |
892 } // namespace blink | 891 } // namespace blink |
893 | 892 |
894 #ifndef NDEBUG | 893 #ifndef NDEBUG |
895 // Outside the WebCore namespace for ease of invocation from gdb. | 894 // Outside the WebCore namespace for ease of invocation from gdb. |
896 void showNode(const blink::Node*); | 895 void showNode(const blink::Node*); |
897 void showTree(const blink::Node*); | 896 void showTree(const blink::Node*); |
898 void showNodePath(const blink::Node*); | 897 void showNodePath(const blink::Node*); |
899 #endif | 898 #endif |
900 | 899 |
901 #endif // Node_h | 900 #endif // Node_h |
OLD | NEW |