| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (!m_client->shouldLoadCues(this)) | 150 if (!m_client->shouldLoadCues(this)) |
| 151 return false; | 151 return false; |
| 152 | 152 |
| 153 ASSERT(m_scriptExecutionContext->isDocument()); | 153 ASSERT(m_scriptExecutionContext->isDocument()); |
| 154 Document* document = toDocument(m_scriptExecutionContext); | 154 Document* document = toDocument(m_scriptExecutionContext); |
| 155 CachedResourceRequest cueRequest(ResourceRequest(document->completeURL(url))
, cachedResourceRequestInitiators().texttrack); | 155 CachedResourceRequest cueRequest(ResourceRequest(document->completeURL(url))
, cachedResourceRequestInitiators().texttrack); |
| 156 | 156 |
| 157 if (!crossOriginMode.isNull()) { | 157 if (!crossOriginMode.isNull()) { |
| 158 m_crossOriginMode = crossOriginMode; | 158 m_crossOriginMode = crossOriginMode; |
| 159 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode,
"use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; | 159 StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode,
"use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials; |
| 160 updateRequestForAccessControl(cueRequest.mutableResourceRequest(), docum
ent->securityOrigin(), allowCredentials); | 160 updateRequestForAccessControl(cueRequest.mutableResourceRequest(), allow
Credentials, document->securityOrigin()); |
| 161 } else { | 161 } else { |
| 162 // Cross-origin resources that are not suitably CORS-enabled may not loa
d. | 162 // Cross-origin resources that are not suitably CORS-enabled may not loa
d. |
| 163 if (!document->securityOrigin()->canRequest(url)) { | 163 if (!document->securityOrigin()->canRequest(url)) { |
| 164 corsPolicyPreventedLoad(); | 164 corsPolicyPreventedLoad(); |
| 165 return false; | 165 return false; |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 CachedResourceLoader* cachedResourceLoader = document->cachedResourceLoader(
); | 169 CachedResourceLoader* cachedResourceLoader = document->cachedResourceLoader(
); |
| 170 m_cachedCueData = cachedResourceLoader->requestTextTrack(cueRequest); | 170 m_cachedCueData = cachedResourceLoader->requestTextTrack(cueRequest); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 #if ENABLE(WEBVTT_REGIONS) | 214 #if ENABLE(WEBVTT_REGIONS) |
| 215 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi
ons) | 215 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi
ons) |
| 216 { | 216 { |
| 217 ASSERT(m_cueParser); | 217 ASSERT(m_cueParser); |
| 218 if (m_cueParser) | 218 if (m_cueParser) |
| 219 m_cueParser->getNewRegions(outputRegions); | 219 m_cueParser->getNewRegions(outputRegions); |
| 220 } | 220 } |
| 221 #endif | 221 #endif |
| 222 } | 222 } |
| 223 | 223 |
| OLD | NEW |