From ea7fe82df806f3bdddbd183ff7606fe013c08899 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 16 Mar 2026 17:33:20 -0400 Subject: [PATCH 1/4] make format use python3 and switch to its print() function --- format.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/format.py b/format.py index e82cff30..af6cfe9b 100755 --- a/format.py +++ b/format.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import re import sys @@ -32,8 +32,8 @@ def validate(path, source, tokens): def fail(reason, offset): lineno = source.count('\n', 0, offset) + 1 - print '%s:%s: error: %s' % (path, lineno, reason) - print source.splitlines()[lineno - 1] + print('%s:%s: error: %s').format(path, lineno, reason) + print(source.splitlines()[lineno - 1]) sys.exit(1) for token, start, end, name in tokens: From a721cc27b7a20191a8d9e8ea0938bf94485e53cd Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Mon, 16 Mar 2026 17:33:38 -0400 Subject: [PATCH 2/4] run format.py on index.bs --- index.bs | 77 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/index.bs b/index.bs index 38b06c49..ec952854 100644 --- a/index.bs +++ b/index.bs @@ -1438,8 +1438,8 @@ together, which is particularly important when scrolling up.

WebVTT chapter cues

-

A WebVTT chapter cue is a WebVTT cue whose cue text is interpreted as a -chapter title that describes the chapter as a navigation target.

+

A WebVTT chapter cue is a WebVTT cue whose cue text is +interpreted as a chapter title that describes the chapter as a navigation target.

Chapter cues mark up the timeline of a audio or video file in consecutive, non-overlapping intervals. It is further possible to subdivide these intervals into sub-chapters building a @@ -1447,8 +1447,8 @@ navigation tree.

WebVTT metadata cues

-

A WebVTT metadata cue is a WebVTT cue whose cue text is interpreted as -time-aligned metadata.

+

A WebVTT metadata cue is a WebVTT cue whose cue text is +interpreted as time-aligned metadata.

Syntax

@@ -2285,14 +2285,15 @@ is said to be a WebVTT file using metadata content.

WebVTT file using chapter title text

-

A WebVTT file using chapter title text is a WebVTT file using only nested cues -whose cues all have a cue payload that is WebVTT chapter title text.

+

A WebVTT file using chapter title text is a WebVTT file using only nested +cues whose cues all have a cue payload that is WebVTT chapter title text.

WebVTT file using caption or subtitle cue text

A WebVTT file whose cues all have a cue payload that is WebVTT caption or -subtitle cue text is said to be a WebVTT file using caption or subtitle cue text.

+subtitle cue text is said to be a WebVTT file using caption or subtitle cue +text.

Default classes for WebVTT Caption or Subtitle Cue Components

@@ -4099,9 +4100,9 @@ Node Objects to DOM nodes:

HTML elements created as part of the mapping described above must have their -{{Element/namespaceURI}} set to the HTML namespace, use the appropriate IDL interface as defined -in the HTML specification, and, if the corresponding WebVTT Internal Node Object has any applicable classes, must have a HTML namespace, use the appropriate IDL interface as +defined in the HTML specification, 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.

@@ -5325,8 +5326,8 @@ pseudo-elements defined below won't have any effect according to this specificat

The ''::cue'' pseudo-element

-

The ::cue pseudo-element (with no argument) matches any list of WebVTT Node -Objects constructed for the matched element, with the exception that the properties +

The ::cue pseudo-element (with no argument) matches any list of WebVTT +Node Objects constructed for the matched element, with the exception that the properties corresponding to the 'background' shorthand must be applied to the WebVTT cue background box rather than the list of WebVTT Node Objects.

@@ -5352,8 +5353,8 @@ set on the pseudo-element must be ignored:

widows, z-index --> -

The ::cue(|selector|) pseudo-element with an argument must have an argument that -consists of a CSS selector [[!SELECTORS4]]. It matches any WebVTT Internal Node Object +

The ::cue(|selector|) pseudo-element with an argument must have an argument +that consists of a CSS selector [[!SELECTORS4]]. It matches any WebVTT Internal Node Object constructed for the matched element that also matches the given CSS selector, with the nodes being treated as follows:

@@ -5429,8 +5430,8 @@ being treated as follows:

Object">WebVTT Internal Node Objects are considered as being in the namespace expressed as the empty string.

