diff --git a/index.bs b/index.bs
index 9890191b..dca5cb4e 100644
--- a/index.bs
+++ b/index.bs
@@ -458,7 +458,7 @@ CSS comment (e.g. /**/).
This example shows how to position cues at explicit positions in the video viewport.
+This example shows how to position cues at explicit positions in the video viewport.
WEBVTT
@@ -474,25 +474,25 @@ CSS comment (e.g. /**/).
Since the cues in these examples are horizontal, the "position" setting refers to a percentage - of the width of the video viewpoint. If the text were vertical, the "position" setting would refer - to the height of the video viewport.
+ of the width of the video viewport. If the text were vertical, the "position" setting would + refer to the height of the video viewport.The "line-left" or "line-right" only refers to the physical side of the box to which the "position" setting applies, in a way which is agnostic regarding the horizontal or vertical direction of the cue. It does not affect or relate to the direction or position of the text itself within the box.
-The cues cover only 35% of the video viewport's width - that's the cue - box's "size" for all three cues.
+The cues cover only 35% of the video viewport's width - that's the cue box's "size" for all three cues.
The first cue has its cue box positioned at the 10% mark. The "line-left" and "line-right" within the "position" setting indicates which side of the cue box the position refers to. Since in this case the text is horizontal, "line-left" refers to the left side of the box, and the cue box is thus positioned between the 10% - and the 45% mark of the video viewport's width, probably underneath a speaker on the left of the - video image. If the cue was vertical, "line-left" positioning would be from the top of the video - viewport's height and the cue box would cover 35% of the video - viewport's height.
+ and the 45% mark of the video viewport's width, probably underneath a speaker on the left of + the video image. If the cue was vertical, "line-left" positioning would be from the top of the + video viewport's height and the cue box would cover 35% of the + video viewport's height.The text within the first cue's cue box is aligned using the "align" cue setting. For
left-to-right rendered text, "start" alignment is the left of that box, for right-to-left rendered
@@ -502,9 +502,9 @@ CSS comment (e.g. /**/).
The second cue has its cue box right aligned at the 90% mark of the - video viewport width ("right" aligned text right aligns the box). The same effect can be achieved - with "position:55%,line-left", which explicitly positions the cue box. The third cue has center - aligned text within the same positioned cue box as the first cue.
+ video viewport width ("right" aligned text right aligns the box). The same effect can be + achieved with "position:55%,line-left", which explicitly positions the cue box. The third cue has + center aligned text within the same positioned cue box as the first cue.The box model of WebVTT consists of three key elements: the video viewport, cues, and -regions. The video viewport is the rendering area into which cues and regions are rendered. Cues are -boxes consisting of a set of cue lines. Regions are subareas of the video viewport that are used to -group cues together. Cues are positioned either inside the video viewport directly or inside a -region, which is positioned inside the video viewport.
+The box model of WebVTT consists of three key elements: the video viewport, cues, and regions. The video viewport is the +rendering area into which cues and regions are rendered. Cues are boxes +consisting of a set of cue lines. Regions are subareas of the video +viewport that are used to group cues together. Cues are positioned either inside the video viewport +directly or inside a region, which is positioned inside the video viewport.
The position of a cue inside the video viewport is defined by a set of cue settings. The position of a region inside the video viewport is defined by a set of region settings. Cues that are inside regions can only use a limited set of their cue settings. Specifically, if the cue has a "vertical", "line" or "size" setting, the cue drops out of the region. Otherwise, the cue's width is -calculated to be relative to the region width rather than the viewport.
+calculated to be relative to the region width rather than the video viewport.WebVTT caption or subtitle cues are rendered as overlays on top of a video viewport or into a -region, which is a subarea of the video viewport.
+WebVTT caption or subtitle cues are rendered as overlays on top of a video viewport or +into a region, which is a subarea of the video viewport.
+ + +The video viewport is the video's rendering area which in the case +of HTML5 is defined by the |video|'s concrete object size.
+ +The following video-viewport-percentage lengths are defined analogously to how CSS defines +viewport-percentage-lengths ''vh'' and ''vw'' [[!CSS-VALUES]]:
+ +Equal to 1% of the width of the video viewport.
+Equal to 1% of the height of the video viewport.
+A WebVTT cue is a text track cue [[!HTML]] that additionally consist of the -following:
+following:The raw text of the cue, and rules for its interpretation.
-The cue box of a WebVTT cue is a box within which the text of all lines of the cue is to - be rendered. It is either rendered into the video's viewport or a region inside the viewport if - the cue is part of a region.
+ be rendered. It is either rendered into the video viewport or a region inside the video + viewport if the cue is part of a region.The position of the cue box within the video viewport's or region's dimensions depends on the value of the WebVTT cue position and the WebVTT @@ -878,8 +902,8 @@ fragment:
The line offsets the cue box from the - top, the right or left of the video viewport as defined by the writing direction, the snap-to-lines flag, or the lines occupied by any other showing tracks.
@@ -1084,8 +1108,8 @@ fragment:Even for horizontal cues with right-to-left cue text, the cue box is positioned from the left edge of - the video viewport. This allows defining a rendering space template which can be filled with - either left-to-right or right-to-left cue text, or both.
+ the video viewport. This allows defining a rendering space template which can be filled + with either left-to-right or right-to-left cue text, or both.For WebVTT cues that have a size other than 100%, and a text alignment of start @@ -1339,8 +1363,9 @@ cues are the rules for updating the display of WebVTT text tracks.
WebVTT caption or subtitle regions -A WebVTT region represents a subpart of the video viewport and provides a limited -rendering area for WebVTT caption or subtitle cues.
+A WebVTT region represents a subpart of the video viewport and provides a +limited rendering area for WebVTT caption or subtitle +cues.
Regions provide a means to group caption or subtitle cues so the cues can be rendered together, which is particularly important when scrolling up.
@@ -1374,15 +1399,16 @@ together, which is particularly important when scrolling up.Two numbers giving the x and y coordinates within the region which is anchored to the video - viewport and does not change location even when the region does, e.g. because of font size +
Two numbers giving the x and y coordinates within the region which is anchored to the video + viewport and does not change location even when the region does, e.g. because of font size changes. Defaults to (0,100), i.e. the bottom left corner of the region.
Two numbers giving the x and y coordinates within the video viewport to which the region anchor - point is anchored. Defaults to (0,100), i.e. the bottom left corner of the video viewport.
+Two numbers giving the x and y coordinates within the video viewport to which the region + anchor point is anchored. Defaults to (0,100), i.e. the bottom left corner of the video + viewport.
The following diagram illustrates how anchoring of a region to a video viewport works. The black - cross is the anchor, orange explains the anchor's offset within the region and green the anchor's - offset within the video viewport. Think of it as sticking a pin through a note onto a board:
+The following diagram illustrates how anchoring of a region to a video viewport works. + The black cross is the anchor, orange explains the anchor's offset within the region and green the + anchor's offset within the video viewport. Think of it as sticking a pin through a note onto + a board:

