| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 if (m_pendingActionFlags & LoadMediaResource) { | 549 if (m_pendingActionFlags & LoadMediaResource) { |
| 550 if (m_loadState == LoadingFromSourceElement) | 550 if (m_loadState == LoadingFromSourceElement) |
| 551 loadNextSourceChild(); | 551 loadNextSourceChild(); |
| 552 else | 552 else |
| 553 loadInternal(); | 553 loadInternal(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 m_pendingActionFlags = 0; | 556 m_pendingActionFlags = 0; |
| 557 } | 557 } |
| 558 | 558 |
| 559 PassRefPtr<MediaError> HTMLMediaElement::error() const | 559 PassRefPtrWillBeRawPtr<MediaError> HTMLMediaElement::error() const |
| 560 { | 560 { |
| 561 return m_error; | 561 return m_error; |
| 562 } | 562 } |
| 563 | 563 |
| 564 void HTMLMediaElement::setSrc(const AtomicString& url) | 564 void HTMLMediaElement::setSrc(const AtomicString& url) |
| 565 { | 565 { |
| 566 setAttribute(srcAttr, url); | 566 setAttribute(srcAttr, url); |
| 567 } | 567 } |
| 568 | 568 |
| 569 HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const | 569 HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 | 1401 |
| 1402 // 9 - Abort these steps. Until the load() method is invoked or the src attr
ibute is changed, | 1402 // 9 - Abort these steps. Until the load() method is invoked or the src attr
ibute is changed, |
| 1403 // the element won't attempt to load another resource. | 1403 // the element won't attempt to load another resource. |
| 1404 | 1404 |
| 1405 updateDisplayState(); | 1405 updateDisplayState(); |
| 1406 | 1406 |
| 1407 if (renderer()) | 1407 if (renderer()) |
| 1408 renderer()->updateFromElement(); | 1408 renderer()->updateFromElement(); |
| 1409 } | 1409 } |
| 1410 | 1410 |
| 1411 void HTMLMediaElement::mediaEngineError(PassRefPtr<MediaError> err) | 1411 void HTMLMediaElement::mediaEngineError(PassRefPtrWillBeRawPtr<MediaError> err) |
| 1412 { | 1412 { |
| 1413 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(er
r->code())); | 1413 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(er
r->code())); |
| 1414 | 1414 |
| 1415 // 1 - The user agent should cancel the fetching process. | 1415 // 1 - The user agent should cancel the fetching process. |
| 1416 stopPeriodicTimers(); | 1416 stopPeriodicTimers(); |
| 1417 m_loadState = WaitingForSource; | 1417 m_loadState = WaitingForSource; |
| 1418 | 1418 |
| 1419 // 2 - Set the error attribute to a new MediaError object whose code attribu
te is | 1419 // 2 - Set the error attribute to a new MediaError object whose code attribu
te is |
| 1420 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. | 1420 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. |
| 1421 m_error = err; | 1421 m_error = err; |
| (...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3602 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3602 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3603 } | 3603 } |
| 3604 | 3604 |
| 3605 bool HTMLMediaElement::isInteractiveContent() const | 3605 bool HTMLMediaElement::isInteractiveContent() const |
| 3606 { | 3606 { |
| 3607 return fastHasAttribute(controlsAttr); | 3607 return fastHasAttribute(controlsAttr); |
| 3608 } | 3608 } |
| 3609 | 3609 |
| 3610 void HTMLMediaElement::trace(Visitor* visitor) | 3610 void HTMLMediaElement::trace(Visitor* visitor) |
| 3611 { | 3611 { |
| 3612 visitor->trace(m_error); |
| 3612 visitor->trace(m_currentSourceNode); | 3613 visitor->trace(m_currentSourceNode); |
| 3613 visitor->trace(m_nextChildNodeToConsider); | 3614 visitor->trace(m_nextChildNodeToConsider); |
| 3614 visitor->trace(m_textTracks); | 3615 visitor->trace(m_textTracks); |
| 3615 visitor->trace(m_textTracksWhenResourceSelectionBegan); | 3616 visitor->trace(m_textTracksWhenResourceSelectionBegan); |
| 3616 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); | 3617 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); |
| 3617 HTMLElement::trace(visitor); | 3618 HTMLElement::trace(visitor); |
| 3618 } | 3619 } |
| 3619 | 3620 |
| 3620 } | 3621 } |
| OLD | NEW |