Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 2177783003: [Editing][DOM][CodeHealth] Move Node::*editable* functions to core/editing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 return node.isDocumentNode() || node.isShadowRoot(); 847 return node.isDocumentNode() || node.isShadowRoot();
848 } 848 }
849 849
850 // See the comment at the declaration of ScriptWrappable::fromNode in 850 // See the comment at the declaration of ScriptWrappable::fromNode in
851 // bindings/core/v8/ScriptWrappable.h about why this method is defined here. 851 // bindings/core/v8/ScriptWrappable.h about why this method is defined here.
852 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node) 852 inline ScriptWrappable* ScriptWrappable::fromNode(Node* node)
853 { 853 {
854 return node; 854 return node;
855 } 855 }
856 856
857 // TODO(yoichio): Move to core/editing
858 CORE_EXPORT bool isRootEditableElement(const Node&);
859 CORE_EXPORT Element* rootEditableElement(const Node&);
860 CORE_EXPORT Element* rootEditableElement(const Node&, EditableType);
861 CORE_EXPORT bool hasEditableStyle(const Node&, EditableType = ContentIsEditable) ;
862 CORE_EXPORT bool layoutObjectIsRichlyEditable(const Node&, EditableType = Conten tIsEditable);
863 CORE_EXPORT bool isContentEditable(const Node&);
864 CORE_EXPORT bool isContentRichlyEditable(const Node&);
865
866 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. 857 // Allow equality comparisons of Nodes by reference or pointer, interchangeably.
867 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node) 858 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES_REFCOUNTED(Node)
868 859
869 860
870 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ 861 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \
871 template<typename T> inline thisType* to##thisType(const RefPtr<T>& node) { return to##thisType(node.get()); } \ 862 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) 863 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate)
873 864
874 // This requires isClassName(const Node&). 865 // This requires isClassName(const Node&).
875 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ 866 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \
(...skipping 14 matching lines...) Expand all
890 } // namespace blink 881 } // namespace blink
891 882
892 #ifndef NDEBUG 883 #ifndef NDEBUG
893 // Outside the WebCore namespace for ease of invocation from gdb. 884 // Outside the WebCore namespace for ease of invocation from gdb.
894 void showNode(const blink::Node*); 885 void showNode(const blink::Node*);
895 void showTree(const blink::Node*); 886 void showTree(const blink::Node*);
896 void showNodePath(const blink::Node*); 887 void showNodePath(const blink::Node*);
897 #endif 888 #endif
898 889
899 #endif // Node_h 890 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698