Modified: trunk/Source/WebCore/ChangeLog (262913 => 262914)
--- trunk/Source/WebCore/ChangeLog 2020-06-11 18:54:13 UTC (rev 262913)
+++ trunk/Source/WebCore/ChangeLog 2020-06-11 18:55:20 UTC (rev 262914)
@@ -1,3 +1,24 @@
+2020-06-11 Beth Dakin <[email protected]>
+
+ Remove references to "slave" in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=213085
+
+ Reviewed by Wenson Hsieh.
+
+ This feature is referred to as a mediagroup in html, so let's use that terminology here as
+ well.
+ * html/MediaController.cpp:
+ (WebCore::MediaController::buffered const):
+ (WebCore::MediaController::seekable const):
+ (WebCore::MediaController::played):
+ (WebCore::MediaController::duration const):
+ (WebCore::MediaController::setCurrentTime):
+ (WebCore::MediaController::play):
+ (WebCore::MediaController::updateReadyState):
+ (WebCore::MediaController::updatePlaybackState):
+ (WebCore::MediaController::isBlocked const):
+ (WebCore::MediaController::hasEnded const):
+
2020-06-11 David Kilzer <[email protected]>
[IPC] Adopt enum class for DragSourceAction
Modified: trunk/Source/WebCore/html/MediaController.cpp (262913 => 262914)
--- trunk/Source/WebCore/html/MediaController.cpp 2020-06-11 18:54:13 UTC (rev 262913)
+++ trunk/Source/WebCore/html/MediaController.cpp 2020-06-11 18:55:20 UTC (rev 262914)
@@ -90,7 +90,7 @@
return TimeRanges::create();
// The buffered attribute must return a new static normalized TimeRanges object that represents
- // the intersection of the ranges of the media resources of the slaved media elements that the
+ // the intersection of the ranges of the media resources of the mediagroup elements that the
// user agent has buffered, at the time the attribute is evaluated.
Ref<TimeRanges> bufferedRanges = m_mediaElements.first()->buffered();
for (size_t index = 1; index < m_mediaElements.size(); ++index)
@@ -104,7 +104,7 @@
return TimeRanges::create();
// The seekable attribute must return a new static normalized TimeRanges object that represents
- // the intersection of the ranges of the media resources of the slaved media elements that the
+ // the intersection of the ranges of the media resources of the mediagroup elements that the
// user agent is able to seek to, at the time the attribute is evaluated.
Ref<TimeRanges> seekableRanges = m_mediaElements.first()->seekable();
for (size_t index = 1; index < m_mediaElements.size(); ++index)
@@ -118,7 +118,7 @@
return TimeRanges::create();
// The played attribute must return a new static normalized TimeRanges object that represents
- // the union of the ranges of the media resources of the slaved media elements that the
+ // the union of the ranges of the media resources of the mediagroup elements that the
// user agent has so far rendered, at the time the attribute is evaluated.
Ref<TimeRanges> playedRanges = m_mediaElements.first()->played();
for (size_t index = 1; index < m_mediaElements.size(); ++index)
@@ -129,7 +129,7 @@
double MediaController::duration() const
{
// FIXME: Investigate caching the maximum duration and only updating the cached value
- // when the slaved media elements' durations change.
+ // when the mediagroup elements' durations change.
double maxDuration = 0;
for (auto& mediaElement : m_mediaElements) {
double duration = mediaElement->duration();
@@ -168,7 +168,7 @@
// Set the media controller position to the new playback position.
m_clock->setCurrentTime(time);
- // Seek each slaved media element to the new playback position relative to the media element timeline.
+ // Seek each mediagroup element to the new playback position relative to the media element timeline.
for (auto& mediaElement : m_mediaElements)
mediaElement->seek(MediaTime::createWithDouble(time));
@@ -192,7 +192,7 @@
void MediaController::play()
{
// When the play() method is invoked, the user agent must invoke the play method of each
- // slaved media element in turn,
+ // mediagroup element in turn,
for (auto& mediaElement : m_mediaElements)
mediaElement->play();
@@ -351,11 +351,11 @@
ReadyState newReadyState;
if (m_mediaElements.isEmpty()) {
- // If the MediaController has no slaved media elements, let new readiness state be 0.
+ // If the MediaController has no mediagroup elements, let new readiness state be 0.
newReadyState = HAVE_NOTHING;
} else {
// Otherwise, let it have the lowest value of the readyState IDL attributes of all of its
- // slaved media elements.
+ // mediagroup elements.
newReadyState = m_mediaElements.first()->readyState();
for (size_t index = 1; index < m_mediaElements.size(); ++index)
newReadyState = std::min(newReadyState, m_mediaElements[index]->readyState());
@@ -397,11 +397,11 @@
// Initialize new playback state by setting it to the state given for the first matching
// condition from the following list:
if (m_mediaElements.isEmpty()) {
- // If the MediaController has no slaved media elements
+ // If the MediaController has no mediagroup elements
// Let new playback state be waiting.
newPlaybackState = WAITING;
} else if (hasEnded()) {
- // If all of the MediaController's slaved media elements have ended playback and the media
+ // If all of the MediaController's mediagroup elements have ended playback and the media
// controller playback rate is positive or zero
// Let new playback state be ended.
newPlaybackState = ENDED;
@@ -422,7 +422,7 @@
// and the new playback state is ended,
if (newPlaybackState == ENDED) {
// then queue a task that, if the MediaController object is a playing media controller, and
- // all of the MediaController's slaved media elements have still ended playback, and the
+ // all of the MediaController's mediagroup elements have still ended playback, and the
// media controller playback rate is still positive or zero,
if (!m_paused && hasEnded()) {
// changes the MediaController object to a paused media controller
@@ -497,11 +497,11 @@
bool allPaused = true;
for (auto& element : m_mediaElements) {
- // or if any of its slaved media elements are blocked media elements,
+ // or if any of its mediagroup elements are blocked media elements,
if (element->isBlocked())
return true;
- // or if any of its slaved media elements whose autoplaying flag is true still have their
+ // or if any of its mediagroup elements whose autoplaying flag is true still have their
// paused attribute set to true,
if (element->isAutoplaying() && element->paused())
return true;
@@ -510,7 +510,7 @@
allPaused = false;
}
- // or if all of its slaved media elements have their paused attribute set to true.
+ // or if all of its mediagroup elements have their paused attribute set to true.
return allPaused;
}
@@ -520,7 +520,7 @@
if (m_clock->playRate() < 0)
return false;
- // [and] all of the MediaController's slaved media elements have ended playback ... let new
+ // [and] all of the MediaController's mediagroup elements have ended playback ... let new
// playback state be ended.
if (m_mediaElements.isEmpty())
return false;