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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 } | 674 } |
675 | 675 |
676 // Don't hold up render tree construction and script execution on styles
heets | 676 // Don't hold up render tree construction and script execution on styles
heets |
677 // that are not needed for the rendering at the moment. | 677 // that are not needed for the rendering at the moment. |
678 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); | 678 bool blocking = mediaQueryMatches && !m_owner->isAlternate(); |
679 addPendingSheet(blocking ? Blocking : NonBlocking); | 679 addPendingSheet(blocking ? Blocking : NonBlocking); |
680 | 680 |
681 // Load stylesheets that are not needed for the rendering immediately wi
th low priority. | 681 // Load stylesheets that are not needed for the rendering immediately wi
th low priority. |
682 FetchRequest request = builder.build(blocking); | 682 FetchRequest request = builder.build(blocking); |
683 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros
soriginAttr); | 683 AtomicString crossOriginMode = m_owner->fastGetAttribute(HTMLNames::cros
soriginAttr); |
684 if (!crossOriginMode.isNull()) | 684 if (!crossOriginMode.isNull()) { |
685 request.setCrossOriginAccessControl(document().securityOrigin(), cro
ssOriginMode); | 685 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMo
de, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; |
| 686 request.setCrossOriginAccessControl(document().securityOrigin(), all
owCredentials); |
| 687 } |
686 setResource(document().fetcher()->fetchCSSStyleSheet(request)); | 688 setResource(document().fetcher()->fetchCSSStyleSheet(request)); |
687 | 689 |
688 if (!resource()) { | 690 if (!resource()) { |
689 // The request may have been denied if (for example) the stylesheet
is local and the document is remote. | 691 // The request may have been denied if (for example) the stylesheet
is local and the document is remote. |
690 m_loading = false; | 692 m_loading = false; |
691 removePendingSheet(); | 693 removePendingSheet(); |
692 } | 694 } |
693 } else if (m_sheet) { | 695 } else if (m_sheet) { |
694 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang
ed | 696 // we no longer contain a stylesheet, e.g. perhaps rel or type was chang
ed |
695 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); | 697 RefPtrWillBeRawPtr<StyleSheet> removedSheet = m_sheet.get(); |
(...skipping 11 matching lines...) Expand all Loading... |
707 void LinkStyle::ownerRemoved() | 709 void LinkStyle::ownerRemoved() |
708 { | 710 { |
709 if (m_sheet) | 711 if (m_sheet) |
710 clearSheet(); | 712 clearSheet(); |
711 | 713 |
712 if (styleSheetIsLoading()) | 714 if (styleSheetIsLoading()) |
713 removePendingSheet(RemovePendingSheetNotifyLater); | 715 removePendingSheet(RemovePendingSheetNotifyLater); |
714 } | 716 } |
715 | 717 |
716 } // namespace WebCore | 718 } // namespace WebCore |
OLD | NEW |