зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1346116 part 1 - initialize MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible at HTMLMediaElement::FinishDecoderSetup(); r=jwwang
Initialize the MediaDecoder::mIsElementVisible to be "!aOwner->IsHidden()" at the MediaDecoder's constructor is wrong. Insted, we initialize both MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible to be false at the construtor, and then assign the HTMLMediaElement's real values to them at HTMLMediaElement::FinishDecoderSetup() via the the MediaDecoder::SetActiviyChangesToDecoder(). The initialization values of MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible (in the constructor) do not matter because the valuse are not read untile the first MediaDecoder::SetActiviyChangesToDecoder() method call. MozReview-Commit-ID: Cdovq5pG9Nv --HG-- extra : rebase_source : 91f3b4c2515124b4c195dd246bd9b404178a35de extra : source : 81b5e89a5bd20f37b8c3daa1230db30808026ff4
This commit is contained in:
Родитель
7e43b9cace
Коммит
f758e455ea
|
@ -4713,6 +4713,8 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
|
|||
}
|
||||
// Notify the decoder of suspend taint.
|
||||
mDecoder->SetSuspendTaint(mHasSuspendTaint);
|
||||
// Notify the decoder of the initial activity status.
|
||||
NotifyDecoderActivityChanges();
|
||||
|
||||
// Update decoder principal before we start decoding, since it
|
||||
// can affect how we feed data to MediaStreams
|
||||
|
|
|
@ -395,8 +395,8 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
|||
, mMinimizePreroll(false)
|
||||
, mMediaTracksConstructed(false)
|
||||
, mFiredMetadataLoaded(false)
|
||||
, mIsDocumentVisible(!aOwner->IsHidden())
|
||||
, mIsElementVisible(!aOwner->IsHidden())
|
||||
, mIsDocumentVisible(false)
|
||||
, mIsElementVisible(false)
|
||||
, mForcedHidden(false)
|
||||
, mHasSuspendTaint(false)
|
||||
, INIT_MIRROR(mStateMachineIsShutdown, true)
|
||||
|
|
Загрузка…
Ссылка в новой задаче