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

Unified Diff: Source/core/dom/ContainerNode.h

Issue 674553002: Move parts of core/dom to C++11 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make Windows shut up when I just try following the style guide Created 6 years, 2 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
« no previous file with comments | « Source/core/dom/AttributeCollection.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index 6026c7a1adec4b94d432c390fc5490c8d7fd08f3..6522a89b8e564fe6e74dfc2a01dac29df3e85c4f 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -37,7 +37,7 @@ class ExceptionState;
class FloatPoint;
class HTMLCollection;
template <typename NodeType> class StaticNodeTypeList;
-typedef StaticNodeTypeList<Element> StaticElementList;
+using StaticElementList = StaticNodeTypeList<Element>;
class TagCollection;
enum DynamicRestyleFlags {
@@ -59,7 +59,7 @@ enum DynamicRestyleFlags {
// for a Node Vector that is used to store child Nodes of a given Node.
// FIXME: Optimize the value.
const int initialNodeVectorSize = 11;
-typedef WillBeHeapVector<RefPtrWillBeMember<Node>, initialNodeVectorSize> NodeVector;
+using NodeVector = WillBeHeapVector<RefPtrWillBeMember<Node>, initialNodeVectorSize>;
class ContainerNode : public Node {
public:
@@ -203,7 +203,7 @@ public:
protected:
ContainerNode(TreeScope*, ConstructionType = CreateContainer);
- void invalidateNodeListCachesInAncestors(const QualifiedName* attrName = 0, Element* attributeOwnerElement = 0);
+ void invalidateNodeListCachesInAncestors(const QualifiedName* attrName = nullptr, Element* attributeOwnerElement = nullptr);
#if !ENABLE(OILPAN)
void removeDetachedChildren();
@@ -283,7 +283,7 @@ inline ContainerNode::ContainerNode(TreeScope* treeScope, ConstructionType type)
inline void ContainerNode::attachChildren(const AttachContext& context)
{
AttachContext childrenContext(context);
- childrenContext.resolvedStyle = 0;
+ childrenContext.resolvedStyle = nullptr;
for (Node* child = firstChild(); child; child = child->nextSibling()) {
ASSERT(child->needsAttach() || childAttachedAllowedWhenAttachingChildren(this));
@@ -295,7 +295,7 @@ inline void ContainerNode::attachChildren(const AttachContext& context)
inline void ContainerNode::detachChildren(const AttachContext& context)
{
AttachContext childrenContext(context);
- childrenContext.resolvedStyle = 0;
+ childrenContext.resolvedStyle = nullptr;
for (Node* child = firstChild(); child; child = child->nextSibling())
child->detach(childrenContext);
@@ -311,27 +311,27 @@ inline unsigned Node::countChildren() const
inline Node* Node::firstChild() const
{
if (!isContainerNode())
- return 0;
+ return nullptr;
return toContainerNode(this)->firstChild();
}
inline Node* Node::lastChild() const
{
if (!isContainerNode())
- return 0;
+ return nullptr;
return toContainerNode(this)->lastChild();
}
inline ContainerNode* Node::parentElementOrShadowRoot() const
{
ContainerNode* parent = parentNode();
- return parent && (parent->isElementNode() || parent->isShadowRoot()) ? parent : 0;
+ return parent && (parent->isElementNode() || parent->isShadowRoot()) ? parent : nullptr;
}
inline ContainerNode* Node::parentElementOrDocumentFragment() const
{
ContainerNode* parent = parentNode();
- return parent && (parent->isElementNode() || parent->isDocumentFragment()) ? parent : 0;
+ return parent && (parent->isElementNode() || parent->isDocumentFragment()) ? parent : nullptr;
}
inline bool Node::isTreeScope() const
« no previous file with comments | « Source/core/dom/AttributeCollection.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698