-
  • The universal selector matches all WebVTT Internal Node Objects, including the - root list of WebVTT Node Objects.

  • +
  • The universal selector matches all WebVTT Internal Node Objects, + including the root list of WebVTT Node Objects.

  • ''::cue(:root)'' is equivalent to ''::cue''.

  • @@ -5508,23 +5509,23 @@ would have been applied to the list of WebVTT Node Objects, must instead

    The '':past'' and '':future'' pseudo-classes sometimes match WebVTT Node Objects. [[!SELECTORS4]]

    -

    The :past pseudo-class only matches WebVTT Node Objects -that are in the past.

    +

    The :past pseudo-class only matches WebVTT Node Objects that are in the past.

    -

    A WebVTT Node Object |c| is in the past if, in a -pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, +

    A WebVTT Node Object |c| is in the past if, +in a pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, there exists a WebVTT Timestamp Object whose value is less than the current playback position of the media element that is the matched element, entirely after the WebVTT Node Object |c|.

    -

    The :future pseudo-class only matches WebVTT Node -Objects that are in the future.

    +

    The :future pseudo-class only matches WebVTT Node Objects that are in the future.

    -

    A WebVTT Node Object |c| is in the future if, in a -pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, -there exists a WebVTT Timestamp Object whose value is greater than the current playback -position of the media element that is the matched element, entirely before the -WebVTT Node Object |c|.

    +

    A WebVTT Node Object |c| is in the future +if, in a pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node +Objects, there exists a WebVTT Timestamp Object whose value is greater than the +current playback position of the media element that is the matched element, +entirely before the WebVTT Node Object |c|.

    The ''::cue-region'' pseudo-element

    @@ -5536,14 +5537,14 @@ track regions that are being rendered for the matched element.

    If the matched element is not a video element, the pseudo-element defined below won't have any effect according to this specification.

    -

    The ::cue-region pseudo-element (with no argument) matches any list of WebVTT region objects constructed for the matched element.

    +

    The ::cue-region pseudo-element (with no argument) matches any list of WebVTT region objects constructed for the matched element.

    -

    The ::cue-region(|selector|) pseudo-element with an argument must have an argument that -consists of a CSS selector [[!SELECTORS4]]. It matches any list of WebVTT region objects constructed for the matched element that also matches the -given CSS selector as follows:

    +

    The ::cue-region(|selector|) pseudo-element with an argument must have an +argument that consists of a CSS selector [[!SELECTORS4]]. It matches any list of WebVTT region objects constructed for the matched element that also +matches the given CSS selector as follows:

    -

    The ::cue(|selector|) pseudo-element with an argument must have an argument -that consists of a CSS selector [[!SELECTORS4]]. It matches any WebVTT Internal Node Object +

    The ::cue(|selector|) pseudo-element with an argument must have an argument that +consists of a CSS selector [[!SELECTORS4]]. It matches any WebVTT Internal Node Object constructed for the matched element that also matches the given CSS selector, with the nodes being treated as follows:

    @@ -5430,8 +5429,8 @@ being treated as follows:

    Object">WebVTT Internal Node Objects are considered as being in the namespace expressed as the empty string.

    -
  • The universal selector matches all WebVTT Internal Node Objects, - including the root list of WebVTT Node Objects.

  • +
  • The universal selector matches all WebVTT Internal Node Objects, including the + root list of WebVTT Node Objects.

  • ''::cue(:root)'' is equivalent to ''::cue''.

  • @@ -5509,23 +5508,23 @@ would have been applied to the list of WebVTT Node Objects, must instead

    The '':past'' and '':future'' pseudo-classes sometimes match WebVTT Node Objects. [[!SELECTORS4]]

    -

    The :past pseudo-class only matches WebVTT Node Objects that are in the past.

    +

    The :past pseudo-class only matches WebVTT Node Objects +that are in the past.

    -

    A WebVTT Node Object |c| is in the past if, -in a pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, +

    A WebVTT Node Object |c| is in the past if, in a +pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, there exists a WebVTT Timestamp Object whose value is less than the current playback position of the media element that is the matched element, entirely after the WebVTT Node Object |c|.

    -

    The :future pseudo-class only matches WebVTT Node Objects that are in the future.

    +

    The :future pseudo-class only matches WebVTT Node +Objects that are in the future.

    -

    A WebVTT Node Object |c| is in the future -if, in a pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node -Objects, there exists a WebVTT Timestamp Object whose value is greater than the -current playback position of the media element that is the matched element, -entirely before the WebVTT Node Object |c|.

    +

    A WebVTT Node Object |c| is in the future if, in a +pre-order, depth-first traversal of the WebVTT cue's list of WebVTT Node Objects, +there exists a WebVTT Timestamp Object whose value is greater than the current playback +position of the media element that is the matched element, entirely before the +WebVTT Node Object |c|.

    The ''::cue-region'' pseudo-element

    @@ -5537,14 +5536,14 @@ track regions that are being rendered for the matched element.

    If the matched element is not a video element, the pseudo-element defined below won't have any effect according to this specification.

    -

    The ::cue-region pseudo-element (with no argument) matches any list of WebVTT region objects constructed for the matched element.

    +

    The ::cue-region pseudo-element (with no argument) matches any list of WebVTT region objects constructed for the matched element.

    -

    The ::cue-region(|selector|) pseudo-element with an argument must have an -argument that consists of a CSS selector [[!SELECTORS4]]. It matches any list of WebVTT region objects constructed for the matched element that also -matches the given CSS selector as follows:

    +

    The ::cue-region(|selector|) pseudo-element with an argument must have an argument that +consists of a CSS selector [[!SELECTORS4]]. It matches any list of WebVTT region objects constructed for the matched element that also matches the +given CSS selector as follows: