| 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 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 return 0; | 2153 return 0; |
| 2154 | 2154 |
| 2155 double volume = m_volume; | 2155 double volume = m_volume; |
| 2156 | 2156 |
| 2157 if (m_mediaController) | 2157 if (m_mediaController) |
| 2158 volume *= m_mediaController->volume(); | 2158 volume *= m_mediaController->volume(); |
| 2159 | 2159 |
| 2160 return volume; | 2160 return volume; |
| 2161 } | 2161 } |
| 2162 | 2162 |
| 2163 void HTMLMediaElement::notifySizeChanged(const LayoutSize& newSize) |
| 2164 { |
| 2165 m_cachedSize = newSize; |
| 2166 |
| 2167 if (mediaControls()) |
| 2168 mediaControls()->notifyPanelWidthChanged(newSize.width()); |
| 2169 } |
| 2170 |
| 2163 // The spec says to fire periodic timeupdate events (those sent while playing) e
very | 2171 // The spec says to fire periodic timeupdate events (those sent while playing) e
very |
| 2164 // "15 to 250ms", we choose the slowest frequency | 2172 // "15 to 250ms", we choose the slowest frequency |
| 2165 static const double maxTimeupdateEventFrequency = 0.25; | 2173 static const double maxTimeupdateEventFrequency = 0.25; |
| 2166 | 2174 |
| 2167 void HTMLMediaElement::startPlaybackProgressTimer() | 2175 void HTMLMediaElement::startPlaybackProgressTimer() |
| 2168 { | 2176 { |
| 2169 if (m_playbackProgressTimer.isActive()) | 2177 if (m_playbackProgressTimer.isActive()) |
| 2170 return; | 2178 return; |
| 2171 | 2179 |
| 2172 m_previousProgressTime = WTF::currentTime(); | 2180 m_previousProgressTime = WTF::currentTime(); |
| (...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3782 visitor->trace(m_client); | 3790 visitor->trace(m_client); |
| 3783 } | 3791 } |
| 3784 | 3792 |
| 3785 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3793 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
| 3786 { | 3794 { |
| 3787 visitor->trace(m_client); | 3795 visitor->trace(m_client); |
| 3788 } | 3796 } |
| 3789 #endif | 3797 #endif |
| 3790 | 3798 |
| 3791 } | 3799 } |
| OLD | NEW |