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