Chromium Code Reviews| 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 2895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2906 if (loop()) { | 2906 if (loop()) { |
| 2907 // then seek to the earliest possible position of the media resourc e and abort these steps. | 2907 // then seek to the earliest possible position of the media resourc e and abort these steps. |
| 2908 seek(0); | 2908 seek(0); |
| 2909 } else { | 2909 } else { |
| 2910 // If the media element has still ended playback, and the direction of playback is still | 2910 // If the media element has still ended playback, and the direction of playback is still |
| 2911 // forwards, and paused is false, | 2911 // forwards, and paused is false, |
| 2912 if (!m_paused) { | 2912 if (!m_paused) { |
| 2913 // changes paused to true and fires a simple event named pause a t the media element. | 2913 // changes paused to true and fires a simple event named pause a t the media element. |
| 2914 m_paused = true; | 2914 m_paused = true; |
| 2915 scheduleEvent(EventTypeNames::pause); | 2915 scheduleEvent(EventTypeNames::pause); |
| 2916 scheduleRejectPlayPromises(AbortError); | |
|
foolip
2016/08/18 20:16:17
Add a TODO to add event firing and rejection in th
mlamouri (slow - plz ping)
2016/08/19 09:26:29
It is bug 587871. Given that we never bundle promi
| |
| 2916 } | 2917 } |
| 2917 // Queue a task to fire a simple event named ended at the media elem ent. | 2918 // Queue a task to fire a simple event named ended at the media elem ent. |
| 2918 scheduleEvent(EventTypeNames::ended); | 2919 scheduleEvent(EventTypeNames::ended); |
| 2919 } | 2920 } |
| 2920 } | 2921 } |
| 2921 updatePlayState(); | 2922 updatePlayState(); |
| 2922 } | 2923 } |
| 2923 | 2924 |
| 2924 void HTMLMediaElement::durationChanged() | 2925 void HTMLMediaElement::durationChanged() |
| 2925 { | 2926 { |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4040 | 4041 |
| 4041 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst | 4042 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst |
| 4042 { | 4043 { |
| 4043 IntRect result; | 4044 IntRect result; |
| 4044 if (LayoutObject* object = m_element->layoutObject()) | 4045 if (LayoutObject* object = m_element->layoutObject()) |
| 4045 result = object->absoluteBoundingBoxRect(); | 4046 result = object->absoluteBoundingBoxRect(); |
| 4046 return result; | 4047 return result; |
| 4047 } | 4048 } |
| 4048 | 4049 |
| 4049 } // namespace blink | 4050 } // namespace blink |
| OLD | NEW |