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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 // Modifications to attributes that are not associated with an Element can't
invalidate NodeList caches. | 857 // Modifications to attributes that are not associated with an Element can't
invalidate NodeList caches. |
858 if (attrName && !attributeOwnerElement) | 858 if (attrName && !attributeOwnerElement) |
859 return; | 859 return; |
860 | 860 |
861 if (!document().shouldInvalidateNodeListCaches(attrName)) | 861 if (!document().shouldInvalidateNodeListCaches(attrName)) |
862 return; | 862 return; |
863 | 863 |
864 document().invalidateNodeListCaches(attrName); | 864 document().invalidateNodeListCaches(attrName); |
865 | 865 |
866 for (Node* node = this; node; node = node->parentNode()) { | 866 for (Node* node = this; node; node = node->parentNode()) { |
867 if (!node->hasRareData()) | 867 if (NodeListsNodeData* lists = node->nodeLists()) |
868 continue; | 868 lists->invalidateCaches(attrName); |
869 NodeRareData* data = node->rareData(); | |
870 if (data->nodeLists()) | |
871 data->nodeLists()->invalidateCaches(attrName); | |
872 } | 869 } |
873 } | 870 } |
874 | 871 |
875 NodeListsNodeData* Node::nodeLists() | 872 NodeListsNodeData* Node::nodeLists() |
876 { | 873 { |
877 return hasRareData() ? rareData()->nodeLists() : 0; | 874 return hasRareData() ? rareData()->nodeLists() : 0; |
878 } | 875 } |
879 | 876 |
880 void Node::clearNodeLists() | 877 void Node::clearNodeLists() |
881 { | 878 { |
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 node->showTreeForThis(); | 2578 node->showTreeForThis(); |
2582 } | 2579 } |
2583 | 2580 |
2584 void showNodePath(const WebCore::Node* node) | 2581 void showNodePath(const WebCore::Node* node) |
2585 { | 2582 { |
2586 if (node) | 2583 if (node) |
2587 node->showNodePathForThis(); | 2584 node->showNodePathForThis(); |
2588 } | 2585 } |
2589 | 2586 |
2590 #endif | 2587 #endif |
OLD | NEW |