| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 if (url.string().length() < maximumURLLengthForLogging) | 50 if (url.string().length() < maximumURLLengthForLogging) |
| 51 return url.string(); | 51 return url.string(); |
| 52 return url.string().substring(0, maximumURLLengthForLogging) + "..."; | 52 return url.string().substring(0, maximumURLLengthForLogging) + "..."; |
| 53 } | 53 } |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 inline HTMLTrackElement::HTMLTrackElement(const QualifiedName& tagName, Document
* document) | 56 inline HTMLTrackElement::HTMLTrackElement(const QualifiedName& tagName, Document
* document) |
| 57 : HTMLElement(tagName, document) | 57 : HTMLElement(tagName, document) |
| 58 , m_loadTimer(this, &HTMLTrackElement::loadTimerFired) | 58 , m_loadTimer(this, &HTMLTrackElement::loadTimerFired) |
| 59 { | 59 { |
| 60 LOG(Media, "HTMLTrackElement::HTMLTrackElement - %p", this); | 60 LOG_INFO(Media, "HTMLTrackElement::HTMLTrackElement - %p", this); |
| 61 ASSERT(hasTagName(trackTag)); | 61 ASSERT(hasTagName(trackTag)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 HTMLTrackElement::~HTMLTrackElement() | 64 HTMLTrackElement::~HTMLTrackElement() |
| 65 { | 65 { |
| 66 if (m_track) | 66 if (m_track) |
| 67 m_track->clearClient(); | 67 m_track->clearClient(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 PassRefPtr<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagNa
me, Document* document) | 70 PassRefPtr<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagNa
me, Document* document) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // 4.8.10.12.3 Sourcing out-of-band text tracks | 242 // 4.8.10.12.3 Sourcing out-of-band text tracks |
| 243 | 243 |
| 244 // 4. Download: If URL is not the empty string, perform a potentially CORS-e
nabled fetch of URL, with the | 244 // 4. Download: If URL is not the empty string, perform a potentially CORS-e
nabled fetch of URL, with the |
| 245 // mode being the state of the media element's crossorigin content attribute
, the origin being the | 245 // mode being the state of the media element's crossorigin content attribute
, the origin being the |
| 246 // origin of the media element's Document, and the default origin behaviour
set to fail. | 246 // origin of the media element's Document, and the default origin behaviour
set to fail. |
| 247 if (url.isEmpty()) | 247 if (url.isEmpty()) |
| 248 return false; | 248 return false; |
| 249 | 249 |
| 250 if (!document()->contentSecurityPolicy()->allowMediaFromSource(url)) { | 250 if (!document()->contentSecurityPolicy()->allowMediaFromSource(url)) { |
| 251 LOG(Media, "HTMLTrackElement::canLoadUrl(%s) -> rejected by Content Secu
rity Policy", urlForLoggingTrack(url).utf8().data()); | 251 LOG_INFO(Media, "HTMLTrackElement::canLoadUrl(%s) -> rejected by Content
Security Policy", urlForLoggingTrack(url).utf8().data()); |
| 252 return false; | 252 return false; |
| 253 } | 253 } |
| 254 | 254 |
| 255 return dispatchBeforeLoadEvent(url.string()); | 255 return dispatchBeforeLoadEvent(url.string()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 void HTMLTrackElement::didCompleteLoad(LoadableTextTrack*, LoadStatus status) | 258 void HTMLTrackElement::didCompleteLoad(LoadableTextTrack*, LoadStatus status) |
| 259 { | 259 { |
| 260 // 4.8.10.12.3 Sourcing out-of-band text tracks (continued) | 260 // 4.8.10.12.3 Sourcing out-of-band text tracks (continued) |
| 261 | 261 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 void HTMLTrackElement::setItemValueText(const String& value, ExceptionCode&) | 367 void HTMLTrackElement::setItemValueText(const String& value, ExceptionCode&) |
| 368 { | 368 { |
| 369 setAttribute(srcAttr, value); | 369 setAttribute(srcAttr, value); |
| 370 } | 370 } |
| 371 #endif | 371 #endif |
| 372 | 372 |
| 373 } | 373 } |
| 374 | 374 |
| 375 #endif | 375 #endif |
| OLD | NEW |