From 8999f97b4d3b80c0e5e3ab03ae3c9b9d80919ec0 Mon Sep 17 00:00:00 2001
From: Silvia Pfeiffer
Let |left| be ''|offset| %''. [[!CSS-VALUES]]
Apply the terms of the CSS specifications to |nodes| with the same constraints that are - used when they are applied to |nodes| of a |cue| that is not part of a region.
- -Let |boxes| be the boxes generated as descendants of the initial containing block, along - with their positions.
-Obtain a set of CSS boxes |boxes| positioned relative to an initial containing + block.
If there are no line boxes in |boxes|, skip the remainder of these substeps for |cue|. The cue is ignored.
When the algorithm above requires that the user agent apply WebVTT cue settings to -obtain CSS boxes from a list of WebVTT Node Objects |nodes|, the user agent must run the -following algorithm.
+ +When the processing algorithm above requires that the user agent apply WebVTT cue +settings to obtain CSS boxes from a list of WebVTT Node Objects |nodes|, the user agent +must run the following algorithm.
Apply the terms of the CSS specifications to |nodes| within the following constraints, thus - obtaining a set of CSS boxes positioned relative to an initial containing block: [[!CSS22]]
- -The document tree is the tree of WebVTT Node Objects - rooted at |nodes|.
For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to - a hypothetical document that contains a single empty element with no explicit name, no - namespace, no attributes, no classes, no IDs, and unknown primary language, that acts like the - media element for the text tracks that were sourced from the given WebVTT file. - The selectors must not match other text tracks for the same media element. In this - hypothetical document, the element must not match any selector that would match the element - itself.
- -This element exists only to be the originating element for - the ''::cue'', ''::cue()'', ''::cue-region'' and ''::cue-region()'' pseudo-elements.
-For the purpose of determining the cascade of the declarations in - STYLE blocks of a WebVTT file, the relative order of appearance of the style sheets must be the - same order as they were added to the collection, and the order of appearance of the collection - must be after any style sheets that apply to the associated video element's - document.
- -For example, given the following (invalid) HTML document:
- -- <!doctype html> - <title>Invalid cascade example</title> - <video controls autoplay src="video.webm"> - <track default src="track.vtt"> - </video> - <style> - ::cue { color:red } - </style> -- -
...and the "track.vtt" file contains:
- -- WEBVTT - - STYLE - ::cue { color:lime } - - 00:00:00.000 --> 00:00:25.000 - Red or green? -- -
The ''color:lime'' declaration would win, because it is last in the cascade, even though the style element is after the video element in the document order.
-For the purpose of resolving URLs in STYLE blocks of a WebVTT
- file, or any URLs in resources referenced from STYLE blocks of a WebVTT file, if the URL's
- scheme is not "data
", then the user agent must act as if the URL failed to
- resolve.
Supporting external resources with ''@import'' or 'background-image' - would be a new ability for media elements and track elements to issue - network requests as the user watches the video, which could be a privacy issue.
- -For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same - contents.
Let |boxes| be the boxes generated as descendants of the initial containing block, along with - their positions.
- -Obtain a set of CSS boxes |boxes| positioned relative to an initial containing + block.
If there are no line boxes in |boxes|, skip the remainder of these substeps for |cue|. The cue is ignored.
When the processing algorithm above requires that the user agent obtain a set of CSS +boxes |boxes|, then apply the terms of the CSS specifications to |nodes| within the following +constraints: [[!CSS22]]
+ +The document tree is the tree of WebVTT Node Objects + rooted at |nodes|.
For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to a + hypothetical document that contains a single empty element with no explicit name, no namespace, no + attributes, no classes, no IDs, and unknown primary language, that acts like the media + element for the text tracks that were sourced from the given WebVTT file. The selectors + must not match other text tracks for the same media element. In this hypothetical + document, the element must not match any selector that would match the element itself.
+ +This element exists only to be the originating element for the + ''::cue'', ''::cue()'', ''::cue-region'' and ''::cue-region()'' pseudo-elements.
+For the purpose of determining the cascade of the declarations in STYLE + blocks of a WebVTT file, the relative order of appearance of the style sheets must be the same + order as they were added to the collection, and the order of appearance of the collection must be + after any style sheets that apply to the associated video element's document.
+ +For example, given the following (invalid) HTML document:
+ ++ <!doctype html> + <title>Invalid cascade example</title> + <video controls autoplay src="video.webm"> + <track default src="track.vtt"> + </video> + <style> + ::cue { color:red } + </style> ++ +
...and the "track.vtt" file contains:
+ ++ WEBVTT + + STYLE + ::cue { color:lime } + + 00:00:00.000 --> 00:00:25.000 + Red or green? ++ +
The ''color:lime'' declaration would win, because it is last in the cascade, even though the style element is after the video element in the document order.
+For the purpose of resolving URLs in STYLE blocks of a WebVTT
+ file, or any URLs in resources referenced from STYLE blocks of a WebVTT file, if the URL's scheme
+ is not "data
", then the user agent must act as if the URL failed to resolve.
Supporting external resources with ''@import'' or 'background-image' + would be a new ability for media elements and track elements to issue + network requests as the user watches the video, which could be a privacy issue.
+ +For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same + contents.
Let |boxes| be the boxes generated as descendants of the initial containing block, along with +their positions.
+ + +When following the rules for updating the display of WebVTT text tracks, user agents must set properties of WebVTT Node Objects at the CSS user agent cascade diff --git a/index.html b/index.html index b08eaf4..1c561e2 100644 --- a/index.html +++ b/index.html @@ -1569,11 +1569,10 @@
Let left be offset %. [CSS-VALUES]
Apply the terms of the CSS specifications to nodes with the same constraints that are - used when they are applied to nodes of a cue that is not part of a region.
-Let boxes be the boxes generated as descendants of the initial containing block, along - with their positions.
+Obtain a set of CSS boxes boxes positioned relative to an initial containing + block.
If there are no line boxes in boxes, skip the remainder of these substeps for cue. The cue is ignored.
@@ -4418,9 +4415,10 @@User agents may allow the user to override the above algorithm’s positioning of cues, e.g. by dragging them to another location on the video, or even off the video entirely.
-When the algorithm above requires that the user agent apply WebVTT cue settings to -obtain CSS boxes from a list of WebVTT Node Objects nodes, the user agent must run the -following algorithm.
+When the processing algorithm above requires that the user agent apply WebVTT cue +settings to obtain CSS boxes from a list of WebVTT Node Objects nodes, the user agent +must run the following algorithm.
If the WebVTT cue writing direction is horizontal, then let writing-mode be "horizontal-tb". Otherwise, if the WebVTT
@@ -4561,75 +4559,8 @@ vw
and vh are
CSS units.) [CSS-VALUES]
Apply the terms of the CSS specifications to nodes within the following constraints, thus - obtaining a set of CSS boxes positioned relative to an initial containing block: [CSS22]
-The document tree is the tree of WebVTT Node Objects rooted at nodes.
-For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to - a hypothetical document that contains a single empty element with no explicit name, no - namespace, no attributes, no classes, no IDs, and unknown primary language, that acts like the media element for the text tracks that were sourced from the given WebVTT file. - The selectors must not match other text tracks for the same media element. In this - hypothetical document, the element must not match any selector that would match the element - itself.
-This element exists only to be the originating element for - the ::cue, ::cue(), ::cue-region and ::cue-region() pseudo-elements.
-For the purpose of determining the cascade of the declarations in - STYLE blocks of a WebVTT file, the relative order of appearance of the style sheets must be the - same order as they were added to the collection, and the order of appearance of the collection - must be after any style sheets that apply to the associated video element’s - document.
-For example, given the following (invalid) HTML document:
-<!doctype html> -<title>Invalid cascade example</title> -<video controls autoplay src="video.webm"> - <track default src="track.vtt"> -</video> -<style> - ::cue { color:red } -</style> --
...and the "track.vtt" file contains:
-WEBVTT - -STYLE -::cue { color:lime } - -00:00:00.000 --> 00:00:25.000 -Red or green? --
The color:lime declaration would win, because it is last in the cascade, even though the style element is after the video element in the document order.
-For the purpose of resolving URLs in STYLE blocks of a WebVTT
- file, or any URLs in resources referenced from STYLE blocks of a WebVTT file, if the URL’s
- scheme is not "data
", then the user agent must act as if the URL failed to
- resolve.
Supporting external resources with @import or background-image would be a new ability for media elements and track elements to issue - network requests as the user watches the video, which could be a privacy issue.
-For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same - contents.
-Text
nodes.
- Let boxes be the boxes generated as descendants of the initial containing block, along with - their positions.
+Obtain a set of CSS boxes boxes positioned relative to an initial containing + block.
If there are no line boxes in boxes, skip the remainder of these substeps for cue. The cue is ignored.
@@ -4775,7 +4706,74 @@Done positioning: Return boxes.
When the processing algorithm above requires that the user agent obtain a set of CSS +boxes boxes, then apply the terms of the CSS specifications to nodes within the following +constraints: [CSS22]
+The document tree is the tree of WebVTT Node Objects rooted at nodes.
+For the purpose of selectors in STYLE blocks of a WebVTT file, the style sheet must apply to a + hypothetical document that contains a single empty element with no explicit name, no namespace, no + attributes, no classes, no IDs, and unknown primary language, that acts like the media + element for the text tracks that were sourced from the given WebVTT file. The selectors + must not match other text tracks for the same media element. In this hypothetical + document, the element must not match any selector that would match the element itself.
+This element exists only to be the originating element for the ::cue, ::cue(), ::cue-region and ::cue-region() pseudo-elements.
+For the purpose of determining the cascade of the declarations in STYLE + blocks of a WebVTT file, the relative order of appearance of the style sheets must be the same + order as they were added to the collection, and the order of appearance of the collection must be + after any style sheets that apply to the associated video element’s document.
+For example, given the following (invalid) HTML document:
+<!doctype html> +<title>Invalid cascade example</title> +<video controls autoplay src="video.webm"> + <track default src="track.vtt"> +</video> +<style> + ::cue { color:red } +</style> ++
...and the "track.vtt" file contains:
+WEBVTT + +STYLE +::cue { color:lime } + +00:00:00.000 --> 00:00:25.000 +Red or green? ++
The color:lime declaration would win, because it is last in the cascade, even though the style element is after the video element in the document order.
+For the purpose of resolving URLs in STYLE blocks of a WebVTT
+ file, or any URLs in resources referenced from STYLE blocks of a WebVTT file, if the URL’s scheme
+ is not "data
", then the user agent must act as if the URL failed to resolve.
Supporting external resources with @import or background-image would be a new ability for media elements and track elements to issue + network requests as the user watches the video, which could be a privacy issue.
+For the purposes of processing by the CSS specification, WebVTT Internal Node Objects are equivalent to elements with the same + contents.
+Text
nodes.
+ Let boxes be the boxes generated as descendants of the initial containing block, along with +their positions.
+When following the rules for updating the display of WebVTT text tracks, user agents must set properties of WebVTT Node Objects at the CSS user agent cascade layer as defined in this section. [CSS22]
@@ -5849,7 +5847,7 @@