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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 CORE_EXPORT bool hasEditableStyle(const Node&, EditableType = ContentIsEditable)
; | 861 CORE_EXPORT bool hasEditableStyle(const Node&, EditableType = ContentIsEditable)
; |
862 CORE_EXPORT bool layoutObjectIsRichlyEditable(const Node&, EditableType = Conten
tIsEditable); | 862 CORE_EXPORT bool layoutObjectIsRichlyEditable(const Node&, EditableType = Conten
tIsEditable); |
863 CORE_EXPORT bool isContentEditable(const Node&); | 863 CORE_EXPORT bool isContentEditable(const Node&); |
864 CORE_EXPORT bool isContentRichlyEditable(const Node&); | 864 CORE_EXPORT bool isContentRichlyEditable(const Node&); |
865 | 865 |
866 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. | 866 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. |
867 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node) | 867 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node) |
868 | 868 |
869 | 869 |
870 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ | 870 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ |
871 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) {
return to##thisType(node.get()); } \ | |
872 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate) | 871 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate) |
873 | 872 |
874 // This requires isClassName(const Node&). | 873 // This requires isClassName(const Node&). |
875 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ | 874 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ |
876 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) {
return to##thisType(node.get()); } \ | |
877 DEFINE_TYPE_CASTS(thisType, Node, node, is##thisType(*node), is##thisType(no
de)) | 875 DEFINE_TYPE_CASTS(thisType, Node, node, is##thisType(*node), is##thisType(no
de)) |
878 | 876 |
879 #define DECLARE_NODE_FACTORY(T) \ | 877 #define DECLARE_NODE_FACTORY(T) \ |
880 static T* create(Document&) | 878 static T* create(Document&) |
881 #define DEFINE_NODE_FACTORY(T) \ | 879 #define DEFINE_NODE_FACTORY(T) \ |
882 T* T::create(Document& document) \ | 880 T* T::create(Document& document) \ |
883 { \ | 881 { \ |
884 return new T(document); \ | 882 return new T(document); \ |
885 } | 883 } |
886 | 884 |
887 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node&); | 885 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node&); |
888 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node*); | 886 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node*); |
889 | 887 |
890 } // namespace blink | 888 } // namespace blink |
891 | 889 |
892 #ifndef NDEBUG | 890 #ifndef NDEBUG |
893 // Outside the WebCore namespace for ease of invocation from gdb. | 891 // Outside the WebCore namespace for ease of invocation from gdb. |
894 void showNode(const blink::Node*); | 892 void showNode(const blink::Node*); |
895 void showTree(const blink::Node*); | 893 void showTree(const blink::Node*); |
896 void showNodePath(const blink::Node*); | 894 void showNodePath(const blink::Node*); |
897 #endif | 895 #endif |
898 | 896 |
899 #endif // Node_h | 897 #endif // Node_h |
OLD | NEW |