| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 | 1310 |
| 1311 // 6.18 - Set the element's delaying-the-load-event flag to false. This stop
s delaying the load event. | 1311 // 6.18 - Set the element's delaying-the-load-event flag to false. This stop
s delaying the load event. |
| 1312 setShouldDelayLoadEvent(false); | 1312 setShouldDelayLoadEvent(false); |
| 1313 | 1313 |
| 1314 updateDisplayState(); | 1314 updateDisplayState(); |
| 1315 | 1315 |
| 1316 if (layoutObject()) | 1316 if (layoutObject()) |
| 1317 layoutObject()->updateFromElement(); | 1317 layoutObject()->updateFromElement(); |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 void HTMLMediaElement::reportPlayerErrorToDevToolsConsole() |
| 1321 { |
| 1322 WTF_LOG(Media, "HTMLMediaElement::reportPlayerErrorToDevToolsConsole(%p)", t
his); |
| 1323 |
| 1324 if (!m_webMediaPlayer) |
| 1325 return; |
| 1326 |
| 1327 const WebString& message = m_webMediaPlayer->getErrorMessage(); |
| 1328 if (message.isEmpty()) |
| 1329 return; |
| 1330 |
| 1331 document().addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMe
ssageLevel, message)); |
| 1332 } |
| 1333 |
| 1320 void HTMLMediaElement::noneSupported() | 1334 void HTMLMediaElement::noneSupported() |
| 1321 { | 1335 { |
| 1322 WTF_LOG(Media, "HTMLMediaElement::noneSupported(%p)", this); | 1336 WTF_LOG(Media, "HTMLMediaElement::noneSupported(%p)", this); |
| 1323 | 1337 |
| 1324 stopPeriodicTimers(); | 1338 stopPeriodicTimers(); |
| 1325 m_loadState = WaitingForSource; | 1339 m_loadState = WaitingForSource; |
| 1326 m_currentSourceNode = nullptr; | 1340 m_currentSourceNode = nullptr; |
| 1327 | 1341 |
| 1328 // 4.8.13.5 | 1342 // 4.8.13.5 |
| 1329 // The dedicated media source failure steps are the following steps: | 1343 // The dedicated media source failure steps are the following steps: |
| 1330 | 1344 |
| 1331 // 1 - Set the error attribute to a new MediaError object whose code attribu
te is set to | 1345 // 1 - Set the error attribute to a new MediaError object whose code attribu
te is set to |
| 1332 // MEDIA_ERR_SRC_NOT_SUPPORTED. | 1346 // MEDIA_ERR_SRC_NOT_SUPPORTED. |
| 1333 m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED); | 1347 m_error = MediaError::create(MediaError::MEDIA_ERR_SRC_NOT_SUPPORTED); |
| 1348 reportPlayerErrorToDevToolsConsole(); |
| 1334 | 1349 |
| 1335 // 2 - Forget the media element's media-resource-specific text tracks. | 1350 // 2 - Forget the media element's media-resource-specific text tracks. |
| 1336 forgetResourceSpecificTracks(); | 1351 forgetResourceSpecificTracks(); |
| 1337 | 1352 |
| 1338 // 3 - Set the element's networkState attribute to the NETWORK_NO_SOURCE val
ue. | 1353 // 3 - Set the element's networkState attribute to the NETWORK_NO_SOURCE val
ue. |
| 1339 setNetworkState(NETWORK_NO_SOURCE); | 1354 setNetworkState(NETWORK_NO_SOURCE); |
| 1340 | 1355 |
| 1341 // 4 - Set the element's show poster flag to true. | 1356 // 4 - Set the element's show poster flag to true. |
| 1342 updateDisplayState(); | 1357 updateDisplayState(); |
| 1343 | 1358 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1361 ASSERT(m_readyState >= HAVE_METADATA); | 1376 ASSERT(m_readyState >= HAVE_METADATA); |
| 1362 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%p, %d)", this, static_ca
st<int>(err->code())); | 1377 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%p, %d)", this, static_ca
st<int>(err->code())); |
| 1363 | 1378 |
| 1364 // 1 - The user agent should cancel the fetching process. | 1379 // 1 - The user agent should cancel the fetching process. |
| 1365 stopPeriodicTimers(); | 1380 stopPeriodicTimers(); |
| 1366 m_loadState = WaitingForSource; | 1381 m_loadState = WaitingForSource; |
| 1367 | 1382 |
| 1368 // 2 - Set the error attribute to a new MediaError object whose code attribu
te is | 1383 // 2 - Set the error attribute to a new MediaError object whose code attribu
te is |
| 1369 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. | 1384 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. |
| 1370 m_error = err; | 1385 m_error = err; |
| 1386 reportPlayerErrorToDevToolsConsole(); |
| 1371 | 1387 |
| 1372 // 3 - Queue a task to fire a simple event named error at the media element. | 1388 // 3 - Queue a task to fire a simple event named error at the media element. |
| 1373 scheduleEvent(EventTypeNames::error); | 1389 scheduleEvent(EventTypeNames::error); |
| 1374 | 1390 |
| 1375 // 4 - Set the element's networkState attribute to the NETWORK_IDLE value. | 1391 // 4 - Set the element's networkState attribute to the NETWORK_IDLE value. |
| 1376 setNetworkState(NETWORK_IDLE); | 1392 setNetworkState(NETWORK_IDLE); |
| 1377 | 1393 |
| 1378 // 5 - Set the element's delaying-the-load-event flag to false. This stops d
elaying the load event. | 1394 // 5 - Set the element's delaying-the-load-event flag to false. This stops d
elaying the load event. |
| 1379 setShouldDelayLoadEvent(false); | 1395 setShouldDelayLoadEvent(false); |
| 1380 | 1396 |
| (...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3884 } | 3900 } |
| 3885 | 3901 |
| 3886 #if !ENABLE(OILPAN) | 3902 #if !ENABLE(OILPAN) |
| 3887 WeakPtr<HTMLMediaElement> HTMLMediaElement::createWeakPtr() | 3903 WeakPtr<HTMLMediaElement> HTMLMediaElement::createWeakPtr() |
| 3888 { | 3904 { |
| 3889 return m_weakPtrFactory.createWeakPtr(); | 3905 return m_weakPtrFactory.createWeakPtr(); |
| 3890 } | 3906 } |
| 3891 #endif | 3907 #endif |
| 3892 | 3908 |
| 3893 } // namespace blink | 3909 } // namespace blink |
| OLD | NEW |