OLD | NEW |
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 printf(" Number of Attributes (non-Node and Node): %zu [%zu]\n", attributes
, sizeof(Attribute)); | 257 printf(" Number of Attributes (non-Node and Node): %zu [%zu]\n", attributes
, sizeof(Attribute)); |
258 printf(" Number of Attributes with an Attr: %zu\n", attributesWithAttr); | 258 printf(" Number of Attributes with an Attr: %zu\n", attributesWithAttr); |
259 printf(" Number of Elements with attribute storage: %zu [%zu]\n", elementsW
ithAttributeStorage, sizeof(ElementData)); | 259 printf(" Number of Elements with attribute storage: %zu [%zu]\n", elementsW
ithAttributeStorage, sizeof(ElementData)); |
260 printf(" Number of Elements with RareData: %zu\n", elementsWithRareData); | 260 printf(" Number of Elements with RareData: %zu\n", elementsWithRareData); |
261 printf(" Number of Elements with NamedNodeMap: %zu [%zu]\n", elementsWithNa
medNodeMap, sizeof(NamedNodeMap)); | 261 printf(" Number of Elements with NamedNodeMap: %zu [%zu]\n", elementsWithNa
medNodeMap, sizeof(NamedNodeMap)); |
262 #endif | 262 #endif |
263 } | 263 } |
264 | 264 |
265 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, nodeCounter, ("WebCoreNode"
)); | 265 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, nodeCounter, ("WebCoreNode"
)); |
266 | 266 |
267 Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2, Docum
ent* doc) | 267 Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2, const
Document& doc) |
268 { | 268 { |
269 StyleChange ch = NoInherit; | 269 StyleChange ch = NoInherit; |
270 EDisplay display1 = s1 ? s1->display() : NONE; | 270 EDisplay display1 = s1 ? s1->display() : NONE; |
271 bool fl1 = s1 && s1->hasPseudoStyle(FIRST_LETTER); | 271 bool fl1 = s1 && s1->hasPseudoStyle(FIRST_LETTER); |
272 EDisplay display2 = s2 ? s2->display() : NONE; | 272 EDisplay display2 = s2 ? s2->display() : NONE; |
273 bool fl2 = s2 && s2->hasPseudoStyle(FIRST_LETTER); | 273 bool fl2 = s2 && s2->hasPseudoStyle(FIRST_LETTER); |
274 | 274 |
275 // We just detach if a renderer acquires or loses a column-span, since spann
ing elements | 275 // We just detach if a renderer acquires or loses a column-span, since spann
ing elements |
276 // typically won't contain much content. | 276 // typically won't contain much content. |
277 bool colSpan1 = s1 && s1->columnSpan(); | 277 bool colSpan1 = s1 && s1->columnSpan(); |
278 bool colSpan2 = s2 && s2->columnSpan(); | 278 bool colSpan2 = s2 && s2->columnSpan(); |
279 | 279 |
280 bool specifiesColumns1 = s1 && (!s1->hasAutoColumnCount() || !s1->hasAutoCol
umnWidth()); | 280 bool specifiesColumns1 = s1 && (!s1->hasAutoColumnCount() || !s1->hasAutoCol
umnWidth()); |
281 bool specifiesColumns2 = s2 && (!s2->hasAutoColumnCount() || !s2->hasAutoCol
umnWidth()); | 281 bool specifiesColumns2 = s2 && (!s2->hasAutoColumnCount() || !s2->hasAutoCol
umnWidth()); |
282 | 282 |
283 if (display1 != display2 || fl1 != fl2 || colSpan1 != colSpan2 | 283 if (display1 != display2 || fl1 != fl2 || colSpan1 != colSpan2 |
284 || (specifiesColumns1 != specifiesColumns2 && doc->settings()->regionBas
edColumnsEnabled()) | 284 || (specifiesColumns1 != specifiesColumns2 && doc.settings()->regionBase
dColumnsEnabled()) |
285 || (s1 && s2 && !s1->contentDataEquivalent(s2))) | 285 || (s1 && s2 && !s1->contentDataEquivalent(s2))) |
286 ch = Reattach; | 286 ch = Reattach; |
287 else if (!s1 || !s2) | 287 else if (!s1 || !s2) |
288 ch = Inherit; | 288 ch = Inherit; |
289 else if (*s1 == *s2) | 289 else if (*s1 == *s2) |
290 ch = NoChange; | 290 ch = NoChange; |
291 else if (s1->inheritedNotEqual(s2)) | 291 else if (s1->inheritedNotEqual(s2)) |
292 ch = Inherit; | 292 ch = Inherit; |
293 else if (s1->hasExplicitlyInheritedProperties() || s2->hasExplicitlyInherite
dProperties()) | 293 else if (s1->hasExplicitlyInheritedProperties() || s2->hasExplicitlyInherite
dProperties()) |
294 ch = Inherit; | 294 ch = Inherit; |
(...skipping 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 node->showTreeForThis(); | 2765 node->showTreeForThis(); |
2766 } | 2766 } |
2767 | 2767 |
2768 void showNodePath(const WebCore::Node* node) | 2768 void showNodePath(const WebCore::Node* node) |
2769 { | 2769 { |
2770 if (node) | 2770 if (node) |
2771 node->showNodePathForThis(); | 2771 node->showNodePathForThis(); |
2772 } | 2772 } |
2773 | 2773 |
2774 #endif | 2774 #endif |
OLD | NEW |