Closed
Bug 882299
Opened 11 years ago
Closed 11 years ago
[webvtt] Implement TextTrackCue::SetLine
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: msaad, Assigned: reyre)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
-Validate argument SetLine
Assignee | ||
Comment 1•11 years ago
|
||
We also need to finish the implementation of this. It's currently commented out in the WebIDL and the stub code in TextTrackCue doesn't take into account that it can by a long or a keyword.
Summary: [webvtt] Implement TextTrackCue::SetLine validation → [webvtt] Implement TextTrackCue::SetLine
Updated•11 years ago
|
Assignee: nobody → caitlin.potter
Comment 2•11 years ago
|
||
According to Ms2ger / bz, the webidl in the proposed bindings is actually not valid (can't have a union of enum and number because strings and numbers are indistinguishable).
I've messaged heycam about this and will hopefully hear back at some point, it might mean trying to ask them to remove the "numbers and strings" are indistinguishable thing, somehow, or it might mean finding a way to get the webvtt DOM api fixed. I don't know!
So I guess this bug is currently blocking on potato.
Flags: needinfo?(cam)
Comment 3•11 years ago
|
||
Numbers and strings will be distinguishable in the near future -- I'll make the edits to the spec next week. There have been a number of other requests for that functionality, and with the semi-recent changes to how overload resolution is done in Web IDL, it makes sense to allow them to coexist in a union.
(Leaving needinfo on me to remind me to update the bug here when I've made the spec change.)
Assignee | ||
Updated•11 years ago
|
Updated•11 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Comment 4•11 years ago
|
||
Cait, it's fine to remove yourself from bugs if you're not going to work on them, but closing them without appropriate resolution is inappropriate.
Assignee: caitlin.potter → administration
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WONTFIX → ---
Comment 5•11 years ago
|
||
Primitive types and DOMString are now distinguishable in Web IDL; sorry for the delay in getting to that.
Flags: needinfo?(cam)
Assignee | ||
Comment 6•11 years ago
|
||
Thanks for fixing that and for letting us know Cameron.
Reporter | ||
Updated•11 years ago
|
QA Contact: mv.nsaad
Reporter | ||
Updated•11 years ago
|
Assignee: administration → mv.nsaad
QA Contact: mv.nsaad
Reporter | ||
Comment 8•11 years ago
|
||
I'm trying to get this forward, but I'm stuck at trying to get it recognize my union type, which is longorAutoKeyword,
After changing the webidl, and trying to compile, I'm getting an error at Uniontypes.h which is created during compilation time.
Can anyone light things up a little for me?
Reporter | ||
Comment 9•11 years ago
|
||
Clarifying things a little bit:
The type to be declared is an union between long and an enum named AutoKeyword. Based on https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Union_types , the name should be LongOrAutoKeyword.
Errors are:‘AutoKeyword’ was not declared in this scope and ‘AutoKeyword’ was not declared in this scope
Reporter | ||
Updated•11 years ago
|
Assignee: mv.nsaad → rick.eyre
Reporter | ||
Comment 10•11 years ago
|
||
Reassigned this to Rick. This bug has been sitting with me for too long and I could not get over it. Will be working on their tests.
Assignee | ||
Comment 11•11 years ago
|
||
Sounds good Marcus. I'll look into this soon. We need this implemented for full VTTCue support.
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8348227 -
Flags: review?(giles)
Attachment #8348227 -
Flags: review?(bugs)
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #8348227 -
Attachment is obsolete: true
Attachment #8348227 -
Flags: review?(giles)
Attachment #8348227 -
Flags: review?(bugs)
Attachment #8348253 -
Flags: review?(giles)
Attachment #8348253 -
Flags: review?(bugs)
Comment 14•11 years ago
|
||
Comment on attachment 8348253 [details] [diff] [review]
Bug 882299 - Implement VTTCue::Line r=smaug,rillian
In the future could you create patches with -U 8 to get more context.
Attachment #8348253 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 15•11 years ago
|
||
Thanks for review Olli.
(In reply to Olli Pettay [:smaug] from comment #14)
> In the future could you create patches with -U 8 to get more context.
Yep, I can do that.
Comment 16•11 years ago
|
||
Comment on attachment 8348253 [details] [diff] [review]
Bug 882299 - Implement VTTCue::Line r=smaug,rillian
Review of attachment 8348253 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/TextTrackCue.h
@@ +182,5 @@
> + }
> + if (mLine.IsLong()) {
> + mLine.SetAsAutoKeyword() = aLine.GetAsAutoKeyword();
> + mReset = true;
> + }
Do you not need to call CueChanged() here?
Attachment #8348253 -
Flags: review?(giles) → review+
Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Ralph Giles (:rillian) from comment #16)
> Do you not need to call CueChanged() here?
Yes. Good catch! Added.
Carrying forward r=rillian,smaug
Try: https://tbpl.mozilla.org/?tree=Try&rev=ce24c745dabd
Attachment #8348253 -
Attachment is obsolete: true
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 19•11 years ago
|
||
Rebasing against current. Carring forward r=rillian,smaug.
Please land bug 949642 before this.
Attachment #8350098 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 20•11 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/7a4e6be6bea5 because something from the push this was in introduced a new intermittent failure on Android: https://tbpl.mozilla.org/php/getParsedLog.php?id=32309229&tree=Mozilla-Inbound
Flags: in-testsuite+
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Comment 23•11 years ago
|
||
When you go to reland this, note that the patch for bug 952062 requires that SetAs* only be called on a union which is not yet initialized. You may want to not use a WebIDL type to store things internally, or we may need to add public APIs on WebIDL union types to change their type or something... The code in this bug _was_ safe, but only because both int32_t and the AutoKeyword enum have trivial destructors, which is not true of union members in general.
Comment 24•11 years ago
|
||
Peter, how would you feel about adding a public Destroy() or DestroySelf() method to unions that does what the dtor does right now and sets type to eUninitialized?
Alternately, we could make SetAs* destroy things as needed if the union is already initialized, but that adds some extra branches to the normal binding codepath for initializing unions.... Maybe what we need is actually separate unsafe APIs for binding code and safe ones for other C++ code?
Flags: needinfo?(peterv)
Merged backout to mozilla-central
https://hg.mozilla.org/mozilla-central/rev/7a4e6be6bea5
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 26•11 years ago
|
||
(In reply to Vacation Dec 19 to Jan 1 from comment #24)
> Maybe what we need is actually
> separate unsafe APIs for binding code and safe ones for other C++ code?
This sounds most API user friendly, and least surprising behavior.
Assignee | ||
Comment 27•11 years ago
|
||
I'm thinking the simplest course of action right now is to not use the WebIDL type to store things internally. I'll go ahead and do that now if you agree Boris?
I'm not sure what kind of unsafe APIs we would need and how to go about doing that. I'd be happy to take a crack at it if you pointed me in the right direction.
Flags: needinfo?(bzbarsky)
Comment 28•11 years ago
|
||
Rick, I wasn't expecting you to change the codegen to add the safe APIs... Please just file a bug on me to do that, and I suspect that using a different type for the internal storage here is simplest for now.
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 29•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #28)
> Rick, I wasn't expecting you to change the codegen to add the safe APIs...
> Please just file a bug on me to do that, and I suspect that using a
> different type for the internal storage here is simplest for now.
Sounds good Boris :).
Assignee | ||
Comment 30•11 years ago
|
||
Opened follow up bug 958540.
Updated•11 years ago
|
Flags: needinfo?(peterv)
Assignee | ||
Comment 31•11 years ago
|
||
Switched to not using the UnionType to store the value internally in TextTrackCue. Carrying forward r=smaug,rillian.
Attachment #8350667 -
Attachment is obsolete: true
Attachment #8360456 -
Flags: review?(bzbarsky)
Comment 32•11 years ago
|
||
Comment on attachment 8360456 [details] [diff] [review]
v5: Implement VTTCue::Line r=smaug,rillian,bz
r=me on the mLineIsAutoKeyword/mLineLong bits.
Attachment #8360456 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 33•11 years ago
|
||
Thanks for review Boris.
Try push: https://tbpl.mozilla.org/?tree=Try&rev=dc36222081e6
Comment 35•11 years ago
|
||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 36•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Updated•8 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•