<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[236143] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/236143">236143</a></dd>
<dt>Author</dt> <dd>pvollan@apple.com</dd>
<dt>Date</dt> <dd>2018-09-18 09:07:24 -0700 (Tue, 18 Sep 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebVTT] change "middle" to "center" for consistency with CSS
https://bugs.webkit.org/show_bug.cgi?id=158478

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, covered by existing tests.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::centerKeyword):
(WebCore::VTTCue::initialize):
(WebCore::VTTCue::align const):
(WebCore::VTTCue::setAlign):
(WebCore::VTTCue::calculateDisplayParameters):
(WebCore::VTTCue::setCueSettings):
(WebCore::middleKeyword): Deleted.
* html/track/VTTCue.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTTreeBuilder::buildFromString):

LayoutTests:

* media/track/track-add-remove-cue-expected.txt:
* media/track/track-add-remove-cue.html:
* media/track/track-cue-mutable-expected.txt:
* media/track/track-cue-mutable.html:
* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
* media/track/track-vttcue-expected.txt:
* media/track/track-vttcue.html:
* media/track/track-webvtt-tc013-settings-expected.txt:
* media/track/track-webvtt-tc013-settings.html:
* media/track/track-webvtt-tc014-alignment-expected.txt:
* media/track/track-webvtt-tc014-alignment.html:
* media/track/track-webvtt-tc016-align-positioning-expected.txt:
* media/track/track-webvtt-tc016-align-positioning.html:
* media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
* media/track/track-webvtt-tc018-align-text-line-position.html:
* media/track/track-webvtt-tc020-cue-size-align-expected.txt:
* media/track/track-webvtt-tc020-cue-size-align.html:
* media/track/track-webvtt-tc021-valign-expected.txt:
* media/track/track-webvtt-tc021-valign.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackaddremovecueexpectedtxt">trunk/LayoutTests/media/track/track-add-remove-cue-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackaddremovecuehtml">trunk/LayoutTests/media/track/track-add-remove-cue.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackcuemutableexpectedtxt">trunk/LayoutTests/media/track/track-cue-mutable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackcuemutablehtml">trunk/LayoutTests/media/track/track-cue-mutable.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackcuerenderingsnaptolinesnotsetexpectedtxt">trunk/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackvttcueexpectedtxt">trunk/LayoutTests/media/track/track-vttcue-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackvttcuehtml">trunk/LayoutTests/media/track/track-vttcue.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc013settingsexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc013settingshtml">trunk/LayoutTests/media/track/track-webvtt-tc013-settings.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc014alignmentexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc014alignmenthtml">trunk/LayoutTests/media/track/track-webvtt-tc014-alignment.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc016alignpositioningexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc016alignpositioninghtml">trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc018aligntextlinepositionexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc018aligntextlinepositionhtml">trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc020cuesizealignexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc020cuesizealignhtml">trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc021valignexpectedtxt">trunk/LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackwebvtttc021valignhtml">trunk/LayoutTests/media/track/track-webvtt-tc021-valign.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmltrackTextTrackCueGenericcpp">trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackVTTCuecpp">trunk/Source/WebCore/html/track/VTTCue.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmltrackVTTCueh">trunk/Source/WebCore/html/track/VTTCue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/ChangeLog 2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2018-09-18  Per Arne Vollan  <pvollan@apple.com>
+
+        [WebVTT] change "middle" to "center" for consistency with CSS
+        https://bugs.webkit.org/show_bug.cgi?id=158478
+
+        Reviewed by Eric Carlson.
+
+        * media/track/track-add-remove-cue-expected.txt:
+        * media/track/track-add-remove-cue.html:
+        * media/track/track-cue-mutable-expected.txt:
+        * media/track/track-cue-mutable.html:
+        * media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
+        * media/track/track-vttcue-expected.txt:
+        * media/track/track-vttcue.html:
+        * media/track/track-webvtt-tc013-settings-expected.txt:
+        * media/track/track-webvtt-tc013-settings.html:
+        * media/track/track-webvtt-tc014-alignment-expected.txt:
+        * media/track/track-webvtt-tc014-alignment.html:
+        * media/track/track-webvtt-tc016-align-positioning-expected.txt:
+        * media/track/track-webvtt-tc016-align-positioning.html:
+        * media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
+        * media/track/track-webvtt-tc018-align-text-line-position.html:
+        * media/track/track-webvtt-tc020-cue-size-align-expected.txt:
+        * media/track/track-webvtt-tc020-cue-size-align.html:
+        * media/track/track-webvtt-tc021-valign-expected.txt:
+        * media/track/track-webvtt-tc021-valign.html:
+
</ins><span class="cx"> 2018-09-18  Claudio Saavedra  <csaavedra@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [WPE] Gardening after r236124
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackaddremovecueexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-add-remove-cue-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-add-remove-cue-expected.txt  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-add-remove-cue-expected.txt     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> EXPECTED (textCue.line == '-1') OK
</span><span class="cx"> EXPECTED (textCue.position == '50') OK
</span><span class="cx"> EXPECTED (textCue.size == '100') OK
</span><del>-EXPECTED (textCue.align == 'middle') OK
</del><ins>+EXPECTED (textCue.align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> *** Add the new cue to a track, make sure it is inserted correctly.
</span><span class="cx"> RUN(testTrack.track.addCue(textCue))
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> EXPECTED (newCue.line == '-1') OK
</span><span class="cx"> EXPECTED (newCue.position == '50') OK
</span><span class="cx"> EXPECTED (newCue.size == '100') OK
</span><del>-EXPECTED (newCue.align == 'middle') OK
</del><ins>+EXPECTED (newCue.align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> *** Create an old-style cue with an id.
</span><span class="cx"> RUN(invalidCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?'))
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackaddremovecuehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-add-remove-cue.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-add-remove-cue.html  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-add-remove-cue.html     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                 testExpected("textCue.line", -1);
</span><span class="cx">                 testExpected("textCue.position", 50);
</span><span class="cx">                 testExpected("textCue.size", 100);
</span><del>-                testExpected("textCue.align", "middle");
</del><ins>+                testExpected("textCue.align", "center");
</ins><span class="cx"> 
</span><span class="cx">                 consoleWrite("<br>*** Add the new cue to a track, make sure it is inserted correctly.");
</span><span class="cx">                 run("testTrack.track.addCue(textCue)");
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">                 testExpected("newCue.line", -1);
</span><span class="cx">                 testExpected("newCue.position", 50);
</span><span class="cx">                 testExpected("newCue.size", 100);
</span><del>-                testExpected("newCue.align", "middle");
</del><ins>+                testExpected("newCue.align", "center");
</ins><span class="cx"> 
</span><span class="cx">                 consoleWrite("<br>*** Create an old-style cue with an id.");
</span><span class="cx">                 run("invalidCue = new VTTCue('sausage-cue', 33, 3.4, 'Sausage?')");
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackcuemutableexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-cue-mutable-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-cue-mutable-expected.txt     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-cue-mutable-expected.txt        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> EXPECTED (textCue.line == '-1') OK
</span><span class="cx"> EXPECTED (textCue.position == '50') OK
</span><span class="cx"> EXPECTED (textCue.size == '100') OK
</span><del>-EXPECTED (textCue.align == 'middle') OK
</del><ins>+EXPECTED (textCue.align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> ** Modify cue values.
</span><span class="cx"> RUN(textCue.startTime = 1.1)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> On setting, the text track cue alignment must be set to the value ... is a case-sensitive match for the new value, if any. If none of the values match, then the user agent must instead throw a SyntaxError exception.
</span><span class="cx"> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-align
</span><span class="cx"> TEST(textCue.align = 'End') THROWS(DOMException.SYNTAX_ERR) OK
</span><del>-EXPECTED (textCue.align == 'middle') OK
</del><ins>+EXPECTED (textCue.align == 'center') OK
</ins><span class="cx"> RUN(textCue.align = 'end')
</span><span class="cx"> EXPECTED (textCue.align == 'end') OK
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackcuemutablehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-cue-mutable.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-cue-mutable.html     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-cue-mutable.html        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">                 testExpected("textCue.line", -1);
</span><span class="cx">                 testExpected("textCue.position", 50);
</span><span class="cx">                 testExpected("textCue.size", 100);
</span><del>-                testExpected("textCue.align", "middle");
</del><ins>+                testExpected("textCue.align", "center");
</ins><span class="cx"> 
</span><span class="cx">                 consoleWrite("<br>** Modify cue values.");
</span><span class="cx"> 
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">                 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-align",
</span><span class="cx">                            "On setting, the text track cue alignment must be set to the value ... is a case-sensitive match for the new value, if any. If none of the values match, then the user agent must instead throw a SyntaxError exception.");
</span><span class="cx">                 testDOMException("textCue.align = 'End'", "DOMException.SYNTAX_ERR");
</span><del>-                testExpected("textCue.align", "middle");
</del><ins>+                testExpected("textCue.align", "center");
</ins><span class="cx">                 run("textCue.align = 'end'");
</span><span class="cx">                 testExpected("textCue.align", "end");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackcuerenderingsnaptolinesnotsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Cue 0 *
</span><span class="cx"> EXPECTED (cueDisplayElement.innerText == 'This is a demo track to illustrate positioning features of cues.') OK
</span><del>-Cue alignment (default or as specified): middle
</del><ins>+Cue alignment (default or as specified): center
</ins><span class="cx"> Cue left position (percentage): 50
</span><span class="cx"> Cue top position (percentage): 100
</span><span class="cx"> 
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Cue 0 *
</span><span class="cx"> EXPECTED (cueDisplayElement.innerText == 'Using HTML5 captions, you can position the cues anywhere.') OK
</span><del>-Cue alignment (default or as specified): middle
</del><ins>+Cue alignment (default or as specified): center
</ins><span class="cx"> Cue left position (percentage): 50
</span><span class="cx"> Cue top position (percentage): 50
</span><span class="cx"> 
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Cue 0 *
</span><span class="cx"> EXPECTED (cueDisplayElement.innerText == 'Cues are implicitly displayed within the viewport area.') OK
</span><del>-Cue alignment (default or as specified): middle
</del><ins>+Cue alignment (default or as specified): center
</ins><span class="cx"> Cue left position (percentage): 50
</span><span class="cx"> Cue top position (percentage): 50
</span><span class="cx"> 
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Cue 0 *
</span><span class="cx"> EXPECTED (cueDisplayElement.innerText == 'You may even have multiple cues in the same time.') OK
</span><del>-Cue alignment (default or as specified): middle
</del><ins>+Cue alignment (default or as specified): center
</ins><span class="cx"> Cue left position (percentage): 50
</span><span class="cx"> Cue top position (percentage): 50
</span><span class="cx"> 
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> 
</span><span class="cx"> * Cue 3 *
</span><span class="cx"> EXPECTED (cueDisplayElement.innerText == 'Bottom cue.') OK
</span><del>-Cue alignment (default or as specified): middle
</del><ins>+Cue alignment (default or as specified): center
</ins><span class="cx"> Cue left position (percentage): 50
</span><span class="cx"> Cue top position (percentage): 100
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackvttcueexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-vttcue-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-vttcue-expected.txt  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-vttcue-expected.txt     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> EXPECTED (trackCue.line == '-1') OK
</span><span class="cx"> EXPECTED (trackCue.position == '50') OK
</span><span class="cx"> EXPECTED (trackCue.size == '100') OK
</span><del>-EXPECTED (trackCue.align == 'middle') OK
</del><ins>+EXPECTED (trackCue.align == 'center') OK
</ins><span class="cx"> EXPECTED (trackCue.text == 'Lorem') OK
</span><span class="cx"> EXPECTED (serialize(trackCue.getCueAsHTML()) == 'Lorem') OK
</span><span class="cx"> 
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> EXPECTED (newCue.line == '-1') OK
</span><span class="cx"> EXPECTED (newCue.position == '50') OK
</span><span class="cx"> EXPECTED (newCue.size == '100') OK
</span><del>-EXPECTED (newCue.align == 'middle') OK
</del><ins>+EXPECTED (newCue.align == 'center') OK
</ins><span class="cx"> EXPECTED (newCue.text == 'Pie') OK
</span><span class="cx"> EXPECTED (serialize(newCue.getCueAsHTML()) == 'Pie') OK
</span><span class="cx"> END OF TEST
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackvttcuehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-vttcue.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-vttcue.html  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-vttcue.html     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">                 testExpected("trackCue.line", -1);
</span><span class="cx">                 testExpected("trackCue.position", 50);
</span><span class="cx">                 testExpected("trackCue.size", 100);
</span><del>-                testExpected("trackCue.align", "middle");
</del><ins>+                testExpected("trackCue.align", "center");
</ins><span class="cx">                 testExpected("trackCue.text", "Lorem");
</span><span class="cx">                 testExpected("serialize(trackCue.getCueAsHTML())", 'Lorem');
</span><span class="cx"> 
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                 testExpected("newCue.line", -1);
</span><span class="cx">                 testExpected("newCue.position", 50);
</span><span class="cx">                 testExpected("newCue.size", 100);
</span><del>-                testExpected("newCue.align", "middle");
</del><ins>+                testExpected("newCue.align", "center");
</ins><span class="cx">                 testExpected("newCue.text", "Pie");
</span><span class="cx">                 testExpected("serialize(newCue.getCueAsHTML())", 'Pie');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc013settingsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt   2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt      2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -10,11 +10,11 @@
</span><span class="cx"> EXPECTED (cues[0].vertical == '') OK
</span><span class="cx"> EXPECTED (cues[1].line == '15') OK
</span><span class="cx"> EXPECTED (cues[1].position == '40') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[1].vertical == 'rl') OK
</span><span class="cx"> EXPECTED (cues[2].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[2].position == '10') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].vertical == '') OK
</span><span class="cx"> EXPECTED (cues[3].line == '95') OK
</span><span class="cx"> EXPECTED (cues[3].position == '50') OK
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> EXPECTED (cues.length == '4') OK
</span><span class="cx"> EXPECTED (cues[0].line == '43') OK
</span><span class="cx"> EXPECTED (cues[0].position == '10') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[0].vertical == '') OK
</span><span class="cx"> EXPECTED (cues[1].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[1].position == '50') OK
</span><span class="lines">@@ -33,11 +33,11 @@
</span><span class="cx"> EXPECTED (cues[1].vertical == '') OK
</span><span class="cx"> EXPECTED (cues[2].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[2].position == '50') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].vertical == '') OK
</span><span class="cx"> EXPECTED (cues[3].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[3].position == '90') OK
</span><del>-EXPECTED (cues[3].align == 'middle') OK
</del><ins>+EXPECTED (cues[3].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[3].vertical == 'lr') OK
</span><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc013settingshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc013-settings.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc013-settings.html   2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc013-settings.html      2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">                             },
</span><span class="cx">                             {
</span><span class="cx">                                 property : "align",
</span><del>-                                values : ["start", "middle", "middle", "end"],
</del><ins>+                                values : ["start", "center", "center", "end"],
</ins><span class="cx">                             },
</span><span class="cx">                             {
</span><span class="cx">                                 property : "vertical",
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">                             },
</span><span class="cx">                             {
</span><span class="cx">                                 property : "align",
</span><del>-                                values : ["middle", "end", "middle", "middle"],
</del><ins>+                                values : ["center", "end", "center", "center"],
</ins><span class="cx">                             },
</span><span class="cx">                             {
</span><span class="cx">                                 property : "vertical",
</span><span class="lines">@@ -81,4 +81,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc013-settings-bad-separation.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc014alignmentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -5,22 +5,22 @@
</span><span class="cx"> *** Testing text track 0
</span><span class="cx"> EXPECTED (cues.length == '4') OK
</span><span class="cx"> EXPECTED (cues[0].align == 'start') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].align == 'end') OK
</span><del>-EXPECTED (cues[3].align == 'middle') OK
</del><ins>+EXPECTED (cues[3].align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> *** Testing text track 1
</span><span class="cx"> EXPECTED (cues.length == '4') OK
</span><span class="cx"> EXPECTED (cues[0].align == 'start') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].align == 'end') OK
</span><del>-EXPECTED (cues[3].align == 'middle') OK
</del><ins>+EXPECTED (cues[3].align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> *** Testing text track 2
</span><span class="cx"> EXPECTED (cues.length == '4') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
-EXPECTED (cues[1].align == 'middle') OK
-EXPECTED (cues[2].align == 'middle') OK
-EXPECTED (cues[3].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
+EXPECTED (cues[1].align == 'center') OK
+EXPECTED (cues[2].align == 'center') OK
+EXPECTED (cues[3].align == 'center') OK
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc014alignmenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc014-alignment.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc014-alignment.html  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc014-alignment.html     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">                     [
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["start", "middle", "end", "middle"],
</del><ins>+                            values : ["start", "center", "end", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">                     [
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["middle", "middle", "middle", "middle"],
</del><ins>+                            values : ["center", "center", "center", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -66,4 +66,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc014-alignment-bad.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc016alignpositioningexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> EXPECTED (cues[0].position == '10') OK
</span><span class="cx"> EXPECTED (cues[0].align == 'start') OK
</span><span class="cx"> EXPECTED (cues[1].position == '20') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].position == '80') OK
</span><span class="cx"> EXPECTED (cues[2].align == 'end') OK
</span><span class="cx"> 
</span><span class="lines">@@ -14,10 +14,10 @@
</span><span class="cx"> *** Testing text track 1
</span><span class="cx"> EXPECTED (cues.length == '3') OK
</span><span class="cx"> EXPECTED (cues[0].position == '10') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[1].position == '50') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].position == '50') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc016alignpositioninghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc016-align-positioning.html     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["start", "middle", "end"],
</del><ins>+                            values : ["start", "center", "end"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["middle", "middle", "middle"],
</del><ins>+                            values : ["center", "center", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -72,4 +72,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc016-align-positioning-bad.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc018aligntextlinepositionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt   2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt      2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> EXPECTED (cues[1].position == '50') OK
</span><span class="cx"> EXPECTED (cues[1].line == '0') OK
</span><span class="cx"> EXPECTED (cues[1].snapToLines == 'true') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].position == '80.3') OK
</span><span class="cx"> EXPECTED (cues[2].line == '80.08') OK
</span><span class="cx"> EXPECTED (cues[2].snapToLines == 'false') OK
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> EXPECTED (cues[3].position == '30') OK
</span><span class="cx"> EXPECTED (cues[3].line == '5') OK
</span><span class="cx"> EXPECTED (cues[3].snapToLines == 'true') OK
</span><del>-EXPECTED (cues[4].align == 'middle') OK
</del><ins>+EXPECTED (cues[4].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[4].position == '60') OK
</span><span class="cx"> EXPECTED (cues[4].line == '-3') OK
</span><span class="cx"> EXPECTED (cues[4].snapToLines == 'true') OK
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> *** Testing text track 1
</span><span class="cx"> EXPECTED (cues.length == '3') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[0].position == '50') OK
</span><span class="cx"> EXPECTED (cues[0].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[0].snapToLines == 'true') OK
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> EXPECTED (cues[1].position == '0') OK
</span><span class="cx"> EXPECTED (cues[1].line == '-1') OK
</span><span class="cx"> EXPECTED (cues[1].snapToLines == 'true') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[2].position == '60') OK
</span><span class="cx"> EXPECTED (cues[2].line == '-3') OK
</span><span class="cx"> EXPECTED (cues[2].snapToLines == 'true') OK
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc018aligntextlinepositionhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html   2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html      2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">                     [
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["start", "start", "middle", "end", "middle"],
</del><ins>+                            values : ["start", "start", "center", "end", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "position",
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">                     [
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["middle", "end", "middle"],
</del><ins>+                            values : ["center", "end", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "position",
</span><span class="lines">@@ -91,4 +91,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc018-align-text-line-position-bad.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc020cuesizealignexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -9,15 +9,15 @@
</span><span class="cx"> EXPECTED (cues[1].size == '10') OK
</span><span class="cx"> EXPECTED (cues[1].align == 'end') OK
</span><span class="cx"> EXPECTED (cues[2].size == '0') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> 
</span><span class="cx"> *** Testing text track 1
</span><span class="cx"> EXPECTED (cues.length == '3') OK
</span><span class="cx"> EXPECTED (cues[0].size == '100') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[1].size == '100') OK
</span><span class="cx"> EXPECTED (cues[1].align == 'end') OK
</span><span class="cx"> EXPECTED (cues[2].size == '100') OK
</span><del>-EXPECTED (cues[2].align == 'middle') OK
</del><ins>+EXPECTED (cues[2].align == 'center') OK
</ins><span class="cx"> END OF TEST
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc020cuesizealignhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["start", "end", "middle"],
</del><ins>+                            values : ["start", "end", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["middle", "end", "middle"],
</del><ins>+                            values : ["center", "end", "center"],
</ins><span class="cx">                         },
</span><span class="cx">                     ],
</span><span class="cx">                 };
</span><span class="lines">@@ -72,4 +72,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc020-cue-size-align-bad.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc021valignexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -5,10 +5,10 @@
</span><span class="cx"> *** Testing text track 0
</span><span class="cx"> EXPECTED (cues.length == '3') OK
</span><span class="cx"> EXPECTED (cues[0].vertical == 'rl') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[0].position == '50') OK
</span><span class="cx"> EXPECTED (cues[1].vertical == 'lr') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[1].position == '50') OK
</span><span class="cx"> EXPECTED (cues[2].vertical == 'rl') OK
</span><span class="cx"> EXPECTED (cues[2].align == 'start') OK
</span><span class="lines">@@ -17,10 +17,10 @@
</span><span class="cx"> *** Testing text track 1
</span><span class="cx"> EXPECTED (cues.length == '3') OK
</span><span class="cx"> EXPECTED (cues[0].vertical == 'rl') OK
</span><del>-EXPECTED (cues[0].align == 'middle') OK
</del><ins>+EXPECTED (cues[0].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[0].position == '50') OK
</span><span class="cx"> EXPECTED (cues[1].vertical == 'lr') OK
</span><del>-EXPECTED (cues[1].align == 'middle') OK
</del><ins>+EXPECTED (cues[1].align == 'center') OK
</ins><span class="cx"> EXPECTED (cues[1].position == '50') OK
</span><span class="cx"> EXPECTED (cues[2].vertical == 'rl') OK
</span><span class="cx"> EXPECTED (cues[2].align == 'start') OK
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackwebvtttc021valignhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-webvtt-tc021-valign.html (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-webvtt-tc021-valign.html     2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/LayoutTests/media/track/track-webvtt-tc021-valign.html        2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "align",
</span><del>-                            values : ["middle", "middle", "start"],
</del><ins>+                            values : ["center", "center", "start"],
</ins><span class="cx">                         },
</span><span class="cx">                         {
</span><span class="cx">                             property : "position",
</span><span class="lines">@@ -74,4 +74,4 @@
</span><span class="cx">             <track src="captions-webvtt/tc021-valign-bad.vtt" onload="trackLoaded()">
</span><span class="cx">         </video>
</span><span class="cx">     </body>
</span><del>-</html>
</del><span class="cx">\ No newline at end of file
</span><ins>+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/Source/WebCore/ChangeLog      2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2018-09-18  Per Arne Vollan  <pvollan@apple.com>
+
+        [WebVTT] change "middle" to "center" for consistency with CSS
+        https://bugs.webkit.org/show_bug.cgi?id=158478
+
+        Reviewed by Eric Carlson.
+
+        No new tests, covered by existing tests.
+
+        * html/track/TextTrackCueGeneric.cpp:
+        (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
+        * html/track/VTTCue.cpp:
+        (WebCore::centerKeyword):
+        (WebCore::VTTCue::initialize):
+        (WebCore::VTTCue::align const):
+        (WebCore::VTTCue::setAlign):
+        (WebCore::VTTCue::calculateDisplayParameters):
+        (WebCore::VTTCue::setCueSettings):
+        (WebCore::middleKeyword): Deleted.
+        * html/track/VTTCue.h:
+        * html/track/WebVTTParser.cpp:
+        (WebCore::WebVTTTreeBuilder::buildFromString):
+
</ins><span class="cx"> 2018-09-18  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         "DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackTextTrackCueGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp  2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp     2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx">     if (cue->baseFontSizeRelativeToVideoHeight())
</span><span class="cx">         cue->setFontSize(cue->baseFontSizeRelativeToVideoHeight(), videoSize, false);
</span><span class="cx"> 
</span><del>-    if (cue->getAlignment() == VTTCue::Middle)
</del><ins>+    if (cue->getAlignment() == VTTCue::Center)
</ins><span class="cx">         setInlineStyleProperty(CSSPropertyTextAlign, CSSValueCenter);
</span><span class="cx">     else if (cue->getAlignment() == VTTCue::End)
</span><span class="cx">         setInlineStyleProperty(CSSPropertyTextAlign, CSSValueEnd);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.cpp       2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp  2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -80,10 +80,10 @@
</span><span class="cx">     return start;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static const String& middleKeyword()
</del><ins>+static const String& centerKeyword()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed<const String> middle(MAKE_STATIC_STRING_IMPL("middle"));
-    return middle;
</del><ins>+    static NeverDestroyed<const String> center(MAKE_STATIC_STRING_IMPL("center"));
+    return center;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static const String& endKeyword()
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">     m_textPosition = 50;
</span><span class="cx">     m_cueSize = 100;
</span><span class="cx">     m_writingDirection = Horizontal;
</span><del>-    m_cueAlignment = Middle;
</del><ins>+    m_cueAlignment = Center;
</ins><span class="cx">     m_webVTTNodeTree = nullptr;
</span><span class="cx">     m_cueBackdropBox = HTMLDivElement::create(downcast<Document>(context));
</span><span class="cx">     m_cueHighlightBox = HTMLSpanElement::create(spanTag, downcast<Document>(context));
</span><span class="lines">@@ -434,8 +434,8 @@
</span><span class="cx">     switch (m_cueAlignment) {
</span><span class="cx">     case Start:
</span><span class="cx">         return startKeyword();
</span><del>-    case Middle:
-        return middleKeyword();
</del><ins>+    case Center:
+        return centerKeyword();
</ins><span class="cx">     case End:
</span><span class="cx">         return endKeyword();
</span><span class="cx">     case Left:
</span><span class="lines">@@ -459,8 +459,8 @@
</span><span class="cx">     CueAlignment alignment;
</span><span class="cx">     if (value == startKeyword())
</span><span class="cx">         alignment = Start;
</span><del>-    else if (value == middleKeyword())
-        alignment = Middle;
</del><ins>+    else if (value == centerKeyword())
+        alignment = Center;
</ins><span class="cx">     else if (value == endKeyword())
</span><span class="cx">         alignment = End;
</span><span class="cx">     else if (value == leftKeyword())
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx">         || (m_writingDirection == VerticalGrowingLeft && (m_cueAlignment == End || m_cueAlignment == Right))
</span><span class="cx">         || (m_writingDirection == VerticalGrowingRight && (m_cueAlignment == End || m_cueAlignment == Right))) {
</span><span class="cx">         maximumSize = m_textPosition;
</span><del>-    } else if (m_cueAlignment == Middle) {
</del><ins>+    } else if (m_cueAlignment == Center) {
</ins><span class="cx">         maximumSize = m_textPosition <= 50 ? m_textPosition : (100 - m_textPosition);
</span><span class="cx">         maximumSize = maximumSize * 2;
</span><span class="cx">     } else
</span><span class="lines">@@ -721,7 +721,7 @@
</span><span class="cx">             else
</span><span class="cx">                 m_displayPosition.first = 100 - m_textPosition - m_displaySize;
</span><span class="cx">             break;
</span><del>-        case Middle:
</del><ins>+        case Center:
</ins><span class="cx">             if (m_displayDirection == CSSValueLtr)
</span><span class="cx">                 m_displayPosition.first = m_textPosition - m_displaySize / 2;
</span><span class="cx">             else
</span><span class="lines">@@ -1051,9 +1051,9 @@
</span><span class="cx">             if (input.scanRun(valueRun, startKeyword()))
</span><span class="cx">                 m_cueAlignment = Start;
</span><span class="cx"> 
</span><del>-            // 2. If value is a case-sensitive match for the string "middle", then let cue's text track cue alignment be middle alignment.
-            else if (input.scanRun(valueRun, middleKeyword()))
-                m_cueAlignment = Middle;
</del><ins>+            // 2. If value is a case-sensitive match for the string "center", then let cue's text track cue alignment be center alignment.
+            else if (input.scanRun(valueRun, centerKeyword()))
+                m_cueAlignment = Center;
</ins><span class="cx"> 
</span><span class="cx">             // 3. If value is a case-sensitive match for the string "end", then let cue's text track cue alignment be end alignment.
</span><span class="cx">             else if (input.scanRun(valueRun, endKeyword()))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmltrackVTTCueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/track/VTTCue.h (236142 => 236143)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/track/VTTCue.h 2018-09-18 16:06:10 UTC (rev 236142)
+++ trunk/Source/WebCore/html/track/VTTCue.h    2018-09-18 16:07:24 UTC (rev 236143)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> 
</span><span class="cx">     enum CueAlignment {
</span><span class="cx">         Start = 0,
</span><del>-        Middle,
</del><ins>+        Center,
</ins><span class="cx">         End,
</span><span class="cx">         Left,
</span><span class="cx">         Right,
</span></span></pre>
</div>
</div>

</body>
</html>