| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 if (m_innerNonSharedNode->hasTagName(embedTag) | 297 if (m_innerNonSharedNode->hasTagName(embedTag) |
| 298 || m_innerNonSharedNode->hasTagName(imgTag) | 298 || m_innerNonSharedNode->hasTagName(imgTag) |
| 299 || m_innerNonSharedNode->hasTagName(inputTag) | 299 || m_innerNonSharedNode->hasTagName(inputTag) |
| 300 || m_innerNonSharedNode->hasTagName(objectTag) | 300 || m_innerNonSharedNode->hasTagName(objectTag) |
| 301 || m_innerNonSharedNode->hasTagName(SVGNames::imageTag) | 301 || m_innerNonSharedNode->hasTagName(SVGNames::imageTag) |
| 302 ) { | 302 ) { |
| 303 urlString = toElement(m_innerNonSharedNode)->imageSourceURL(); | 303 urlString = toElement(m_innerNonSharedNode)->imageSourceURL(); |
| 304 } else | 304 } else |
| 305 return KURL(); | 305 return KURL(); |
| 306 | 306 |
| 307 return m_innerNonSharedNode->document().completeURL(stripLeadingAndTrailingH
TMLSpaces(urlString)); | 307 return m_innerNonSharedNode->treeScope().completeURL(stripLeadingAndTrailing
HTMLSpaces(urlString)); |
| 308 } | 308 } |
| 309 | 309 |
| 310 KURL HitTestResult::absoluteMediaURL() const | 310 KURL HitTestResult::absoluteMediaURL() const |
| 311 { | 311 { |
| 312 if (HTMLMediaElement* mediaElt = mediaElement()) | 312 if (HTMLMediaElement* mediaElt = mediaElement()) |
| 313 return mediaElt->currentSrc(); | 313 return mediaElt->currentSrc(); |
| 314 return KURL(); | 314 return KURL(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 HTMLMediaElement* HitTestResult::mediaElement() const | 317 HTMLMediaElement* HitTestResult::mediaElement() const |
| (...skipping 15 matching lines...) Expand all Loading... |
| 333 return KURL(); | 333 return KURL(); |
| 334 | 334 |
| 335 AtomicString urlString; | 335 AtomicString urlString; |
| 336 if (m_innerURLElement->hasTagName(aTag) || m_innerURLElement->hasTagName(are
aTag) || m_innerURLElement->hasTagName(linkTag)) | 336 if (m_innerURLElement->hasTagName(aTag) || m_innerURLElement->hasTagName(are
aTag) || m_innerURLElement->hasTagName(linkTag)) |
| 337 urlString = m_innerURLElement->getAttribute(hrefAttr); | 337 urlString = m_innerURLElement->getAttribute(hrefAttr); |
| 338 else if (m_innerURLElement->hasTagName(SVGNames::aTag)) | 338 else if (m_innerURLElement->hasTagName(SVGNames::aTag)) |
| 339 urlString = m_innerURLElement->getAttribute(XLinkNames::hrefAttr); | 339 urlString = m_innerURLElement->getAttribute(XLinkNames::hrefAttr); |
| 340 else | 340 else |
| 341 return KURL(); | 341 return KURL(); |
| 342 | 342 |
| 343 return m_innerURLElement->document().completeURL(stripLeadingAndTrailingHTML
Spaces(urlString)); | 343 return m_innerURLElement->treeScope().completeURL(stripLeadingAndTrailingHTM
LSpaces(urlString)); |
| 344 } | 344 } |
| 345 | 345 |
| 346 bool HitTestResult::isLiveLink() const | 346 bool HitTestResult::isLiveLink() const |
| 347 { | 347 { |
| 348 if (!m_innerURLElement) | 348 if (!m_innerURLElement) |
| 349 return false; | 349 return false; |
| 350 | 350 |
| 351 if (m_innerURLElement->hasTagName(aTag)) | 351 if (m_innerURLElement->hasTagName(aTag)) |
| 352 return toHTMLAnchorElement(m_innerURLElement)->isLiveLink(); | 352 return toHTMLAnchorElement(m_innerURLElement)->isLiveLink(); |
| 353 | 353 |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 { | 504 { |
| 505 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { | 505 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa
rent(node)) { |
| 506 if (node->isElementNode()) | 506 if (node->isElementNode()) |
| 507 return toElement(node); | 507 return toElement(node); |
| 508 } | 508 } |
| 509 | 509 |
| 510 return 0; | 510 return 0; |
| 511 } | 511 } |
| 512 | 512 |
| 513 } // namespace WebCore | 513 } // namespace WebCore |
| OLD | NEW |