- From: Brendan Long <self@brendanlong.com>
- Date: Fri, 14 Feb 2014 21:31:03 -0600
- To: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Cc: public-html <public-html@w3.org>
- Message-ID: <1392435063.21566.3.camel@blong-desktop>
On Sat, 2014-02-15 at 13:40 +1100, Silvia Pfeiffer wrote:
> On Tue, Feb 11, 2014 at 8:51 AM, Brendan Long <self@brendanlong.com> wrote:
> > I think I was reading this too fast and missed this, which seems to apply
> > already:
> >
> > If text track list of cues' associated rules for updating the text track
> > rendering are not the same rules for updating the text track rendering as
> > appropriate for cue, then throw an InvalidStateError exception and abort
> > these steps.
> >
> > Sorry for the list-spam.
>
> I'm a bit confused. Do you still have any open questions?
I'm still wondering about my original two questions:
> According to this, .text can be null:
>
> > The text attribute, on getting, must return UTF-16 text converted
> > from data of thetext track cue that the TextTrackCue object
> > represents. If a conversion of the content in data is not possible,
> > e.g. because the UA is unable to identify the encoding, it must
> > return null.
>
> So shouldn't the WebIDL say "DOMString?" with a question mark to
> indicate that it's nullable?
>
> The other question is, is there a general rule where we take a copy of
> objects in constructors? Otherwise we get weird behavior like this:
>
> > > buf = new ArrayBuffer(4)
> > < ArrayBuffer
> >
> > > bufView = new Uint16Array(buf)
> > < [0, 0]
> > > bufView[0] = "hi".charCodeAt(0=)
> > < 104
> > > bufView[1] = "hi".charCodeAt(1)
> > < 105
> >
> > > cue = new DataCue(1, 2, buf)
> > < DataCue
> >
> > > cue.text
> > < "hi"
> > > bufView[0] = "no".charCodeAt(0)
> > < 110
> > > bufView[1] = "no".charCodeAt(1)
> > < 111
> > > cue.text
> > < "no"
>
> I'm not sure if I was implementing this wrong, or if we need to change
> the spec to specify that .data is a copy of the ArrayBuffer we give
> it.
--=-+iu3/BwY3ZrBQb7Hw8Eu
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.6.6">
</HEAD>
<BODY>
On Sat, 2014-02-15 at 13:40 +1100, Silvia Pfeiffer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Tue, Feb 11, 2014 at 8:51 AM, Brendan Long <<A HREF="mailto:self@brendanlong.com">self@brendanlong.com</A>> wrote:
<FONT COLOR="#737373">> I think I was reading this too fast and missed this, which seems to apply</FONT>
<FONT COLOR="#737373">> already:</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> If text track list of cues' associated rules for updating the text track</FONT>
<FONT COLOR="#737373">> rendering are not the same rules for updating the text track rendering as</FONT>
<FONT COLOR="#737373">> appropriate for cue, then throw an InvalidStateError exception and abort</FONT>
<FONT COLOR="#737373">> these steps.</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> Sorry for the list-spam.</FONT>
I'm a bit confused. Do you still have any open questions?
</PRE>
</BLOCKQUOTE>
<BR>
I'm still wondering about my original two questions:<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
According to this, .text can be null:<BR>
<BLOCKQUOTE TYPE=CITE>
The <TT>text</TT> attribute, on getting, must return UTF-16 text converted from <TT><A HREF="http://www.w3.org/html/wg/drafts/html/CR/text-level-semantics.html#the-data-element">data</A></TT> of the<A HREF="http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#text-track-cue">text track cue</A> that the <TT><A HREF="http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#texttrackcue">TextTrackCue</A></TT> object represents. If a conversion of the content in <TT><A HREF="http://www.w3.org/html/wg/drafts/html/CR/text-level-semantics.html#the-data-element">data</A></TT> is not possible, e.g. because the UA is unable to identify the encoding, it must return null.<BR>
</BLOCKQUOTE>
So shouldn't the WebIDL say "DOMString?" with a question mark <A HREF="http://www.w3.org/TR/WebIDL/">to indicate that it's nullable</A>?<BR>
<BR>
The other question is, is there a general rule where we take a copy of objects in constructors? Otherwise we get weird behavior like this:
<BLOCKQUOTE TYPE=CITE>
<PRE>
> buf = new ArrayBuffer(4)
< ArrayBuffer
> bufView = new Uint16Array(buf)
< [0, 0]
> bufView[0] = "hi".charCodeAt(0=)
< 104
> bufView[1] = "hi".charCodeAt(1)
< 105
> cue = new DataCue(1, 2, buf)
< DataCue
> cue.text
< "hi"
> bufView[0] = "no".charCodeAt(0)
< 110
> bufView[1] = "no".charCodeAt(1)
< 111
> cue.text
< "no"
</PRE>
</BLOCKQUOTE>
I'm not sure if I was implementing this wrong, or if we need to change the spec to specify that .data is a copy of the ArrayBuffer we give it.
</BLOCKQUOTE>
</BODY>
</HTML>
--=-+iu3/BwY3ZrBQb7Hw8Eu--
Received on Saturday, 15 February 2014 03:31:41 UTC