Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Issue 224833002: Implement DataCue interface. (Closed)

Created:
6 years, 8 months ago by Brendan Long
Modified:
6 years, 4 months ago
CC:
blink-reviews, nessy, arv+blink, jsbell+bindings_chromium.org, marja+watch_chromium.org, kouhei+bindings_chromium.org, gasubic, eric.carlson_apple.com, abarth-chromium, feature-media-reviews_chromium.org, dglazkov+blink, adamk+blink_chromium.org, kojih, haraken, watchdog-blink-watchlist_google.com, Nate Chapin, vcarbune.chromium, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Implement DataCue interface. BUG=359746

Patch Set 1 #

Total comments: 32

Patch Set 2 : Updated based on reviews so we'll be ready if/when this gets approved by WHATWG #

Patch Set 3 : Use TypeChecking IDL extended attribute #

Patch Set 4 : Remove text attribute #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -8 lines) Patch
A LayoutTests/media/track/track-datacue.html View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
A LayoutTests/media/track/track-datacue-expected.txt View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
M LayoutTests/media/video-test.js View 1 3 chunks +12 lines, -1 line 0 comments Download
M Source/bindings/v8/custom/V8TextTrackCueCustom.cpp View 1 2 3 1 chunk +10 lines, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
A Source/core/html/track/DataCue.h View 1 2 3 1 chunk +47 lines, -0 lines 0 comments Download
A Source/core/html/track/DataCue.cpp View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
A Source/core/html/track/DataCue.idl View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/html/track/TextTrackCue.h View 1 2 3 1 chunk +7 lines, -4 lines 0 comments Download
M Source/core/html/track/vtt/VTTCue.h View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Brendan Long
Can you review this? The layout test is copied directly from WebKit (with one change, ...
6 years, 8 months ago (2014-04-03 23:37:56 UTC) #1
haraken
LGTM for bindings/.
6 years, 8 months ago (2014-04-04 00:36:13 UTC) #2
philipj_slow
I'm not aware of a use case for DataCue for normal desktop or mobile browsers, ...
6 years, 8 months ago (2014-04-04 14:35:29 UTC) #3
philipj_slow
https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/video-test.js File LayoutTests/media/video-test.js (right): https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/video-test.js#newcode220 LayoutTests/media/video-test.js:220: "TEST(" + testString + ") THROWS(" + exceptionString + ...
6 years, 8 months ago (2014-04-04 14:54:32 UTC) #4
Brendan Long
On 2014/04/04 14:35:29, philipj wrote: > I'm not aware of a use case for DataCue ...
6 years, 8 months ago (2014-04-04 14:55:01 UTC) #5
Brendan Long
https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/video-test.js File LayoutTests/media/video-test.js (right): https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/video-test.js#newcode220 LayoutTests/media/video-test.js:220: "TEST(" + testString + ") THROWS(" + exceptionString + ...
6 years, 8 months ago (2014-04-04 15:07:22 UTC) #6
Brendan Long
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/TextTrack.cpp File Source/core/html/track/TextTrack.cpp (right): https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/TextTrack.cpp#newcode241 Source/core/html/track/TextTrack.cpp:241: exceptionState.throwDOMException(InvalidNodeTypeError, "DataCues can only be added to tracks with ...
6 years, 8 months ago (2014-04-04 15:17:00 UTC) #7
fs
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp File Source/core/html/track/DataCue.cpp (right): https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp#newcode63 Source/core/html/track/DataCue.cpp:63: exceptionState.throwDOMException(InvalidNodeTypeError, "DataCue.data must be a non-null ArrayBuffer"); On 2014/04/04 ...
6 years, 8 months ago (2014-04-04 17:10:35 UTC) #8
Brendan Long
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp File Source/core/html/track/DataCue.cpp (right): https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp#newcode63 Source/core/html/track/DataCue.cpp:63: exceptionState.throwDOMException(InvalidNodeTypeError, "DataCue.data must be a non-null ArrayBuffer"); On 2014/04/04 ...
6 years, 8 months ago (2014-04-04 17:43:05 UTC) #9
fs
On 2014/04/04 17:43:05, Brendan Long wrote: > https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp > File Source/core/html/track/DataCue.cpp (right): > > https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.cpp#newcode63 ...
6 years, 8 months ago (2014-04-04 18:14:19 UTC) #10
acolwell GONE FROM CHROMIUM
On 2014/04/03 23:37:56, Brendan Long wrote: > Can you review this? > > The layout ...
6 years, 8 months ago (2014-04-04 19:05:16 UTC) #11
sof
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h File Source/core/html/track/DataCue.h (right): https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h#newcode45 Source/core/html/track/DataCue.h:45: return adoptRef(new DataCue(context, start, end, data, exceptionState)); Argument validation ...
6 years, 8 months ago (2014-04-04 19:11:30 UTC) #12
Brendan Long
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h File Source/core/html/track/DataCue.h (right): https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h#newcode45 Source/core/html/track/DataCue.h:45: return adoptRef(new DataCue(context, start, end, data, exceptionState)); On 2014/04/04 ...
6 years, 8 months ago (2014-04-04 19:37:50 UTC) #13
sof
On 2014/04/04 19:37:50, Brendan Long wrote: > https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h > File Source/core/html/track/DataCue.h (right): > > https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataCue.h#newcode45 ...
6 years, 8 months ago (2014-04-04 19:48:08 UTC) #14
philipj_slow
On 2014/04/04 14:55:01, Brendan Long wrote: > On 2014/04/04 14:35:29, philipj wrote: > > I'm ...
6 years, 8 months ago (2014-04-04 20:40:35 UTC) #15
acolwell GONE FROM CHROMIUM
https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/track/track-datacue.html File LayoutTests/media/track/track-datacue.html (right): https://codereview.chromium.org/224833002/diff/1/LayoutTests/media/track/track-datacue.html#newcode46 LayoutTests/media/track/track-datacue.html:46: testDOMException("cue.data = null", "DOMException.INVALID_NODE_TYPE_ERR"); Shouldn't all these invalid assignments ...
6 years, 8 months ago (2014-04-04 23:25:26 UTC) #16
Brendan Long
Here's the intent to implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/U06zrT2N-Xk
6 years, 8 months ago (2014-04-07 16:44:46 UTC) #17
Brendan Long
https://codereview.chromium.org/224833002/diff/1/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp File Source/bindings/v8/custom/V8TextTrackCueCustom.cpp (right): https://codereview.chromium.org/224833002/diff/1/Source/bindings/v8/custom/V8TextTrackCueCustom.cpp#newcode45 Source/bindings/v8/custom/V8TextTrackCueCustom.cpp:45: default: On 2014/04/04 23:25:27, acolwell_OOO_5-24_to_5-30 wrote: > nit: Please ...
6 years, 6 months ago (2014-05-28 16:31:48 UTC) #18
philipj_slow
6 years, 6 months ago (2014-06-02 07:50:51 UTC) #19
https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataC...
File Source/core/html/track/DataCue.cpp (right):

https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataC...
Source/core/html/track/DataCue.cpp:36: : TextTrackCue(startTime, endTime)
On 2014/05/28 16:31:48, Brendan Long wrote:
> On 2014/04/04 23:25:27, acolwell_OOO_5-24_to_5-30 wrote:
> > I'm surprised that there doesn't appear to be any logic to validate that
> > startTime <= endTime. Are these really supposed to be allowed by the spec?
> 
> I don't see anything about that:
> 
>
http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#dom-texttrac...

Right, there is no such restriction. Negative times are also allowed, although
Blink doesn't support it yet ("TODO(93143): Add spec-compliant behavior for
negative time values.")

https://codereview.chromium.org/224833002/diff/1/Source/core/html/track/DataC...
Source/core/html/track/DataCue.cpp:71: return String();
On 2014/05/28 16:31:48, Brendan Long wrote:
> On 2014/04/04 23:25:27, acolwell_OOO_5-24_to_5-30 wrote:
> > On 2014/04/04 15:07:22, Brendan Long wrote:
> > > On 2014/04/04 14:54:33, philipj wrote:
> > > > "The text attribute, on getting, must return UTF-16 text converted from
> data
> > > of
> > > > the text 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."
> > > > 
> > > > I think it doesn't make sense to expose the property at all if it always
> > > returns
> > > > null. (I argued when Silvia was spec'ing this that the property itself
> > doesn't
> > > > make sense and is just a convenience we could do without.)
> > > 
> > > My problem is, how do we identify the encoding? As far as I can tell, the
> > String
> > > constructors expect us to already know the encoding before we use them. I
> > guess
> > > there's probably a function somewhere that does that for HTML documents,
but
> I
> > > suspect cues are short enough that we'd get a lot of false positives.
> > > 
> > > It seems like the .text attribute could be useful in cases where the UA is
> > > creating DataCues, and knows that the content is text, but Chromium
doesn't
> > > (won't?) do that.
> > 
> > I agree with Philip here. It seems odd that we would have to always return
> null.
> > At a minimum, I'd expect some sort of encoding string to signal whether it
was
> > valid to convert data to text or not. As is this attribute doesn't seem very
> > useful.
> 
> There was some discussion about removing .text, but I can't find a W3C bug for
> it :\

It's been removed now:
https://github.com/w3c/html/commit/d5ec35198fea01e56b0ec38eedce58a57a013138

Powered by Google App Engine
This is Rietveld 408576698