| 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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 return body; | 1352 return body; |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 return documentElement(); | 1355 return documentElement(); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 return body(); | 1358 return body(); |
| 1359 } | 1359 } |
| 1360 | 1360 |
| 1361 // We use HashMap::set over HashMap::add here as we want to | 1361 // We use HashMap::set over HashMap::add here as we want to |
| 1362 // replace the ComputedStyle but not the Element if the Element is | 1362 // replace the ComputedStyle but not the Node if the Node is |
| 1363 // already present. | 1363 // already present. |
| 1364 void Document::addStyleReattachData(Element& element, | 1364 void Document::addStyleReattachData(Node& node, |
| 1365 StyleReattachData& styleReattachData) { | 1365 StyleReattachData& styleReattachData) { |
| 1366 m_styleReattachDataMap.set(&element, styleReattachData); | 1366 DCHECK(node.isElementNode() || node.isTextNode()); |
| 1367 m_styleReattachDataMap.set(&node, styleReattachData); |
| 1367 } | 1368 } |
| 1368 | 1369 |
| 1369 StyleReattachData Document::getStyleReattachData(Element& element) { | 1370 StyleReattachData Document::getStyleReattachData(Node& node) { |
| 1370 return m_styleReattachDataMap.get(&element); | 1371 return m_styleReattachDataMap.get(&node); |
| 1371 } | 1372 } |
| 1372 | 1373 |
| 1373 /* | 1374 /* |
| 1374 * Performs three operations: | 1375 * Performs three operations: |
| 1375 * 1. Convert control characters to spaces | 1376 * 1. Convert control characters to spaces |
| 1376 * 2. Trim leading and trailing spaces | 1377 * 2. Trim leading and trailing spaces |
| 1377 * 3. Collapse internal whitespace. | 1378 * 3. Collapse internal whitespace. |
| 1378 */ | 1379 */ |
| 1379 template <typename CharacterType> | 1380 template <typename CharacterType> |
| 1380 static inline String canonicalizedTitle(Document* document, | 1381 static inline String canonicalizedTitle(Document* document, |
| (...skipping 5200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6581 } | 6582 } |
| 6582 | 6583 |
| 6583 void showLiveDocumentInstances() { | 6584 void showLiveDocumentInstances() { |
| 6584 WeakDocumentSet& set = liveDocumentSet(); | 6585 WeakDocumentSet& set = liveDocumentSet(); |
| 6585 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6586 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6586 for (Document* document : set) | 6587 for (Document* document : set) |
| 6587 fprintf(stderr, "- Document %p URL: %s\n", document, | 6588 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6588 document->url().getString().utf8().data()); | 6589 document->url().getString().utf8().data()); |
| 6589 } | 6590 } |
| 6590 #endif | 6591 #endif |
| OLD | NEW |