WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
105496
Follow WebVTT line breaking rules
https://bugs.webkit.org/show_bug.cgi?id=105496
Summary
Follow WebVTT line breaking rules
Dean Jackson
Reported
2012-12-19 21:42:34 PST
From the spec: Text runs must be wrapped according to the CSS line-wrapping rules, with the following additional constraints: Regardless of the value of the 'white-space' property, lines must be wrapped at the edge of their containing blocks, even if doing so requires splitting a word where there is no line breaking opportunity. (Thus, normally text wraps as needed, but if there is a particularly long word, it does not overflow as it normally would in CSS, it is instead forcibly wrapped at the box's edge.) 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. I'm not sure we'll be able to do the latter part (nor what the benefit is).
Attachments
Patch
(6.68 KB, patch)
2012-12-19 21:52 PST
,
Dean Jackson
eric.carlson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2012-12-19 21:43:10 PST
<
rdar://problem/12915747
>
Radar WebKit Bug Importer
Comment 2
2012-12-19 21:43:14 PST
<
rdar://problem/12915748
>
Dean Jackson
Comment 3
2012-12-19 21:44:59 PST
Ignore those two radars. The real one is <
rdar://problem/12530021
>
Dean Jackson
Comment 4
2012-12-19 21:52:52 PST
Created
attachment 180277
[details]
Patch
Eric Carlson
Comment 5
2012-12-20 10:04:51 PST
Comment on
attachment 180277
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180277&action=review
> LayoutTests/media/track/captions-webvtt/long-word.vtt:9 > +mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Yummy caption :-)
Dean Jackson
Comment 6
2012-12-20 12:13:35 PST
Committed
r138282
: <
http://trac.webkit.org/changeset/138282
>
Ian 'Hixie' Hickson
Comment 7
2012-12-20 12:30:37 PST
Re the wrapping, the benefit is it avoids cues wrapping like this: Hello World How Are You ...which is hard to read.
Dean Jackson
Comment 8
2012-12-20 12:40:18 PST
(In reply to
comment #7
)
> Re the wrapping, the benefit is it avoids cues wrapping like this: > > Hello World How Are > You > > ...which is hard to read.
Got it. I had a suspicion that is what the specification text meant. This is something we'll have to add to our layout code. I'll open a followup.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug