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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 return m_owner->document(); | 509 return m_owner->document(); |
510 } | 510 } |
511 | 511 |
512 void LinkStyle::setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource* cachedStyleSheet) | 512 void LinkStyle::setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource* cachedStyleSheet) |
513 { | 513 { |
514 if (!m_owner->inDocument()) { | 514 if (!m_owner->inDocument()) { |
515 ASSERT(!m_sheet); | 515 ASSERT(!m_sheet); |
516 return; | 516 return; |
517 } | 517 } |
518 | 518 |
519 if (!cachedStyleSheet->errorOccurred() && !SubresourceIntegrity::CheckSubres
ourceIntegrity(*m_owner, cachedStyleSheet->sheetText(), KURL(baseURL, href), cac
hedStyleSheet->mimeType(), *cachedStyleSheet)) { | 519 if (!cachedStyleSheet->errorOccurred() && !SubresourceIntegrity::CheckSubres
ourceIntegrity(*m_owner, cachedStyleSheet->sheetText(), KURL(baseURL, href), *ca
chedStyleSheet)) { |
520 m_loading = false; | 520 m_loading = false; |
521 removePendingSheet(); | 521 removePendingSheet(); |
522 notifyLoadedSheetAndAllCriticalSubresources(Node::ErrorOccurredLoadingSu
bresource); | 522 notifyLoadedSheetAndAllCriticalSubresources(Node::ErrorOccurredLoadingSu
bresource); |
523 return; | 523 return; |
524 } | 524 } |
525 | 525 |
526 // Completing the sheet load may cause scripts to execute. | 526 // Completing the sheet load may cause scripts to execute. |
527 RefPtrWillBeRawPtr<Node> protector(m_owner.get()); | 527 RefPtrWillBeRawPtr<Node> protector(m_owner.get()); |
528 | 528 |
529 CSSParserContext parserContext(m_owner->document(), 0, baseURL, charset); | 529 CSSParserContext parserContext(m_owner->document(), 0, baseURL, charset); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 removePendingSheet(); | 775 removePendingSheet(); |
776 } | 776 } |
777 | 777 |
778 DEFINE_TRACE(LinkStyle) | 778 DEFINE_TRACE(LinkStyle) |
779 { | 779 { |
780 visitor->trace(m_sheet); | 780 visitor->trace(m_sheet); |
781 LinkResource::trace(visitor); | 781 LinkResource::trace(visitor); |
782 } | 782 } |
783 | 783 |
784 } // namespace blink | 784 } // namespace blink |
OLD | NEW |