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

Unified Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unintended exception message change Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Node.h
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index 6480869e830a5c78bf9f22314069481854dfc9de..0a58496b7ad25130929a3bf47f73f1dd89209620 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -135,36 +135,36 @@ class CORE_EXPORT Node : public EventTarget {
friend class TreeScopeAdopter;
public:
enum NodeType {
- ELEMENT_NODE = 1,
- ATTRIBUTE_NODE = 2,
- TEXT_NODE = 3,
- CDATA_SECTION_NODE = 4,
- PROCESSING_INSTRUCTION_NODE = 7,
- COMMENT_NODE = 8,
- DOCUMENT_NODE = 9,
- DOCUMENT_TYPE_NODE = 10,
- DOCUMENT_FRAGMENT_NODE = 11,
+ kElementNode = 1,
+ kAttributeNode = 2,
+ kTextNode = 3,
+ kCdataSectionNode = 4,
+ kProcessingInstructionNode = 7,
+ kCommentNode = 8,
+ kDocumentNode = 9,
+ kDocumentTypeNode = 10,
+ kDocumentFragmentNode = 11,
};
// Entity, EntityReference, Notation, and XPathNamespace nodes are impossible to create in Blink.
// But for compatibility reasons we want these enum values exist in JS, and this enum makes the bindings
- // generation not complain about ENTITY_REFERENCE_NODE being missing from the implementation
+ // generation not complain about kEntityReferenceNode being missing from the implementation
// while not requiring all switch(NodeType) blocks to include this deprecated constant.
enum DeprecatedNodeType {
- ENTITY_REFERENCE_NODE = 5,
- ENTITY_NODE = 6,
- NOTATION_NODE = 12,
+ kEntityReferenceNode = 5,
+ kEntityNode = 6,
+ kNotationNode = 12,
XPATH_NAMESPACE_NODE = 13,
tkent 2016/07/27 03:23:47 Can we remove XPATH_NAMESPACE_NODE?
iclelland 2016/07/27 14:07:06 I think so -- I don't see any reason at all to kee
};
enum DocumentPosition {
DOCUMENT_POSITION_EQUIVALENT = 0x00,
tkent 2016/07/27 03:23:47 Rename this to kDocumentPositionEquivalent for con
iclelland 2016/07/27 14:07:06 Done.
- DOCUMENT_POSITION_DISCONNECTED = 0x01,
- DOCUMENT_POSITION_PRECEDING = 0x02,
- DOCUMENT_POSITION_FOLLOWING = 0x04,
- DOCUMENT_POSITION_CONTAINS = 0x08,
- DOCUMENT_POSITION_CONTAINED_BY = 0x10,
- DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
+ kDocumentPositionDisconnected = 0x01,
+ kDocumentPositionPreceding = 0x02,
+ kDocumentPositionFollowing = 0x04,
+ kDocumentPositionContains = 0x08,
+ kDocumentPositionContainedBy = 0x10,
+ kDocumentPositionImplementationSpecific = 0x20,
};
// Override operator new to allocate Node subtype objects onto
@@ -462,7 +462,7 @@ public:
bool isChildOfV0ShadowHost() const;
ShadowRoot* v1ShadowRootOfParent() const;
- bool isDocumentTypeNode() const { return getNodeType() == DOCUMENT_TYPE_NODE; }
+ bool isDocumentTypeNode() const { return getNodeType() == kDocumentTypeNode; }
virtual bool childTypeAllowed(NodeType) const { return false; }
unsigned countChildren() const;

Powered by Google App Engine
This is Rietveld 408576698