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

Unified Diff: Source/core/dom/EmptyNodeList.cpp

Issue 132923003: Make sure the rootNode of a LiveNodeListBase is always a ContainerNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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/EmptyNodeList.h ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/EmptyNodeList.cpp
diff --git a/Source/core/dom/NodeRareData.cpp b/Source/core/dom/EmptyNodeList.cpp
similarity index 85%
copy from Source/core/dom/NodeRareData.cpp
copy to Source/core/dom/EmptyNodeList.cpp
index bbd863e8c68dd43aea889b838647899689b3a949..5f731886dccce6b77d27d759b90fe2f74d69bfbd 100644
--- a/Source/core/dom/NodeRareData.cpp
+++ b/Source/core/dom/EmptyNodeList.cpp
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,15 +30,16 @@
*/
#include "config.h"
+#include "EmptyNodeList.h"
+
+#include "core/dom/Node.h"
#include "core/dom/NodeRareData.h"
namespace WebCore {
-struct SameSizeAsNodeRareData {
- unsigned m_bitfields : 20;
- void* m_pointer[3];
-};
-
-COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+EmptyNodeList::~EmptyNodeList()
+{
+ m_owner->nodeLists()->removeEmptyChildNodeList(this);
+}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/EmptyNodeList.h ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698