diff --git a/content/media/TextTrackCue.cpp b/content/media/TextTrackCue.cpp index ca06c4d6050..d80920b8483 100644 --- a/content/media/TextTrackCue.cpp +++ b/content/media/TextTrackCue.cpp @@ -41,7 +41,6 @@ TextTrackCue::SetDefaultCueSettings() mSnapToLines = true; mLine = WEBVTT_AUTO; mAlign = AlignSetting::Middle; - mLineAlign = AlignSetting::Start; mVertical = DirectionSetting::_empty; } diff --git a/content/media/TextTrackCue.h b/content/media/TextTrackCue.h index 545f1c5c820..70f34549131 100644 --- a/content/media/TextTrackCue.h +++ b/content/media/TextTrackCue.h @@ -174,26 +174,6 @@ public: mLine = aLine; } - AlignSetting LineAlign() const - { - return mLineAlign; - } - - void SetLineAlign(AlignSetting& aLineAlign, ErrorResult& aRv) - { - if (mLineAlign == aLineAlign) - return; - - if (aLineAlign == AlignSetting::Left || - aLineAlign == AlignSetting::Right) { - return aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR); - } - - mReset = true; - mLineAlign = aLineAlign; - CueChanged(); - } - int32_t Position() const { return mPosition; @@ -344,7 +324,6 @@ private: DirectionSetting mVertical; int mLine; AlignSetting mAlign; - AlignSetting mLineAlign; // Holds the computed DOM elements that represent the parsed cue text. // http://www.whatwg.org/specs/web-apps/current-work/#text-track-cue-display-state diff --git a/content/media/test/test_texttrackcue.html b/content/media/test/test_texttrackcue.html index 81a259f6d93..f19cc76a1f7 100644 --- a/content/media/test/test_texttrackcue.html +++ b/content/media/test/test_texttrackcue.html @@ -72,34 +72,6 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, cue.pauseOnExit = true; is(cue.pauseOnExit, true, "Cue's pause on exit flag should be true."); - // Check that cue line align works properly - is(cue.lineAlign, "start", "Cue's default line alignment should be start."); - - var exceptionHappened = false; - try { - cue.lineAlign = "left"; - } catch(e) { - exceptionHappened = true; - is(e.name, "SyntaxError", "Should have thrown SyntaxError."); - } - ok(exceptionHappened, "Exception should have happened."); - - exceptionHappened = false; - try { - cue.lineAlign = "right"; - } catch(e) { - exceptionHappened = true; - is(e.name, "SyntaxError", "Should have thrown SyntaxError."); - } - ok(exceptionHappened, "Exception should have happened."); - - cue.lineAlign = "middle"; - is(cue.lineAlign, "middle", "Cue's line align should be middle."); - cue.lineAlign = "START"; - is(cue.lineAlign, "middle", "Cue's line align should be middle."); - cue.lineAlign = "end"; - is(cue.lineAlign, "end", "Cue's line align should be end."); - // Check that we can create and add new VTTCues var vttCue = new VTTCue(3.999, 4, "foo"); trackElement.track.addCue(vttCue); @@ -119,7 +91,7 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, trackElement.track.removeCue(cue); is(cueList.length, 4, "Cue list length should be 4."); - exceptionHappened = false; + var exceptionHappened = false; try { // We should not be able to remove a cue that is not in the list. cue = new VTTCue(1, 2, "foo"); diff --git a/dom/webidl/VTTCue.webidl b/dom/webidl/VTTCue.webidl index 5030ffaf204..7bab05095fb 100644 --- a/dom/webidl/VTTCue.webidl +++ b/dom/webidl/VTTCue.webidl @@ -38,8 +38,6 @@ interface VTTCue : EventTarget { // XXXhumph: https://www.w3.org/Bugs/Public/show_bug.cgi?id=20651 // attribute (long or AutoKeyword) line; [SetterThrows] - attribute AlignSetting lineAlign; - [SetterThrows] attribute long position; [SetterThrows] attribute long size;