OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 | 822 |
823 DCHECK(!m_paused || m_playPromiseResolvers.isEmpty()); | 823 DCHECK(!m_paused || m_playPromiseResolvers.isEmpty()); |
824 | 824 |
825 // 4.6 - If the paused attribute is false, then run these substeps | 825 // 4.6 - If the paused attribute is false, then run these substeps |
826 if (!m_paused) { | 826 if (!m_paused) { |
827 // 4.6.1 - Set the paused attribute to true. | 827 // 4.6.1 - Set the paused attribute to true. |
828 m_paused = true; | 828 m_paused = true; |
829 | 829 |
830 // 4.6.2 - Take pending play promises and reject pending play promises | 830 // 4.6.2 - Take pending play promises and reject pending play promises |
831 // with the result and an "AbortError" DOMException. | 831 // with the result and an "AbortError" DOMException. |
832 rejectPlayPromises( | 832 if (!ScriptForbiddenScope::isScriptForbidden()) { |
833 AbortError, | 833 rejectPlayPromises( |
834 "The play() request was interrupted by a new load request."); | 834 AbortError, |
| 835 "The play() request was interrupted by a new load request."); |
| 836 } |
835 } | 837 } |
836 | 838 |
837 // 4.7 - If seeking is true, set it to false. | 839 // 4.7 - If seeking is true, set it to false. |
838 m_seeking = false; | 840 m_seeking = false; |
839 | 841 |
840 // 4.8 - Set the current playback position to 0. | 842 // 4.8 - Set the current playback position to 0. |
841 // Set the official playback position to 0. | 843 // Set the official playback position to 0. |
842 // If this changed the official playback position, then queue a task | 844 // If this changed the official playback position, then queue a task |
843 // to fire a simple event named timeupdate at the media element. | 845 // to fire a simple event named timeupdate at the media element. |
844 // 4.9 - Set the initial playback position to 0. | 846 // 4.9 - Set the initial playback position to 0. |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4133 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4135 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4134 } | 4136 } |
4135 | 4137 |
4136 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4138 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
4137 m_mostlyFillingViewport = true; | 4139 m_mostlyFillingViewport = true; |
4138 if (m_webMediaPlayer) | 4140 if (m_webMediaPlayer) |
4139 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4141 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
4140 } | 4142 } |
4141 | 4143 |
4142 } // namespace blink | 4144 } // namespace blink |
OLD | NEW |