Bug 1284350. Reland on top of backouts "Bug 1299065 - invisible elements in the foreground should also be recorded; r=gerald" r=kaku
Instead of "not visible", "approximately visible", and "visible" (in display port) we now have "approximately not visible", and "approximately visible" which includes "visible".
This commit is contained in:
@@ -6049,10 +6049,18 @@ HTMLMediaElement::OnVisibilityChange(Visibility aNewVisibility)
|
||||
break;
|
||||
}
|
||||
case Visibility::APPROXIMATELY_NONVISIBLE: {
|
||||
if (mPlayTime.IsStarted()) {
|
||||
// Not visible, play time is running -> Start hidden play time if needed.
|
||||
HiddenVideoStart();
|
||||
}
|
||||
|
||||
mDecoder->NotifyOwnerActivityChanged(false);
|
||||
break;
|
||||
}
|
||||
case Visibility::APPROXIMATELY_VISIBLE: {
|
||||
// Visible -> Just pause hidden play time (no-op if already paused).
|
||||
HiddenVideoStop();
|
||||
|
||||
mDecoder->NotifyOwnerActivityChanged(true);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user