Bug 961885 - Rename the enum entries for HTMLTrackElement.readyState, as HTMLTrackElement::ERROR is defined in some other file that can be included in unified builds, causing errors when we add more files to content/media. r=rillian

This commit is contained in:
Chris Pearce 2014-01-23 17:19:34 +13:00
parent ece68b1952
commit 5c90f73c73
5 changed files with 13 additions and 13 deletions

View File

@ -308,7 +308,7 @@ uint16_t
HTMLTrackElement::ReadyState() const
{
if (!mTrack) {
return NONE;
return READY_STATE_NONE;
}
return mTrack->ReadyState();

View File

@ -97,10 +97,10 @@ public:
// Constants for numeric readyState property values.
enum {
NONE = 0U,
LOADING = 1U,
LOADED = 2U,
ERROR = 3U
READY_STATE_NONE = 0U,
READY_STATE_LOADING = 1U,
READY_STATE_LOADED = 2U,
READY_STATE_ERROR = 3U
};
uint16_t ReadyState() const;

View File

@ -61,7 +61,7 @@ TextTrackManager::AddTextTrack(TextTrackKind aKind, const nsAString& aLabel,
{
nsRefPtr<TextTrack> ttrack =
mTextTracks->AddTextTrack(mMediaElement, aKind, aLabel, aLanguage);
ttrack->SetReadyState(HTMLTrackElement::LOADED);
ttrack->SetReadyState(HTMLTrackElement::READY_STATE_LOADED);
AddCues(ttrack);
return ttrack.forget();
}
@ -155,7 +155,7 @@ TextTrackManager::PopulatePendingList()
for (uint32_t index = 0; index < len; ++index) {
TextTrack* ttrack = mTextTracks->IndexedGetter(index, dummy);
if (ttrack && ttrack->Mode() != TextTrackMode::Disabled &&
ttrack->ReadyState() == HTMLTrackElement::LOADING) {
ttrack->ReadyState() == HTMLTrackElement::READY_STATE_LOADING) {
mPendingTextTracks->AddTextTrack(ttrack);
}
}

View File

@ -69,7 +69,7 @@ TextTrack::SetDefaultSettings()
mRegionList = new TextTrackRegionList(mParent);
mCuePos = 0;
mDirty = false;
mReadyState = HTMLTrackElement::NONE;
mReadyState = HTMLTrackElement::READY_STATE_NONE;
}
JSObject*
@ -195,8 +195,8 @@ void
TextTrack::SetReadyState(uint16_t aState)
{
mReadyState = aState;
if (mMediaElement && (mReadyState == HTMLTrackElement::LOADED ||
mReadyState == HTMLTrackElement::ERROR)) {
if (mMediaElement && (mReadyState == HTMLTrackElement::READY_STATE_LOADED ||
mReadyState == HTMLTrackElement::READY_STATE_ERROR)) {
mMediaElement->RemoveTextTrack(this, true);
}
}

View File

@ -78,7 +78,7 @@ WebVTTListener::LoadResource()
rv = mParserWrapper->Watch(this);
NS_ENSURE_SUCCESS(rv, rv);
mElement->mTrack->SetReadyState(HTMLTrackElement::LOADING);
mElement->mTrack->SetReadyState(HTMLTrackElement::READY_STATE_LOADING);
return NS_OK;
}
@ -106,9 +106,9 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
nsISupports* aContext,
nsresult aStatus)
{
if (mElement->ReadyState() != HTMLTrackElement::ERROR) {
if (mElement->ReadyState() != HTMLTrackElement::READY_STATE_ERROR) {
TextTrack* track = mElement->Track();
track->SetReadyState(HTMLTrackElement::LOADED);
track->SetReadyState(HTMLTrackElement::READY_STATE_LOADED);
}
// Attempt to parse any final data the parser might still have.
mParserWrapper->Flush();