Image description: Within the video viewport, there is a WebVTT region. - Inside the region, there is an anchor point marked with a black cross. The vertical and horizontal - distance from the video viewport's edges to the anchor is marked with green arrows, representing - the region viewport anchor X and Y offsets. The vertical and horizontal distance from the region's - edges to the anchor is marked with orange arrows, representing the region anchor X and Y offsets. - The size of the region is represented by the region width for the horizontal axis, and region lines - for the vertical axis.
+Image description: Within the video viewport, there is a WebVTT + region. Inside the region, there is an anchor point marked with a black cross. The vertical and + horizontal distance from the video viewport's edges to the anchor is marked with green arrows, + representing the region viewport anchor X and Y offsets. The vertical and horizontal distance from + the region's edges to the anchor is marked with orange arrows, representing the region anchor X and + Y offsets. The size of the region is represented by the region width for the horizontal axis, and + region lines for the vertical axis.
For parsing, we also need the following:
@@ -1898,8 +1925,9 @@ than once per WebVTT region settings list string.The WebVTT region settings list gives configuration options regarding the dimensions, positioning and anchoring of the region. For example, it allows a group of cues within a -region to be anchored in the center of the region and the center of the video viewport. In this -example, when the font size grows, the region grows uniformly in all directions from the center.
+region to be anchored in the center of the region and the center of the video viewport. In +this example, when the font size grows, the region grows uniformly in all directions from the +center.A WebVTT region identifier setting consists of the following components, in the order given:
@@ -1978,14 +2006,14 @@ order given:The WebVTT region viewport anchor setting provides a tuple of two percentages -that specify the point within the video viewport that the region anchor point is anchored to. The -first percentage measures the x-dimension and the second percentage measures the y-dimension from -the top left corner of the video viewport box. If no region viewport anchor is given, it defaults to -0%, 100% (i.e. the bottom left corner).
+that specify the point within the video viewport that the region anchor point is anchored to. +The first percentage measures the x-dimension and the second percentage measures the y-dimension +from the top left corner of the video viewport. If no region viewport anchor is given, it +defaults to 0%, 100% (i.e. the bottom left corner).For browsers, the region maps to an absolute positioned CSS box relative to the -video viewport, i.e. there is a relative positioned box that represents the video viewport relative -to which the regions are absolutely positioned. Overflow is hidden.
+video viewport, i.e. there is a relative positioned box that represents the video viewport +relative to which the regions are absolutely positioned. Overflow is hidden.A WebVTT region scroll setting consists of the following components, in the order given:
@@ -1998,8 +2026,8 @@ given:The WebVTT region scroll setting specifies whether cues rendered into the region are allowed to move out of their initial rendering place and roll up, i.e. move towards the -top of the video viewport. If the scroll setting is omitted, cues do not move from their rendered -position.
+top of the video viewport. If the scroll setting is omitted, cues do not move from their +rendered position.Cues are added to a region one line at a time below existing cue lines. When an existing rendered cue line is removed, and it was above another already rendered cue line, that cue @@ -2063,7 +2091,7 @@ given:
A WebVTT line cue setting configures the offset of the cue box from the video -viewport's edge in the direction orthogonal to the writing -direction. For horizontal cues, this is the vertical offset from the top of the video viewport, -for vertical cues, it's the horizontal offset. The offset is for the start, center, or end of the cue box, depending on the WebVTT cue line alignment value - start by default. The offset can be given either as a -percentage of the relevant writing-mode dependent video viewport dimension or as a line number. Line -numbers are based on the size of the first line of the cue. Positive line numbers count from the -start of the video viewport (the first line is numbered 0), negative line numbers from the end of -the video viewport (the last line is numbered −1).
+A WebVTT line cue setting configures the offset of the cue box from the +video viewport's edge in the direction orthogonal to the writing direction. For horizontal cues, this is the vertical offset from the top of +the video viewport, for vertical cues, it's the horizontal offset. The offset is for the start, center, +or end of the cue box, depending on the WebVTT cue line +alignment value - start by default. The offset can +be given either as a percentage of the relevant writing-mode dependent video viewport +dimension or as a line number. Line numbers are based on the size of the first line of the cue. +Positive line numbers count from the start of the video viewport (the first line is numbered 0), +negative line numbers from the end of the video viewport (the last line is numbered −1).
A WebVTT position cue setting consists of the following components, in the order given:
@@ -2125,7 +2153,7 @@ given:A WebVTT position cue setting configures the indent position of the cue box in the direction orthogonal to the WebVTT line cue setting. For horizontal cues, this is the horizontal position. The cue position is given as a percentage of -the video viewport. The positioning is for the line-left, center, or line-right of the cue box, depending on the cue's computed position alignment, which is overridden by the WebVTT @@ -2143,7 +2171,7 @@ given:
A WebVTT size cue setting configures the size of the cue box in the same direction as the WebVTT position cue setting. For horizontal cues, this is the width of the cue box. It is given as a percentage of -the width of the video viewport.
+the width of the video viewport.A WebVTT alignment cue setting consists of the following components, in the order given:
@@ -2174,7 +2202,7 @@ lt="WebVTT line cue setting">"line" or "size If a cue is part of a region, its cue settings for "position" and "align" are applied to the line boxes in the cue relative to the region box and the cue box width and height are calculated relative -to the region dimensions rather than the viewport dimensions. +to the region dimensions rather than the video viewport dimensions.Let |regionWidth| be the WebVTT region width. Let |width| be - ''|regionWidth| vw'' (''vw'' is a CSS unit). [[!CSS-VALUES]]
Let |lineHeight| be ''6vh'' (''vh'' is a CSS unit) [[!CSS-VALUES]] and |regionHeight| be - the WebVTT region lines. Let |lines| be |lineHeight| multiplied by - |regionHeight|.
Let |lineHeight| be ''6vvh'' and |regionHeight| be the WebVTT region lines. Let + |lines| be |lineHeight| multiplied by |regionHeight|.
Let |viewportAnchorX| be the x dimension of the WebVTT region anchor and |regionAnchorX| be the x dimension of the WebVTT region anchor. Let |leftOffset| be |regionAnchorX| multiplied by |width| divided by 100.0. Let |left| be |leftOffset| subtracted - from ''|viewportAnchorX| vw''.
Let |viewportAnchorY| be the y dimension of the WebVTT region anchor and |regionAnchorY| be the y dimension of the WebVTT region anchor. Let |topOffset| be |regionAnchorY| multiplied by |lines| divided by 100.0. Let |top| be |topOffset| subtracted - from ''|viewportAnchorY| vh''.
Apply the terms of the CSS specifications to |regionNode| within the following constraints, - thus obtaining a CSS box |box| positioned relative to an initial containing block:
+ thus obtaining a CSS box |box| positioned relative to the video viewport:No style sheets are associated with |regionNode|. (The regionNodes are subsequently restyled using style sheets after their boxes are generated, as described below.)
Properties on |regionNode| have their values set as defined in the next section. (That section uses some of the variables whose values were calculated earlier in this algorithm.)
The video viewport (and initial containing block) is video's rendering area.
Let |left| be ''|offset| %''. [[!CSS-VALUES]]
Obtain a set of CSS boxes |boxes| positioned relative to an initial containing - block.
Obtain a set of CSS boxes |boxes| positioned relative to the video + viewport.
If there are no line boxes in |boxes|, skip the remainder of these substeps for |cue|. The cue is ignored.
If the WebVTT cue writing direction is horizontal, then let |width| be ''|size| vw'' and |height| be - ''height/auto''. Otherwise, let |width| be ''width/auto'' and |height| be ''|size| vh''. - (These are CSS values used by the next section to set CSS properties for the rendering; ''vw'' and - ''vh'' are CSS units.) [[!CSS-VALUES]]
Let |left| be ''|x-position| vw'' and |top| be ''|y-position| vh''. (These are - CSS values used by the next section to set CSS properties for the rendering; ''vw'' and ''vh'' are - CSS units.) [[!CSS-VALUES]]
Let |left| be ''|x-position| vvw'' and |top| be ''|y-position| vvh''.
Obtain a set of CSS boxes |boxes| positioned relative to an initial containing - block.
Obtain a set of CSS boxes |boxes| positioned relative to the video + viewport.
If there are no line boxes in |boxes|, skip the remainder of these substeps for |cue|. The cue is ignored.
Let |boxes| be the boxes generated as descendants of the initial containing block, along with -their positions.
+Let |boxes| be the boxes generated as descendants of the containing block, along with their +positions.
The 'font' shorthand property on the (root) list of WebVTT Node Objects must be set to -''5vh sans-serif''. [[!CSS-VALUES]]
+''5vvh sans-serif''. [[!CSS-VALUES]]The 'color' property on the (root) list of WebVTT Node Objects must be set to ''rgba(255,255,255,1)''. [[!CSS3-COLOR]]
@@ -4881,11 +4906,13 @@ to ''font-style/italic''.The 'text-decoration' property on WebVTT Underline Objects must be set to ''text-decoration/underline''.
-The 'display' property on WebVTT Ruby Objects must be set to -''display/ruby''. [[!CSS3-RUBY]]
+The 'display' property on WebVTT Ruby Objects must be set to ruby. +[[!CSS3-RUBY]]
The 'display' property on WebVTT Ruby Text Objects must be -set to ''display/ruby-text''. [[!CSS3-RUBY]]
+set to ruby-text. [[!CSS3-RUBY]]Every WebVTT region object is initialized with the following CSS settings:
@@ -4894,7 +4921,7 @@ set to ''display/ruby-text''. [[!CSS3-RUBY]]