| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 const AtomicString& HTMLLinkElement::type() const | 437 const AtomicString& HTMLLinkElement::type() const |
| 438 { | 438 { |
| 439 return getAttribute(typeAttr); | 439 return getAttribute(typeAttr); |
| 440 } | 440 } |
| 441 | 441 |
| 442 bool HTMLLinkElement::async() const | 442 bool HTMLLinkElement::async() const |
| 443 { | 443 { |
| 444 return fastHasAttribute(HTMLNames::asyncAttr); | 444 return fastHasAttribute(HTMLNames::asyncAttr); |
| 445 } | 445 } |
| 446 | 446 |
| 447 IconType HTMLLinkElement::iconType() const | 447 IconType HTMLLinkElement::getIconType() const |
| 448 { | 448 { |
| 449 return m_relAttribute.iconType(); | 449 return m_relAttribute.getIconType(); |
| 450 } | 450 } |
| 451 | 451 |
| 452 const Vector<IntSize>& HTMLLinkElement::iconSizes() const | 452 const Vector<IntSize>& HTMLLinkElement::iconSizes() const |
| 453 { | 453 { |
| 454 return m_iconSizes; | 454 return m_iconSizes; |
| 455 } | 455 } |
| 456 | 456 |
| 457 DOMTokenList* HTMLLinkElement::sizes() const | 457 DOMTokenList* HTMLLinkElement::sizes() const |
| 458 { | 458 { |
| 459 return m_sizes.get(); | 459 return m_sizes.get(); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 m_fetchFollowingCORS = false; | 700 m_fetchFollowingCORS = false; |
| 701 } | 701 } |
| 702 | 702 |
| 703 void LinkStyle::process() | 703 void LinkStyle::process() |
| 704 { | 704 { |
| 705 ASSERT(m_owner->shouldProcessStyle()); | 705 ASSERT(m_owner->shouldProcessStyle()); |
| 706 String type = m_owner->typeValue().lower(); | 706 String type = m_owner->typeValue().lower(); |
| 707 String as = m_owner->asValue().lower(); | 707 String as = m_owner->asValue().lower(); |
| 708 LinkRequestBuilder builder(m_owner); | 708 LinkRequestBuilder builder(m_owner); |
| 709 | 709 |
| 710 if (m_owner->relAttribute().iconType() != InvalidIcon && builder.url().isVal
id() && !builder.url().isEmpty()) { | 710 if (m_owner->relAttribute().getIconType() != InvalidIcon && builder.url().is
Valid() && !builder.url().isEmpty()) { |
| 711 if (!m_owner->shouldLoadLink()) | 711 if (!m_owner->shouldLoadLink()) |
| 712 return; | 712 return; |
| 713 if (!document().securityOrigin()->canDisplay(builder.url())) | 713 if (!document().securityOrigin()->canDisplay(builder.url())) |
| 714 return; | 714 return; |
| 715 if (!document().contentSecurityPolicy()->allowImageFromSource(builder.ur
l())) | 715 if (!document().contentSecurityPolicy()->allowImageFromSource(builder.ur
l())) |
| 716 return; | 716 return; |
| 717 if (document().frame() && document().frame()->loader().client()) | 717 if (document().frame() && document().frame()->loader().client()) |
| 718 document().frame()->loader().client()->dispatchDidChangeIcons(m_owne
r->relAttribute().iconType()); | 718 document().frame()->loader().client()->dispatchDidChangeIcons(m_owne
r->relAttribute().getIconType()); |
| 719 } | 719 } |
| 720 | 720 |
| 721 if (!m_owner->loadLink(type, as, builder.url())) | 721 if (!m_owner->loadLink(type, as, builder.url())) |
| 722 return; | 722 return; |
| 723 | 723 |
| 724 if (m_disabledState != Disabled && m_owner->relAttribute().isStyleSheet() &&
styleSheetTypeIsSupported(type) && shouldLoadResource() && builder.url().isVali
d()) { | 724 if (m_disabledState != Disabled && m_owner->relAttribute().isStyleSheet() &&
styleSheetTypeIsSupported(type) && shouldLoadResource() && builder.url().isVali
d()) { |
| 725 if (resource()) { | 725 if (resource()) { |
| 726 removePendingSheet(); | 726 removePendingSheet(); |
| 727 clearResource(); | 727 clearResource(); |
| 728 clearFetchFollowingCORS(); | 728 clearFetchFollowingCORS(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 } | 789 } |
| 790 | 790 |
| 791 DEFINE_TRACE(LinkStyle) | 791 DEFINE_TRACE(LinkStyle) |
| 792 { | 792 { |
| 793 visitor->trace(m_sheet); | 793 visitor->trace(m_sheet); |
| 794 LinkResource::trace(visitor); | 794 LinkResource::trace(visitor); |
| 795 ResourceOwner<StyleSheetResource>::trace(visitor); | 795 ResourceOwner<StyleSheetResource>::trace(visitor); |
| 796 } | 796 } |
| 797 | 797 |
| 798 } // namespace blink | 798 } // namespace blink |
| OLD | NEW |