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) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) | 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) |
7 * Copyright (C) 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2011 Google Inc. All rights reserved. |
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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const | 398 bool HTMLLinkElement::isURLAttribute(const Attribute& attribute) const |
399 { | 399 { |
400 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu
te(attribute); | 400 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu
te(attribute); |
401 } | 401 } |
402 | 402 |
403 bool HTMLLinkElement::hasLegalLinkAttribute(const QualifiedName& name) const | 403 bool HTMLLinkElement::hasLegalLinkAttribute(const QualifiedName& name) const |
404 { | 404 { |
405 return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name); | 405 return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name); |
406 } | 406 } |
407 | 407 |
| 408 const QualifiedName& HTMLLinkElement::subResourceAttributeName() const |
| 409 { |
| 410 // If the link element is not css, ignore it. |
| 411 if (equalIgnoringCase(getAttribute(typeAttr), "text/css")) { |
| 412 // FIXME: Add support for extracting links of sub-resources which |
| 413 // are inside style-sheet such as @import, @font-face, url(), etc. |
| 414 return hrefAttr; |
| 415 } |
| 416 return HTMLElement::subResourceAttributeName(); |
| 417 } |
| 418 |
408 KURL HTMLLinkElement::href() const | 419 KURL HTMLLinkElement::href() const |
409 { | 420 { |
410 return document().completeURL(getAttribute(hrefAttr)); | 421 return document().completeURL(getAttribute(hrefAttr)); |
411 } | 422 } |
412 | 423 |
413 const AtomicString& HTMLLinkElement::rel() const | 424 const AtomicString& HTMLLinkElement::rel() const |
414 { | 425 { |
415 return getAttribute(relAttr); | 426 return getAttribute(relAttr); |
416 } | 427 } |
417 | 428 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 void LinkStyle::ownerRemoved() | 720 void LinkStyle::ownerRemoved() |
710 { | 721 { |
711 if (m_sheet) | 722 if (m_sheet) |
712 clearSheet(); | 723 clearSheet(); |
713 | 724 |
714 if (styleSheetIsLoading()) | 725 if (styleSheetIsLoading()) |
715 removePendingSheet(RemovePendingSheetNotifyLater); | 726 removePendingSheet(RemovePendingSheetNotifyLater); |
716 } | 727 } |
717 | 728 |
718 } // namespace WebCore | 729 } // namespace WebCore |
OLD | NEW |