| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 { | 511 { |
| 512 updateDistribution(); | 512 updateDistribution(); |
| 513 | 513 |
| 514 // Go through the subtree beneath us, normalizing all nodes. This means that | 514 // Go through the subtree beneath us, normalizing all nodes. This means that |
| 515 // any two adjacent text nodes are merged and any empty text nodes are remov
ed. | 515 // any two adjacent text nodes are merged and any empty text nodes are remov
ed. |
| 516 | 516 |
| 517 RefPtrWillBeRawPtr<Node> node = this; | 517 RefPtrWillBeRawPtr<Node> node = this; |
| 518 while (Node* firstChild = node->firstChild()) | 518 while (Node* firstChild = node->firstChild()) |
| 519 node = firstChild; | 519 node = firstChild; |
| 520 while (node) { | 520 while (node) { |
| 521 if (node->isElementNode()) | |
| 522 toElement(node)->normalizeAttributes(); | |
| 523 | |
| 524 if (node == this) | 521 if (node == this) |
| 525 break; | 522 break; |
| 526 | 523 |
| 527 if (node->nodeType() == TEXT_NODE) | 524 if (node->nodeType() == TEXT_NODE) |
| 528 node = toText(node)->mergeNextSiblingNodesIfPossible(); | 525 node = toText(node)->mergeNextSiblingNodesIfPossible(); |
| 529 else | 526 else |
| 530 node = NodeTraversal::nextPostOrder(*node); | 527 node = NodeTraversal::nextPostOrder(*node); |
| 531 } | 528 } |
| 532 } | 529 } |
| 533 | 530 |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 | 2502 |
| 2506 void showNodePath(const blink::Node* node) | 2503 void showNodePath(const blink::Node* node) |
| 2507 { | 2504 { |
| 2508 if (node) | 2505 if (node) |
| 2509 node->showNodePathForThis(); | 2506 node->showNodePathForThis(); |
| 2510 else | 2507 else |
| 2511 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2508 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2512 } | 2509 } |
| 2513 | 2510 |
| 2514 #endif | 2511 #endif |
| OLD | NEW |