| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 if (!m_cueLoadTimer.isActive()) | 118 if (!m_cueLoadTimer.isActive()) |
| 119 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); | 119 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); |
| 120 | 120 |
| 121 cancelLoad(); | 121 cancelLoad(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool TextTrackLoader::load(const KURL& url, | 124 bool TextTrackLoader::load(const KURL& url, |
| 125 CrossOriginAttributeValue crossOrigin) { | 125 CrossOriginAttributeValue crossOrigin) { |
| 126 cancelLoad(); | 126 cancelLoad(); |
| 127 | 127 |
| 128 FetchRequest cueRequest(ResourceRequest(document().completeURL(url)), | 128 FetchRequest cueRequest(ResourceRequest(url), |
| 129 FetchInitiatorTypeNames::texttrack); | 129 FetchInitiatorTypeNames::texttrack); |
| 130 | 130 |
| 131 if (crossOrigin != CrossOriginAttributeNotSet) { | 131 if (crossOrigin != CrossOriginAttributeNotSet) { |
| 132 cueRequest.setCrossOriginAccessControl(document().getSecurityOrigin(), | 132 cueRequest.setCrossOriginAccessControl(document().getSecurityOrigin(), |
| 133 crossOrigin); | 133 crossOrigin); |
| 134 } else if (!document().getSecurityOrigin()->canRequestNoSuborigin(url)) { | 134 } else if (!document().getSecurityOrigin()->canRequestNoSuborigin(url)) { |
| 135 // Text track elements without 'crossorigin' set on the parent are "No | 135 // Text track elements without 'crossorigin' set on the parent are "No |
| 136 // CORS"; report error if not same-origin. | 136 // CORS"; report error if not same-origin. |
| 137 corsPolicyPreventedLoad(document().getSecurityOrigin(), url); | 137 corsPolicyPreventedLoad(document().getSecurityOrigin(), url); |
| 138 return false; | 138 return false; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 168 | 168 |
| 169 DEFINE_TRACE(TextTrackLoader) { | 169 DEFINE_TRACE(TextTrackLoader) { |
| 170 visitor->trace(m_client); | 170 visitor->trace(m_client); |
| 171 visitor->trace(m_cueParser); | 171 visitor->trace(m_cueParser); |
| 172 visitor->trace(m_document); | 172 visitor->trace(m_document); |
| 173 ResourceOwner<RawResource>::trace(visitor); | 173 ResourceOwner<RawResource>::trace(visitor); |
| 174 VTTParserClient::trace(visitor); | 174 VTTParserClient::trace(visitor); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |