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 725 matching lines...) Loading... | |
736 // Load stylesheets that are not needed for the rendering immediately wi th low priority. | 736 // Load stylesheets that are not needed for the rendering immediately wi th low priority. |
737 FetchRequest request = builder.build(blocking); | 737 FetchRequest request = builder.build(blocking); |
738 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros soriginAttr); | 738 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros soriginAttr); |
739 if (!crossOriginMode.isNull()) { | 739 if (!crossOriginMode.isNull()) { |
740 request.setCrossOriginAccessControl(document().securityOrigin(), cro ssOriginMode); | 740 request.setCrossOriginAccessControl(document().securityOrigin(), cro ssOriginMode); |
741 setFetchFollowingCORS(); | 741 setFetchFollowingCORS(); |
742 } | 742 } |
743 setResource(document().fetcher()->fetchCSSStyleSheet(request)); | 743 setResource(document().fetcher()->fetchCSSStyleSheet(request)); |
744 | 744 |
745 if (!resource()) { | 745 if (!resource()) { |
746 // The request may have been denied if (for example) the stylesheet is local and the document is remote. | 746 // The request may have been denied if (for example) the stylesheet is local and the document is remote, or if there was a Content Security Policy F ailure. |
747 m_loading = false; | 747 m_loading = false; |
748 removePendingSheet(); | 748 removePendingSheet(); |
749 notifyLoadedSheetAndAllCriticalSubresources(true); | |
Mike West
2015/03/26 04:41:08
Nit: We should totally change this bool to an enum
jww
2015/03/26 21:04:17
Done.
| |
749 } | 750 } |
750 } else if (m_sheet) { | 751 } else if (m_sheet) { |
751 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang ed | 752 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang ed |
752 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); | 753 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); |
753 clearSheet(); | 754 clearSheet(); |
754 document().removedStyleSheet(removedSheet.get()); | 755 document().removedStyleSheet(removedSheet.get()); |
755 } | 756 } |
756 } | 757 } |
757 | 758 |
758 void LinkStyle::setSheetTitle(const String& title) | 759 void LinkStyle::setSheetTitle(const String& title) |
(...skipping 11 matching lines...) Loading... | |
770 removePendingSheet(); | 771 removePendingSheet(); |
771 } | 772 } |
772 | 773 |
773 DEFINE_TRACE(LinkStyle) | 774 DEFINE_TRACE(LinkStyle) |
774 { | 775 { |
775 visitor->trace(m_sheet); | 776 visitor->trace(m_sheet); |
776 LinkResource::trace(visitor); | 777 LinkResource::trace(visitor); |
777 } | 778 } |
778 | 779 |
779 } // namespace blink | 780 } // namespace blink |
OLD | NEW |