From 83849fce1dc5e030ca47c9078e571a696dd92fa1 Mon Sep 17 00:00:00 2001 From: Silvia Pfeiffer Date: Mon, 12 May 2014 12:37:31 +1000 Subject: [PATCH] Add some more hyperlinks to definitions and other specs. DOM references: * Document * DocumentFragment * ownerDocument * ProcessingInstruction * Text * IndexSizeError HTML spec references: * HTMLElement * addCue() Local references: * VTTCue * VTTRegion --- webvtt.html | 102 +++++++++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 44 deletions(-) diff --git a/webvtt.html b/webvtt.html index db2e30b..8e4338f 100644 --- a/webvtt.html +++ b/webvtt.html @@ -505,10 +505,22 @@

Dependencies

  • UTF-8 decode
  • +

    The following terms are defined in the DOM specification: [DOM]

    + + +

    The following terms are defined in the HTML standard: [HTML5]

    @@ -1218,9 +1231,7 @@

    WebVTT metadata text

    terminator.)

    WebVTT metadata text cues are only - useful for scripted applications (using the metadata text - track kind).

    + useful for scripted applications (using the metadata text track kind).

    @@ -3663,7 +3674,7 @@

    WebVTT cue text parsing rules

    WebVTT cue text DOM construction rules

    To convert a list of WebVTT Node Objects to a DOM - tree for Document owner, user + tree for Document owner, user agents must create a tree of DOM nodes that is isomorphous to the tree of WebVTT Node Objects, with the following mapping of localName "span". + HTMLElement element node with localName "span". WebVTT Italic Object - HTMLElement element node with localName "i". + HTMLElement element node with localName "i". WebVTT Bold Object - HTMLElement element node with localName "b". + HTMLElement element node with localName "b". WebVTT Underline Object - HTMLElement element node with localName "u". + HTMLElement element node with localName "u". WebVTT Ruby Object - HTMLElement element node with localName "ruby". + HTMLElement element node with localName "ruby". WebVTT Ruby Text Object - HTMLElement element node with localName "rt". + HTMLElement element node with localName "rt". WebVTT Voice Object - HTMLElement element node with localName "span", and a title attribute set to the WebVTT Voice Object's value. + HTMLElement element node with localName "span", and a title attribute set to the WebVTT Voice Object's value. WebVTT Language Object - HTMLElement element node with localName "span", and a lang attribute set to the WebVTT Language Object's applicable language. + HTMLElement element node with localName "span", and a lang attribute set to the WebVTT Language Object's applicable language. WebVTT Text Object - Text node whose character data is the value of the WebVTT Text Object. + Text node whose character data is the value of the WebVTT Text Object. WebVTT Timestamp Object - ProcessingInstruction node whose target is "timestamp" and whose data is a WebVTT timestamp representing the value of the WebVTT Timestamp Object, with all optional components included, with one leading zero if the hours component is less than ten, and with no leading zeros otherwise. + ProcessingInstruction node whose target is "timestamp" and whose data is a WebVTT timestamp representing the value of the WebVTT Timestamp Object, with all optional components included, with one leading zero if the hours component is less than ten, and with no leading zeros otherwise. -

    HTMLElement nodes created as part of the mapping described above must have their +

    HTMLElement nodes created as part of the mapping described above must have their namespaceURI set to the HTML namespace, and, if the corresponding WebVTT Internal Node Object has any applicable classes, must have a class attribute set to the string obtained by concatenating all those classes, each separated from the next by a single U+0020 SPACE character.

    -

    The ownerDocument +

    The ownerDocument attribute of all nodes in the DOM tree must be set to the given document owner.

    @@ -4187,7 +4198,7 @@

    Processing model

  • For the purposes of processing by the CSS specification, WebVTT Text - Objects are equivalent to Text nodes.
  • + Objects are equivalent to Text nodes.
  • No style sheets are associated with nodes. (The nodes are subsequently restyled @@ -5022,7 +5033,7 @@

    The '::cue-region' pseudo-element

    API

    -

    The VTTCue interface

    +

    The VTTCue interface

    The following interface is used to expose WebVTT cues in the DOM API:

    @@ -5041,14 +5052,14 @@

    The VTTCue interface

    attribute double size; attribute AlignSetting align; attribute DOMString text; - DocumentFragment getCueAsHTML(); + DocumentFragment getCueAsHTML(); };
    cue = new VTTCue( startTime, endTime, text )
    -

    Returns a new VTTCue object, for use with the addCue() method.

    +

    Returns a new VTTCue object, for use with the addCue() method.

    The startTime argument sets the text track cue start time.

    The endTime argument sets the text track cue end time.

    The text argument sets the text track cue text.

    @@ -5056,7 +5067,7 @@

    The VTTCue interface

    cue . region
    -

    Returns the VTTRegion object to which this cue belongs, if any, or null otherwise.

    +

    Returns the VTTRegion object to which this cue belongs, if any, or null otherwise.

    Can be set.

    @@ -5155,7 +5166,7 @@

    The VTTCue interface

    fragment = cue . getCueAsHTML()
    -

    Returns the text track cue text as a DocumentFragment of HTML elements and other DOM nodes.

    +

    Returns the text track cue text as a DocumentFragment of HTML elements and other DOM nodes.

    @@ -5211,13 +5222,13 @@

    The VTTCue interface

  • Let cue's text track cue text alignment be middle alignment.

  • -
  • Return the VTTCue object representing cue.

  • +
  • Return the VTTCue object representing cue.

  • The region attribute, on getting, must return - the VTTRegion object representing the text track cue region of the text - track cue that the VTTCue object represents, if any; or null otherwise. On + the VTTRegion object representing the text track cue region of the text + track cue that the VTTCue object represents, if any; or null otherwise. On setting, the text track cue region must be set to the new value.

    The The VTTCue interface attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the text track cue writing direction of the text track - cue that the VTTCue object represents:

    + cue that the VTTCue object represents:

    @@ -5256,13 +5267,13 @@

    The VTTCue interface

    The snapToLines attribute, on getting, must return true if the text track cue snap-to-lines flag of the text - track cue that the VTTCue object represents is set; or false otherwise. + track cue that the VTTCue object represents is set; or false otherwise. On setting, the text track cue snap-to-lines flag must be set if the new value is true, and must be unset otherwise.

    The line attribute, on getting, must return the text track cue line position of the text track cue that the - VTTCue object represents. The special value auto must be represented as the string "auto". On setting, the text track cue line position must be set to the new value; if the new value is the string "auto", then it must be @@ -5272,7 +5283,7 @@

    The VTTCue interface

    The lineAlign attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the text track cue line alignment of the text track cue that the - VTTCue object represents:

    + VTTCue object represents:

    @@ -5303,14 +5314,14 @@

    The VTTCue interface

    The position attribute, on getting, must return the text track cue text position of the text track cue that - the VTTCue object represents. On setting, if the new value is negative or - greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the + the VTTCue object represents. On setting, if the new value is negative or + greater than 100, then an IndexSizeError exception must be thrown. Otherwise, the text track cue text position must be set to the new value.

    The positionAlign attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the text track cue text position alignment of the text track cue that the - VTTCue object represents:

    + VTTCue object represents:

    @@ -5341,14 +5352,14 @@

    The VTTCue interface

    The size attribute, on getting, must return the text track cue size of the text track cue that the - VTTCue object represents. On setting, if the new value is negative or greater - than 100, then an IndexSizeError exception must be thrown. Otherwise, the text + VTTCue object represents. On setting, if the new value is negative or greater + than 100, then an IndexSizeError exception must be thrown. Otherwise, the text track cue size must be set to the new value.

    The align attribute, on getting, must return the string from the second cell of the row in the table below whose first cell is the text track cue text alignment of the text track cue that the - VTTCue object represents:

    + VTTCue object represents:

    @@ -5387,11 +5398,11 @@

    The VTTCue interface

    The text attribute, on getting, must return the raw text track cue text of the text track cue that the - VTTCue object represents. On setting, the text track cue text must + VTTCue object represents. On setting, the text track cue text must be set to the new value.

    The getCueAsHTML() method must - convert the text track cue text to a DocumentFragment for the + convert the text track cue text to a DocumentFragment for the script's document of the entry script by applying the WebVTT cue text DOM construction rules to the result of applying the WebVTT cue text parsing rules to the text track cue text.

    @@ -5425,7 +5436,7 @@

    The VTTRegion interface

    region . width
    -

    Returns the text track region width as a percentage of the video width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    +

    Returns the text track region width as a percentage of the video width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    region . lines
    @@ -5435,22 +5446,22 @@

    The VTTRegion interface

    region . regionAnchorX
    -

    Returns the text track region anchor X offset as a percentage of the region width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    +

    Returns the text track region anchor X offset as a percentage of the region width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    region . regionAnchorX
    -

    Returns the text track region anchor Y offset as a percentage of the region height. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    +

    Returns the text track region anchor Y offset as a percentage of the region height. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    region . viewportAnchorX
    -

    Returns the text track region viewport anchor X offset as a percentage of the video width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    +

    Returns the text track region viewport anchor X offset as a percentage of the video width. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    region . viewportAnchorY
    -

    Returns the text track region viewport anchor Y offset as a percentage of the video height. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    +

    Returns the text track region viewport anchor Y offset as a percentage of the video height. Can be set. Throws an IndexSizeError if the new value is not in the range 0..100.

    region . scroll
    @@ -5650,6 +5661,9 @@

    References

    [CSSVALUES]
    CSS3 Values and Units, H. Lie, T. Atkins, E. Etemad. W3C.
    +
    [DOM]
    +
    W3C DOM 4, A. van Kesteren, A. Gregor, Ms2ger. WHATWG.
    +
    [ENCODING]
    Encoding, A. van Kesteren, J. Bell. WHATWG.