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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (!m_crossOriginMode.isNull() | 102 if (!m_crossOriginMode.isNull() |
103 && !m_document.securityOrigin()->canRequest(resource->response().url()) | 103 && !m_document.securityOrigin()->canRequest(resource->response().url()) |
104 && !resource->passesAccessControlCheck(m_document.securityOrigin())) { | 104 && !resource->passesAccessControlCheck(m_document.securityOrigin())) { |
105 | 105 |
106 corsPolicyPreventedLoad(); | 106 corsPolicyPreventedLoad(); |
107 } | 107 } |
108 | 108 |
109 if (m_state != Failed) | 109 if (m_state != Failed) |
110 m_state = resource->errorOccurred() ? Failed : Finished; | 110 m_state = resource->errorOccurred() ? Failed : Finished; |
111 | 111 |
| 112 if (m_state == Finished && m_cueParser) |
| 113 m_cueParser->flush(); |
| 114 |
112 if (!m_cueLoadTimer.isActive()) | 115 if (!m_cueLoadTimer.isActive()) |
113 m_cueLoadTimer.startOneShot(0); | 116 m_cueLoadTimer.startOneShot(0); |
114 | 117 |
115 cancelLoad(); | 118 cancelLoad(); |
116 } | 119 } |
117 | 120 |
118 bool TextTrackLoader::load(const KURL& url, const String& crossOriginMode) | 121 bool TextTrackLoader::load(const KURL& url, const String& crossOriginMode) |
119 { | 122 { |
120 cancelLoad(); | 123 cancelLoad(); |
121 | 124 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 178 } |
176 | 179 |
177 void TextTrackLoader::getNewRegions(Vector<RefPtr<VTTRegion> >& outputRegions) | 180 void TextTrackLoader::getNewRegions(Vector<RefPtr<VTTRegion> >& outputRegions) |
178 { | 181 { |
179 ASSERT(m_cueParser); | 182 ASSERT(m_cueParser); |
180 if (m_cueParser) | 183 if (m_cueParser) |
181 m_cueParser->getNewRegions(outputRegions); | 184 m_cueParser->getNewRegions(outputRegions); |
182 } | 185 } |
183 | 186 |
184 } | 187 } |
OLD | NEW |