| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 3 * Copyright (C) 2007 Apple Inc. | 3 * Copyright (C) 2007 Apple Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 void PrintContext::collectLinkedDestinations(Node* node) | 266 void PrintContext::collectLinkedDestinations(Node* node) |
| 267 { | 267 { |
| 268 for (Node* i = node->firstChild(); i; i = i->nextSibling()) | 268 for (Node* i = node->firstChild(); i; i = i->nextSibling()) |
| 269 collectLinkedDestinations(i); | 269 collectLinkedDestinations(i); |
| 270 | 270 |
| 271 if (!node->isLink() || !node->isElementNode()) | 271 if (!node->isLink() || !node->isElementNode()) |
| 272 return; | 272 return; |
| 273 const AtomicString& href = toElement(node)->getAttribute(HTMLNames::hrefAttr
); | 273 const AtomicString& href = toElement(node)->getAttribute(HTMLNames::hrefAttr
); |
| 274 if (href.isNull()) | 274 if (href.isNull()) |
| 275 return; | 275 return; |
| 276 KURL url = node->document().completeURL(href); | 276 KURL url = node->treeScope().completeURL(href); |
| 277 if (!url.isValid()) | 277 if (!url.isValid()) |
| 278 return; | 278 return; |
| 279 if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, node
->document().baseURL())) { | 279 if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, node
->treeScope().baseURL())) { |
| 280 String name = url.fragmentIdentifier(); | 280 String name = url.fragmentIdentifier(); |
| 281 Element* element = node->document().findAnchor(name); | 281 Element* element = node->document().findAnchor(name); |
| 282 if (element) | 282 if (element) |
| 283 m_linkedDestinations.set(name, element); | 283 m_linkedDestinations.set(name, element); |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 void PrintContext::outputLinkedDestinations(GraphicsContext& graphicsContext, No
de* node, const IntRect& pageRect) | 287 void PrintContext::outputLinkedDestinations(GraphicsContext& graphicsContext, No
de* node, const IntRect& pageRect) |
| 288 { | 288 { |
| 289 if (!m_linkedDestinationsValid) { | 289 if (!m_linkedDestinationsValid) { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 printContext.spoolPage(graphicsContext, pageIndex, pageWidth); | 401 printContext.spoolPage(graphicsContext, pageIndex, pageWidth); |
| 402 graphicsContext.restore(); | 402 graphicsContext.restore(); |
| 403 | 403 |
| 404 currentHeight += pageSizeInPixels.height() + 1; | 404 currentHeight += pageSizeInPixels.height() + 1; |
| 405 } | 405 } |
| 406 | 406 |
| 407 graphicsContext.restore(); | 407 graphicsContext.restore(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } | 410 } |
| OLD | NEW |