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

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

Issue 2099183003: Fix DUMP_NODE_STATISTICS compilation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 switch (node->getNodeType()) { 157 switch (node->getNodeType()) {
158 case ELEMENT_NODE: { 158 case ELEMENT_NODE: {
159 ++elementNodes; 159 ++elementNodes;
160 160
161 // Tag stats 161 // Tag stats
162 Element* element = toElement(node); 162 Element* element = toElement(node);
163 HashMap<String, size_t>::AddResult result = perTagCount.add(elem ent->tagName(), 1); 163 HashMap<String, size_t>::AddResult result = perTagCount.add(elem ent->tagName(), 1);
164 if (!result.isNewEntry) 164 if (!result.isNewEntry)
165 result.storedValue->value++; 165 result.storedValue->value++;
166 166
167 if (const ElementData* elementData = element->elementData()) { 167 size_t attributeCount = element->attributesWithoutUpdate().size( );
168 attributes += elementData->attributes().size(); 168 if (attributeCount) {
169 attributes += attributeCount;
169 ++elementsWithAttributeStorage; 170 ++elementsWithAttributeStorage;
170 } 171 }
171 break; 172 break;
172 } 173 }
173 case ATTRIBUTE_NODE: { 174 case ATTRIBUTE_NODE: {
174 ++attrNodes; 175 ++attrNodes;
175 break; 176 break;
176 } 177 }
177 case TEXT_NODE: { 178 case TEXT_NODE: {
178 ++textNodes; 179 ++textNodes;
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 2482
2482 void showNodePath(const blink::Node* node) 2483 void showNodePath(const blink::Node* node)
2483 { 2484 {
2484 if (node) 2485 if (node)
2485 node->showNodePathForThis(); 2486 node->showNodePathForThis();
2486 else 2487 else
2487 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2488 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2488 } 2489 }
2489 2490
2490 #endif 2491 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698