зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6532bf066bb4 (bug 882299)
This commit is contained in:
Родитель
2f2426fd1c
Коммит
900bc805d5
|
@ -10,6 +10,9 @@
|
|||
#include "nsComponentManagerUtils.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
|
||||
// Alternate value for the 'auto' keyword.
|
||||
#define WEBVTT_AUTO -1
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
@ -36,7 +39,7 @@ TextTrackCue::SetDefaultCueSettings()
|
|||
mSize = 100;
|
||||
mPauseOnExit = false;
|
||||
mSnapToLines = true;
|
||||
mLine.SetAsAutoKeyword() = AutoKeyword::Auto;
|
||||
mLine = WEBVTT_AUTO;
|
||||
mAlign = AlignSetting::Middle;
|
||||
mLineAlign = AlignSetting::Start;
|
||||
mVertical = DirectionSetting::_empty;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "nsIWebVTTParserWrapper.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "mozilla/dom/UnionTypes.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -163,29 +162,16 @@ public:
|
|||
CueChanged();
|
||||
}
|
||||
|
||||
void GetLine(OwningLongOrAutoKeyword& aLine) const
|
||||
double Line() const
|
||||
{
|
||||
if (mLine.IsLong()) {
|
||||
aLine.SetAsLong() = mLine.GetAsLong();
|
||||
return;
|
||||
}
|
||||
aLine.SetAsAutoKeyword() = mLine.GetAsAutoKeyword();
|
||||
return mLine;
|
||||
}
|
||||
|
||||
void SetLine(const LongOrAutoKeyword& aLine)
|
||||
void SetLine(double aLine)
|
||||
{
|
||||
if (aLine.IsLong() &&
|
||||
(mLine.IsAutoKeyword() || (aLine.GetAsLong() != mLine.GetAsLong()))) {
|
||||
mLine.SetAsLong() = aLine.GetAsLong();
|
||||
CueChanged();
|
||||
//XXX: TODO Line position can be a keyword auto. bug882299
|
||||
mReset = true;
|
||||
return;
|
||||
}
|
||||
if (mLine.IsLong()) {
|
||||
mLine.SetAsAutoKeyword() = aLine.GetAsAutoKeyword();
|
||||
CueChanged();
|
||||
mReset = true;
|
||||
}
|
||||
mLine = aLine;
|
||||
}
|
||||
|
||||
AlignSetting LineAlign() const
|
||||
|
@ -356,7 +342,7 @@ private:
|
|||
bool mSnapToLines;
|
||||
nsString mRegionId;
|
||||
DirectionSetting mVertical;
|
||||
LongOrAutoKeyword mLine;
|
||||
int mLine;
|
||||
AlignSetting mAlign;
|
||||
AlignSetting mLineAlign;
|
||||
|
||||
|
|
|
@ -100,13 +100,6 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
|
|||
cue.lineAlign = "end";
|
||||
is(cue.lineAlign, "end", "Cue's line align should be end.");
|
||||
|
||||
// Check cue.line
|
||||
is(cue.line, "auto", "Cue's line value should initially be auto.");
|
||||
cue.line = 12410
|
||||
is(cue.line, 12410, "Cue's line value should now be 12410.");
|
||||
cue.line = "auto";
|
||||
is(cue.line, "auto", "Cue's line value should now be auto.");
|
||||
|
||||
// Check that we can create and add new VTTCues
|
||||
var vttCue = new VTTCue(3.999, 4, "foo");
|
||||
trackElement.track.addCue(vttCue);
|
||||
|
|
|
@ -840,9 +840,7 @@ def UnionTypes(descriptors, dictionaries, callbacks, config):
|
|||
if typeNeedsRooting(f):
|
||||
headers.add("mozilla/dom/RootedDictionary.h")
|
||||
elif f.isEnum():
|
||||
# Need to see the actual definition of the enum,
|
||||
# unfortunately.
|
||||
headers.add(CGHeaders.getDeclarationFilename(f.inner))
|
||||
headers.add(CGHeaders.getDeclarationFilename(f))
|
||||
|
||||
map(addInfoForType, getAllTypes(descriptors, dictionaries, callbacks))
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ interface VTTCue : EventTarget {
|
|||
attribute DOMString regionId;
|
||||
attribute DirectionSetting vertical;
|
||||
attribute boolean snapToLines;
|
||||
attribute (long or AutoKeyword) line;
|
||||
// XXXhumph: https://www.w3.org/Bugs/Public/show_bug.cgi?id=20651
|
||||
// attribute (long or AutoKeyword) line;
|
||||
[SetterThrows]
|
||||
attribute AlignSetting lineAlign;
|
||||
[SetterThrows]
|
||||
|
|
Загрузка…
Ссылка в новой задаче