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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 return m_owner->document(); | 502 return m_owner->document(); |
503 } | 503 } |
504 | 504 |
505 void LinkStyle::setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource* cachedStyleSheet) | 505 void LinkStyle::setCSSStyleSheet(const String& href, const KURL& baseURL, const
String& charset, const CSSStyleSheetResource* cachedStyleSheet) |
506 { | 506 { |
507 if (!m_owner->inDocument()) { | 507 if (!m_owner->inDocument()) { |
508 ASSERT(!m_sheet); | 508 ASSERT(!m_sheet); |
509 return; | 509 return; |
510 } | 510 } |
511 | 511 |
512 if (!SubresourceIntegrity::CheckSubresourceIntegrity(*m_owner, cachedStyleSh
eet->sheetText(), KURL(KURL(), href), cachedStyleSheet->mimeType())) { | 512 if (!cachedStyleSheet->errorOccurred() && !SubresourceIntegrity::CheckSubres
ourceIntegrity(*m_owner, cachedStyleSheet->sheetText(), KURL(baseURL, href), cac
hedStyleSheet->mimeType(), *cachedStyleSheet)) { |
513 m_loading = false; | 513 m_loading = false; |
514 removePendingSheet(); | 514 removePendingSheet(); |
515 notifyLoadedSheetAndAllCriticalSubresources(true); | 515 notifyLoadedSheetAndAllCriticalSubresources(true); |
516 return; | 516 return; |
517 } | 517 } |
518 | 518 |
519 // Completing the sheet load may cause scripts to execute. | 519 // Completing the sheet load may cause scripts to execute. |
520 RefPtrWillBeRawPtr<Node> protector(m_owner.get()); | 520 RefPtrWillBeRawPtr<Node> protector(m_owner.get()); |
521 | 521 |
522 CSSParserContext parserContext(m_owner->document(), 0, baseURL, charset); | 522 CSSParserContext parserContext(m_owner->document(), 0, baseURL, charset); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 removePendingSheet(); | 752 removePendingSheet(); |
753 } | 753 } |
754 | 754 |
755 DEFINE_TRACE(LinkStyle) | 755 DEFINE_TRACE(LinkStyle) |
756 { | 756 { |
757 visitor->trace(m_sheet); | 757 visitor->trace(m_sheet); |
758 LinkResource::trace(visitor); | 758 LinkResource::trace(visitor); |
759 } | 759 } |
760 | 760 |
761 } // namespace blink | 761 } // namespace blink |
OLD | NEW |