Bug 105569 - WebVTT line breaks should try to make lines close to the same size
Summary: WebVTT line breaks should try to make lines close to the same size
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 105496
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-20 12:44 PST by Dean Jackson
Modified: 2014-02-19 16:04 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2012-12-20 12:44:50 PST
From the WebVTT spec: "Regardless of the value of the 'white-space' property, any line breaks inserted by the user agent for the purposes of line wrapping must be placed so as to minimize Δ across each run of consecutive lines between preserved newlines in the source. Δ for a set of lines is defined as the sum over each line of the absolute of the difference between the line's length and the mean line length of the set."

e.g. avoid this:

   Hello World How Are
   You
Comment 1 Radar WebKit Bug Importer 2012-12-20 12:45:23 PST
<rdar://problem/12919735>
Comment 2 Dean Jackson 2012-12-20 12:46:18 PST
The obvious solution is:

  Hello
  World
  How
  Are
  You

Kidding!
Comment 3 Ian 'Hixie' Hickson 2012-12-20 12:47:35 PST
Or:

 |ello World How Are Yo|

:-)