RESOLVED FIXED Bug 53556
Adding Feature Defines for <track>
https://bugs.webkit.org/show_bug.cgi?id=53556
Summary Adding Feature Defines for <track>
Anna Cavender
Reported 2011-02-01 17:05:45 PST
A first step in implementing <track> and HTMLTrackElement is adding appropriate #ifdefs.
Attachments
Patch (37.05 KB, patch)
2011-03-31 22:10 PDT, Anna Cavender
no flags
Patch (33.97 KB, patch)
2011-04-01 08:15 PDT, Anna Cavender
no flags
Patch (48.37 KB, patch)
2011-04-01 15:03 PDT, Anna Cavender
no flags
Patch (48.40 KB, patch)
2011-04-01 16:49 PDT, Anna Cavender
no flags
Patch (48.50 KB, patch)
2011-04-05 21:27 PDT, Anna Cavender
no flags
Patch (48.50 KB, patch)
2011-04-06 10:20 PDT, Anna Cavender
no flags
Patch (36.15 KB, patch)
2011-04-07 18:47 PDT, Anna Cavender
no flags
Patch (44.07 KB, patch)
2011-04-07 19:05 PDT, Anna Cavender
no flags
Patch (44.04 KB, patch)
2011-04-07 21:07 PDT, Anna Cavender
no flags
Patch which fix the issue with Qt and GTK. (32.59 KB, patch)
2011-04-11 14:40 PDT, Alexis Menard (darktears)
eric.carlson: review+
Rename TRACK to VIDEO_TRACK (22.83 KB, patch)
2011-04-13 16:06 PDT, Anna Cavender
no flags
Rename TRACK to VIDEO_TRACK, try again with updated patch (22.68 KB, patch)
2011-04-14 12:13 PDT, Anna Cavender
no flags
Anna Cavender
Comment 1 2011-03-31 22:10:50 PDT
Early Warning System Bot
Comment 2 2011-03-31 22:22:38 PDT
Collabora GTK+ EWS bot
Comment 3 2011-03-31 22:47:37 PDT
Anna Cavender
Comment 4 2011-03-31 23:04:11 PDT
Hmm, looks like the qt and qtk bots are deriving code in JSHTMLElementWrapperFactory that expects to see a JSHTMLTrackElement.h. I would have expected the #ifdefs and ENABLE(TRACK)=0 to prevent that (seems to be ok on other platforms). Did I miss something?
Eric Carlson
Comment 5 2011-03-31 23:28:43 PDT
Comment on attachment 87825 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87825&action=review > Source/WebCore/html/HTMLMediaElement.cpp:739 > +#if ENABLE(TRACK) > +void HTMLMediaElement::loadMediaTracks() > +{ > + for (Node* node = firstChild(); node; node = node->nextSibling()) { > + if (node->hasTagName(trackTag)) { > + HTMLTrackElement* track = static_cast<HTMLTrackElement*>(node); > + // TODO(annacc): store in an ExclusiveTrackList (4.8.10.10.1) > + track->load(); > + } > + } > +} > +#endif > + I would leave the HTMLMediaElement changes out of this patch. loadMediaTracks doesn't do anything yet, and it isn't clear who will call it or when, so it isn't possible to evaluate the design or code. > Source/WebCore/html/HTMLTrackElement.cpp:79 > +void HTMLTrackElement::setSrc(const String& url) > +{ > + setAttribute(srcAttr, url); > +} > + Isn't a src accessor method also necessary? > Source/WebCore/html/HTMLTrackElement.cpp:128 > +void HTMLTrackElement::scheduleErrorEvent() > +{ > + LOG(Media, "HTMLTrackElement::scheduleErrorEvent - %p", this); > + if (m_errorEventTimer.isActive()) > + return; > + > + m_errorEventTimer.startOneShot(0); > +} > + Who will call scheduleErrorEvent and why? It probably makes sense to only include the track methods that deal with IDL attributes in this patch because without more context it isn't really possible to evaluate this part. > Source/WebCore/html/HTMLTrackElement.cpp:148 > + // TODO(annacc): create a LoadableTextTrack and kick of loading Type "of" -> "off"
Anna Cavender
Comment 6 2011-04-01 08:15:33 PDT
Anna Cavender
Comment 7 2011-04-01 08:19:33 PDT
Thanks for the quick response! I removed all changes not relevant to the IDL for HTMLTrackElement. Any thoughts to why it's not building on qt and gtk? I'm not familiar with that area, but I don't see gypi files that look like they will help.
Early Warning System Bot
Comment 8 2011-04-01 08:29:34 PDT
Collabora GTK+ EWS bot
Comment 9 2011-04-01 08:39:28 PDT
Anna Cavender
Comment 10 2011-04-01 13:24:56 PDT
*** Bug 53557 has been marked as a duplicate of this bug. ***
Anna Cavender
Comment 11 2011-04-01 15:03:39 PDT
Build Bot
Comment 12 2011-04-01 16:00:57 PDT
Anna Cavender
Comment 13 2011-04-01 16:49:27 PDT
Anna Cavender
Comment 14 2011-04-04 14:46:31 PDT
Windows build errors fixed. Other errors look like they could be addressed with a manual commit.
Anna Cavender
Comment 15 2011-04-05 21:27:02 PDT
Eric Carlson
Comment 16 2011-04-06 09:40:58 PDT
Comment on attachment 88361 [details] Patch r+ with the changes suggested below. View in context: https://bugs.webkit.org/attachment.cgi?id=88361&action=review > Source/WebCore/ChangeLog:8 > + No new tests. (OOPS!) Shouldn't leave an OOPS in the ChangeLog. It would be helpful to say why no new tests were added with this patch. > Source/WebCore/html/HTMLTrackElement.cpp:66 > + // TODO(annacc): > + // static_cast<HTMLMediaElement*>(parentNode())->trackWasAdded(this); This isn't right, maybe you mean something like "trackWillBeRemoved(this)"? > Source/WebCore/html/HTMLTrackElement.cpp:114 > +bool HTMLTrackElement::isDefault() const > +{ > + return equalIgnoringCase(getAttribute(defaultAttr), "true"); > +} "default" is a boolean attribute, so I think you should use "return hasAttribute(defaultAttr)" > Source/WebCore/html/HTMLTrackElement.cpp:119 > +void HTMLTrackElement::setIsDefault(bool isDefault) > +{ > + setAttribute(defaultAttr, isDefault ? "true" : "false"); > +} And here you can use "setBooleanAttribute(defaultAttr, isDefault);"
Anna Cavender
Comment 17 2011-04-06 10:17:54 PDT
Comment on attachment 88361 [details] Patch Thanks for the review! New patch up shortly. View in context: https://bugs.webkit.org/attachment.cgi?id=88361&action=review >> Source/WebCore/ChangeLog:8 >> + No new tests. (OOPS!) > > Shouldn't leave an OOPS in the ChangeLog. It would be helpful to say why no new tests were added with this patch. Done. >> Source/WebCore/html/HTMLTrackElement.cpp:66 >> + // static_cast<HTMLMediaElement*>(parentNode())->trackWasAdded(this); > > This isn't right, maybe you mean something like "trackWillBeRemoved(this)"? oops, good catch. Done. >> Source/WebCore/html/HTMLTrackElement.cpp:114 >> +} > > "default" is a boolean attribute, so I think you should use "return hasAttribute(defaultAttr)" Done. Not sure what I was thinking :). >> Source/WebCore/html/HTMLTrackElement.cpp:119 >> +} > > And here you can use "setBooleanAttribute(defaultAttr, isDefault);" Done. Thanks!
Anna Cavender
Comment 18 2011-04-06 10:20:20 PDT
WebKit Commit Bot
Comment 19 2011-04-06 11:35:58 PDT
Comment on attachment 88465 [details] Patch Rejecting attachment 88465 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'apply-..." exit_code: 2 Last 500 characters of output: of 2 hunks FAILED -- saving rejects to file WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops.rej patching file WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops Hunk #1 FAILED at 9. Hunk #2 FAILED at 202. 2 out of 2 hunks FAILED -- saving rejects to file WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops.rej patching file configure.ac Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Eric Carlson', u'--for..." exit_code: 1 Full output: http://queues.webkit.org/results/8344300
Anna Cavender
Comment 20 2011-04-06 12:50:57 PDT
Need to land this patch manually?
WebKit Review Bot
Comment 21 2011-04-07 15:39:46 PDT
http://trac.webkit.org/changeset/83220 might have broken Qt Linux Release minimal
Anna Cavender
Comment 22 2011-04-07 18:47:33 PDT
Anna Cavender
Comment 23 2011-04-07 18:50:02 PDT
Last patch commited by hand by scherkus ran into qt errors similar to the first two patches and had to be reverted (see below). I don't see why this would be happening, so I'm submitting a new patch here to see what the bots do with it. ../../WebCore/generated/JSHTMLElementWrapperFactory.cpp:99:32: error: JSHTMLTrackElement.h: No such file or directory distcc[629] ERROR: compile ../../WebCore/generated/JSHTMLElementWrapperFactory.cpp on localhost failed
Anna Cavender
Comment 24 2011-04-07 19:05:42 PDT
Anna Cavender
Comment 25 2011-04-07 21:06:31 PDT
Arg. I think I see the problem. Changing default => (isAppleWebKit() || isGtk()) to default => 0 which I think was an accidental carryover from ENABLE_VIDEO. :( I'm really sorry about all the patches. Hopefully this will fix the problems.
Anna Cavender
Comment 26 2011-04-07 21:07:15 PDT
Hin-Chung Lam
Comment 27 2011-04-08 13:28:39 PDT
WebKit Review Bot
Comment 28 2011-04-08 13:42:47 PDT
http://trac.webkit.org/changeset/83335 might have broken Chromium Win Release
Hin-Chung Lam
Comment 29 2011-04-08 13:58:33 PDT
Reverted r83335 for reason: GTK and QT bots are broken Committed r83342: <http://trac.webkit.org/changeset/83342>
Alexis Menard (darktears)
Comment 30 2011-04-11 14:40:15 PDT
Created attachment 89094 [details] Patch which fix the issue with Qt and GTK. Hi, I believe I fixed the issues with Qt and GTK bots. Eric could you please review it again? Thanks.
Alexis Menard (darktears)
Comment 31 2011-04-11 16:12:05 PDT
Anna Cavender
Comment 32 2011-04-11 16:44:18 PDT
Thanks Alexis, I appreciate the helping hand. :) Was having trouble replicating gtk and qt issues locally.
Alexis Menard (darktears)
Comment 33 2011-04-11 16:49:56 PDT
(In reply to comment #32) > Thanks Alexis, I appreciate the helping hand. :) Was having trouble replicating gtk and qt issues locally. No problem, there was some mac build issue too after I landed the patch, I hope http://trac.webkit.org/changeset/83534 will fix it :D.
Alexis Menard (darktears)
Comment 34 2011-04-11 17:34:02 PDT
Daniel Bates
Comment 35 2011-04-11 18:47:03 PDT
(In reply to comment #31) > Committed r83527: <http://trac.webkit.org/changeset/83527> This change broke the GTK 32-bit Release build (why not the 64 bit one?): GTK 32-bit Linux Release (build 12633; r83548): <http://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/12633/steps/compile-webkit/logs/stdio>
Daniel Bates
Comment 36 2011-04-11 18:49:57 PDT
Committed GTK build fix in changeset 83549 <http://trac.webkit.org/changeset/83549>.
Alexis Menard (darktears)
Comment 37 2011-04-11 19:01:15 PDT
(In reply to comment #36) > Committed GTK build fix in changeset 83549 <http://trac.webkit.org/changeset/83549>. Thanks for the fix.
Anna Cavender
Comment 38 2011-04-13 16:06:50 PDT
Created attachment 89486 [details] Rename TRACK to VIDEO_TRACK
Anna Cavender
Comment 39 2011-04-14 10:49:35 PDT
one last thing: changing the name from TRACK to VIDEO_TRACK.
WebKit Commit Bot
Comment 40 2011-04-14 11:05:16 PDT
Comment on attachment 89486 [details] Rename TRACK to VIDEO_TRACK Rejecting attachment 89486 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'apply-..." exit_code: 2 Last 500 characters of output: ing file Source/WebKit/mac/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebKit/mac/Configurations/FeatureDefines.xcconfig patching file Source/WebKit2/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebKit2/Configurations/FeatureDefines.xcconfig patch: **** Only garbage was found in the patch input. patching file configure.ac Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Eric Carlson', u'--for..." exit_code: 2 Full output: http://queues.webkit.org/results/8399696
Anna Cavender
Comment 41 2011-04-14 12:13:50 PDT
Created attachment 89621 [details] Rename TRACK to VIDEO_TRACK, try again with updated patch
WebKit Commit Bot
Comment 42 2011-04-15 00:11:03 PDT
The commit-queue encountered the following flaky tests while processing attachment 89621 [details]: http/tests/misc/favicon-loads-with-icon-loading-override.html bug 58412 (author: alice.liu@apple.com) http/tests/xmlhttprequest/basic-auth.html bug 51613 (author: ap@webkit.org) fast/images/load-img-with-empty-src.html bug 50855 (author: mitz@webkit.org) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 43 2011-04-15 00:14:07 PDT
Comment on attachment 89621 [details] Rename TRACK to VIDEO_TRACK, try again with updated patch Clearing flags on attachment: 89621 Committed r83952: <http://trac.webkit.org/changeset/83952>
WebKit Review Bot
Comment 44 2011-04-15 14:14:22 PDT
Comment on attachment 88762 [details] Patch Cleared Eric Carlson's review+ from obsolete attachment 88762 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Hajime Morrita
Comment 45 2011-06-14 23:33:29 PDT
Can we close this?
Anna Cavender
Comment 46 2011-06-15 08:07:18 PDT
Yep. Go ahead and close.
Note You need to log in before you can comment on or make changes to this bug.