mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1143537 - Part 1: Fix test numbering. r=jdaggett (b991d2fca) - Bug 1143537 - Part 2: Test descriptor getters for CSS-connected FontFaces when the descriptor isn't present. r=jdaggett (2ed363737) - Bug 1143537 - Part 3: Serialize unicode-range without leading zeroes. r=jdaggett (f3e6cfe5f) - Bug 1143537 - Part 4: Serialize FontFace unicodeRange and fontFeatureBug 1143537 - Part 4: Serialize FontFace unicodeRange and fontFeature (acf97f1c6) - Bug 1143537 - Part 5: Test status of FontFace and FontFaceSet with @font-face rules. r=jdaggett (477d01717) - Bug 1145506 - Make FontFace constructor fail on invalid src strings but otherwise create user font entries immediately. r=jdaggett (7c19fa8e7) - Bug 1153628 - Break FontFaceSet <-> UserFontSet cycle when a document's pres shell is going away. r=mccr8 (280ecbcbc) - Bug 1152647 - Part 1: Test. r=jdaggett (802141c54) - Bug 1152647 - Part 2: Ignore requests to add/delete a rule-backed FontFace to/from a FontFaceSet. r=jdaggett (2dc5f06a9) - Bug 1162855 - Traverse FontFaceSet's mUserFontSet's pointer back to the FontFaceSet. r=smaug (eb86c10d9) - Bug 1163449 - Remove OOM check when creating new nsFontFaceLoader. r=jdaggett (67c23c744) - Bug 1163865 - Remove [Throws] from FontFaceSet.delete. r=smaug (c83f95505) - Bug 1173001 - Initialize reader task queue in the constructor. r=jww (efecb4a62) - Bug 1173001 - Enable tail dispatch for the decode task queue. r=jww (11e8feaad) - Bug 1161413 - Part 1: Create FontFaceSet with a document rather than a pres context. r=jdaggett (1d5e642c7) - Bug 1161413 - Part 2: Create FontFace objects with a FontFaceSet rather than a pres context. r=jdaggett (0076f1907) - Bug 1161413 - Part 3: Only reflow from the font face loader if we have a pres context. r=jdaggett (7a6aab61a) - bug 1144602 - preconnect test handler should only count 1 syn r=test-only (4d6022758) - bug 1144602 - test_rel_preconnect orange r=test-only (05dac1e9f) - Bug 1162243 - add anonymous speculative connections r=hurley (6bd6bffc3) - bug 1174152 - crossorigin attribute for link rel=preconnect r=hsivonen (7b1178fa4) - Bug 1173289 - Remove WakeDecoderRunnable from MDSM. r=roc. (9782c6dd6) - Bug 1161413 - Part 4: Move FontFaceSet ownership from nsPresContext to nsIDocument. r=smaug (bc9dc2b87) - Bug 1161413 - Part 5: Cancel font loads on FontFaceSet destruction. r=jdaggett (37595e28e) - Bug 1161413 - Part 6: Update test assertion annotations. r=jdaggett (23c93ca28) - Bug 1161413 - Part 7: Test Font Loading API in a display:none iframe. r=jdaggett (377222287) - Bug 1173248 - Remove the workaround introduced to MDSM by bug 951278. r=cpearce. (43ecb0e42) - Bug 1163879 - Remove FontFaceSet::mUnavailableFontFaces. r=jdaggett (b86a68998) - Bug 1155015 - Hide FontFaceSet.load() until we implement it. r=bzbarsky (8ba0953f0) - Bug 1072102 - Part 1: Implement FontFaceSet load and check. r=jdaggett,bzbarsky (7f4c8c7f1) - Bug 1143995 - Remove unnecessary layout flushes from test_font_loading_api.html. r=jdaggett (38a3df578) - Bug 1146199 - Return empty string from FontFace.family if the FontFace was constructed with an invalid family name. r=jdaggett (dd2d9b6eb) - Bug 1072102 - Part 2: Tests. r=jdaggett (5966dd4ac) - Bug 1179675 - Make FontFaceSet.cpp compile as part of UNIFIED_SOURCES. r=jdaggett (665712d80) - Bug 1134096 - Revise docs for ::NewChannel2, ::GetChannelPrincipal and add deprecation warnings (r=tanvi,sicking) (64fe28638) - Bug 647010 - Limit when HTTP authentication dialog is shown. Block cross-origin http auth prompts with pref. r=mayhemer, r=tanvi (bf3f529d0) - Bug 1147699 follow-up: Disable the plugin test on Mulet (bdca19965) - Bug 1168676 - Switch off embed/object ServiceWorker interception. r=ehsan (9d0b09b66) - Bug 1125325 - Store TabParents with their WindowRoot. r=smaug (9e651f902)
This commit is contained in:
@@ -180,7 +180,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
|
||||
bool aRealTime) :
|
||||
mDecoder(aDecoder),
|
||||
mTaskQueue(new MediaTaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK),
|
||||
/* aAssertTailDispatch = */ true)),
|
||||
/* aSupportsTailDispatch = */ true)),
|
||||
mWatchManager(this, mTaskQueue),
|
||||
mRealTime(aRealTime),
|
||||
mDispatchedStateMachine(false),
|
||||
@@ -284,8 +284,6 @@ MediaDecoderStateMachine::~MediaDecoderStateMachine()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Should be on main thread.");
|
||||
MOZ_COUNT_DTOR(MediaDecoderStateMachine);
|
||||
NS_ASSERTION(!mPendingWakeDecoder.get(),
|
||||
"WakeDecoder should have been revoked already");
|
||||
|
||||
mReader = nullptr;
|
||||
|
||||
@@ -461,8 +459,6 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
AudioSegment* audio = new AudioSegment();
|
||||
mediaStream->AddAudioTrack(audioTrackId, mInfo.mAudio.mRate, 0, audio,
|
||||
SourceMediaStream::ADDTRACK_QUEUED);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(audioTrackId,
|
||||
TaskQueue(), GetWakeDecoderRunnable());
|
||||
stream->mNextAudioTime = mStreamStartTime;
|
||||
}
|
||||
if (mInfo.HasVideo()) {
|
||||
@@ -470,9 +466,6 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
VideoSegment* video = new VideoSegment();
|
||||
mediaStream->AddTrack(videoTrackId, 0, video,
|
||||
SourceMediaStream::ADDTRACK_QUEUED);
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(videoTrackId,
|
||||
TaskQueue(), GetWakeDecoderRunnable());
|
||||
|
||||
stream->mNextVideoTime = mStreamStartTime;
|
||||
}
|
||||
mediaStream->FinishAddTracks();
|
||||
@@ -601,18 +594,6 @@ void MediaDecoderStateMachine::SendStreamData()
|
||||
}
|
||||
}
|
||||
|
||||
MediaDecoderStateMachine::WakeDecoderRunnable*
|
||||
MediaDecoderStateMachine::GetWakeDecoderRunnable()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
if (!mPendingWakeDecoder.get()) {
|
||||
mPendingWakeDecoder = new WakeDecoderRunnable(this);
|
||||
}
|
||||
return mPendingWakeDecoder.get();
|
||||
}
|
||||
|
||||
bool MediaDecoderStateMachine::HaveEnoughDecodedAudio(int64_t aAmpleAudioUSecs)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
@@ -634,8 +615,6 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedAudio(int64_t aAmpleAudioUSecs)
|
||||
if (!stream->mStream->HaveEnoughBuffered(audioTrackId)) {
|
||||
return false;
|
||||
}
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(audioTrackId,
|
||||
TaskQueue(), GetWakeDecoderRunnable());
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -658,8 +637,6 @@ bool MediaDecoderStateMachine::HaveEnoughDecodedVideo()
|
||||
if (!stream->mStream->HaveEnoughBuffered(videoTrackId)) {
|
||||
return false;
|
||||
}
|
||||
stream->mStream->DispatchWhenNotEnoughBuffered(videoTrackId,
|
||||
TaskQueue(), GetWakeDecoderRunnable());
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1256,10 +1233,6 @@ nsresult MediaDecoderStateMachine::Init(MediaDecoderStateMachine* aCloneDonor)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (NS_WARN_IF(!mReader->EnsureTaskQueue())) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
MediaDecoderReader* cloneReader = nullptr;
|
||||
if (aCloneDonor) {
|
||||
cloneReader = aCloneDonor->mReader;
|
||||
@@ -1554,8 +1527,6 @@ void MediaDecoderStateMachine::SetDormant(bool aDormant)
|
||||
// it here as well.
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableMethod(mReader, &MediaDecoderReader::ReleaseMediaResources);
|
||||
DecodeTaskQueue()->Dispatch(r.forget());
|
||||
// There's now no possibility of mPendingWakeDecoder being needed again. Revoke it.
|
||||
mPendingWakeDecoder = nullptr;
|
||||
mDecoder->GetReentrantMonitor().NotifyAll();
|
||||
} else if ((aDormant != true) && (mState == DECODER_STATE_DORMANT)) {
|
||||
mDecodingFrozenAtStateDecoding = true;
|
||||
@@ -1880,7 +1851,7 @@ MediaDecoderStateMachine::InitiateSeek()
|
||||
seekTime = std::min(seekTime, end);
|
||||
seekTime = std::max(mStartTime, seekTime);
|
||||
NS_ASSERTION(seekTime >= mStartTime && seekTime <= end,
|
||||
"Can only seek in range [0,duration]");
|
||||
"Can only seek in range [0,duration]");
|
||||
mCurrentSeek.mTarget.mTime = seekTime;
|
||||
|
||||
if (mAudioCaptured) {
|
||||
@@ -2551,10 +2522,6 @@ MediaDecoderStateMachine::FinishShutdown()
|
||||
AudioQueue().ClearListeners();
|
||||
VideoQueue().ClearListeners();
|
||||
|
||||
// Now that those threads are stopped, there's no possibility of
|
||||
// mPendingWakeDecoder being needed again. Revoke it.
|
||||
mPendingWakeDecoder = nullptr;
|
||||
|
||||
// Disconnect canonicals and mirrors before shutting down our task queue.
|
||||
mEstimatedDuration.DisconnectIfConnected();
|
||||
mExplicitDuration.DisconnectIfConnected();
|
||||
@@ -3022,11 +2989,7 @@ void MediaDecoderStateMachine::AdvanceFrame()
|
||||
int64_t delta = currentFrame->mTime - clock_time;
|
||||
TimeStamp presTime = nowTime + TimeDuration::FromMicroseconds(delta / mPlaybackRate);
|
||||
NS_ASSERTION(currentFrame->mTime >= mStartTime, "Should have positive frame time");
|
||||
// Filter out invalid frames by checking the frame time. FrameTime could be
|
||||
// zero if it's a initial frame.
|
||||
int64_t frameTime = currentFrame->mTime - mStartTime;
|
||||
if (frameTime > 0 || (frameTime == 0 && mPlayDuration == 0) ||
|
||||
IsRealTime()) {
|
||||
{
|
||||
ReentrantMonitorAutoExit exitMon(mDecoder->GetReentrantMonitor());
|
||||
// If we have video, we want to increment the clock in steps of the frame
|
||||
// duration.
|
||||
|
||||
Reference in New Issue
Block a user