Bug 1528420 - part1 : set positionAlign to `auto` by default. r=jya
authorAlastor Wu <alwu@mozilla.com>
Tue, 19 Feb 2019 12:59:27 +0000
changeset 459890 6d27c85a2ec3384204f191956535eb8f06202981
parent 459889 e08d102e6d59795b95d55726254369d7d722ad4a
child 459891 ba8b99b72a3155b4b294f25843c51a054c89851d
push id78450
push useralwu@mozilla.com
push dateTue, 19 Feb 2019 13:00:14 +0000
treeherderautoland@ba8b99b72a31 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1528420
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1528420 - part1 : set positionAlign to `auto` by default. r=jya According to spec [1], By default, the position alignment is set to auto [1] https://www.w3.org/TR/webvtt1/#webvtt-cue-position-automatic-alignment Differential Revision: https://phabricator.services.mozilla.com/D20038
dom/media/TextTrackCue.cpp
--- a/dom/media/TextTrackCue.cpp
+++ b/dom/media/TextTrackCue.cpp
@@ -19,21 +19,21 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(TextT
 
 NS_IMPL_ADDREF_INHERITED(TextTrackCue, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(TextTrackCue, DOMEventTargetHelper)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TextTrackCue)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 StaticRefPtr<nsIWebVTTParserWrapper> TextTrackCue::sParserWrapper;
 
-// Set cue setting defaults based on step 19 & seq.
-// in http://dev.w3.org/html5/webvtt/#parsing
+// Set default value for cue, spec https://w3c.github.io/webvtt/#model-cues
 void TextTrackCue::SetDefaultCueSettings() {
   mPositionIsAutoKeyword = true;
-  mPositionAlign = PositionAlignSetting::Center;
+  // Spec https://www.w3.org/TR/webvtt1/#webvtt-cue-position-automatic-alignment
+  mPositionAlign = PositionAlignSetting::Auto;
   mSize = 100.0;
   mPauseOnExit = false;
   mSnapToLines = true;
   mLineIsAutoKeyword = true;
   mAlign = AlignSetting::Center;
   mLineAlign = LineAlignSetting::Start;
   mVertical = DirectionSetting::_empty;
   mActive = false;