Re: WebVTT bidi: should a cue be allowed to contain more than one paragraph?

Oh, I missed that. But the rules given for setting the CSS properties do
not match what I understand you to say in your previous message. That is,
http://dev.w3.org/html5/webvtt/#applying-css-properties-to-webvtt-node-objects
says
the following:

On the (root) List of WebVTT Node Objects, the 'position' property must be
set to 'absolute', the 'direction' property must be set to [the value of
that name] determined by the rules for updating the display of WebVTT text
tracks for the text track cue from whose text the List of WebVTT Node
Objects was constructed.

And
http://dev.w3.org/html5/webvtt/#rules-for-updating-the-display-of-webvtt-text-tracks
 says:

Apply the Unicode Bidirectional Algorithm's Paragraph Level steps to the
concatenation of the values of each WebVTT Text Object in nodes, in a
pre-order, depth-first traversal [...] to determine the paragraph embedding
level of the first Unicode paragraph of the cue. [BIDI] If the paragraph
embedding level determined in the previous step is even (the paragraph
direction is left-to-right), let direction be 'ltr', otherwise, let it be
'rtl'.

In other word's the CSS direction property of the cue as a whole is set
according to bidi algorithm's paragraph level steps for the* cue **first*
paragraph. Given that the rules for setting the CSS properties do not set
the unicode-bidi property, which means it is the default 'normal', the
direction property value will be used by CSS to override P3 and set the
direction of all the paragraphs in the cue to what should have been only
the first paragraph's direction.

Thus for the example in my email,

THE FOOD WAS GOOD. HERE IS THE ADDRESS:
50 main st.

the rendering will be RTL for both paragraphs, resulting in

:SSERDDA EHT SI EREH .DOOG SAW DOOF EHT
.main st 50

and not in what you agreed was the intended rendering:

:SSERDDA EHT SI EREH .DOOG SAW DOOF EHT
50 main st.

To achieve the intended rendering, you will have to specify (in the rules
given for setting the CSS properties) that unicode-bidi shall be set to
'plaintext' (which has the desired effect of specifying paragraph direction
according to the paragraph level steps, including P3).

Aharon

On Thu, Apr 26, 2012 at 11:32 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Thu, 26 Apr 2012, Aharon (Vladimir) Lanin wrote:
> >
> > Thanks, this is great!
> >
> > One thing, though. As far as I can see, the WebVTT spec does not say
> > that the cue is supposed to be *rendered* in accordance with the Unicode
> > bidi algorithm, and more specifically that its P3 (i.e. first strong
> > character) determines each paragraph's base direction. (Currently, the
> > spec mentions the bidi algorithm's paragraph level steps effectively
> > just for the purpose of resolving cue alignment. It does not say
> > anything about the rendering, i.e. visual ordering of the characters.)
> > The bidi algorithm allows higher level protocols to override P3, as is
> > the case almost everywhere in HTML, for example. It is important that
> > implementers realize that in WebVTT there is no higher level protocol,
> > and thus P3 should apply, and (bidi-aware) users know what to expect and
> > how they can make use of it.
>
> The rendering is defined in terms of CSS. CSS is the higher level protocol
> and it is CSS that then invokes the bidi algorithm for layout.
>
> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>

Received on Thursday, 26 April 2012 21:04:40 UTC