Summary: | Make TextTrackCue more mutable | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anna Cavender <annacc> | ||||||||
Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, eric.carlson, jknotten, ojan, vcarbune, webkit-bug-importer, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 43668 | ||||||||||
Attachments: |
|
Description
Anna Cavender
2011-11-16 14:59:56 PST
Link to TextTrackCue in the multi-page spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackcue Also, getCueAsSource() has been replaced with a mutable 'text' attribute. Created attachment 121317 [details]
Proposed patch
(In reply to comment #3) > Also, getCueAsSource() has been replaced with a mutable 'text' attribute. The patch was big enough that I wrote up https://bugs.webkit.org/show_bug.cgi?id=75646 for these changes. Attachment 121317 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/medi..." exit_code: 1
Source/WebCore/html/TextTrackCue.h:72: The parameter name "b" adds no information, so it should be removed. [readability/parameter_name] [5]
Source/WebCore/html/TextTrackCue.h:78: The parameter name "b" adds no information, so it should be removed. [readability/parameter_name] [5]
Source/WebCore/html/TextTrackCue.cpp:274: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4]
Total errors found: 3 in 11 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 121320 [details]
Pedantic update.
Created attachment 121321 [details]
Updated patch - hopefully pedantic AND correct this time.
Comment on attachment 121321 [details] Updated patch - hopefully pedantic AND correct this time. View in context: https://bugs.webkit.org/attachment.cgi?id=121321&action=review > Source/WebCore/html/TextTrackCue.cpp:197 > + if (direction != m_writingDirection) { I'd make this an early return instead. > Source/WebCore/html/TextTrackCue.cpp:304 > + if (alignment != m_cueAlignment) { Early return. > Source/WebCore/html/TextTrackCue.h:63 > + void setId(String); This should take a const String& This patch seems to have broken test media/track/track-cues-seeking.html on chromium platform. This was diff in outputs: @@ -13,19 +13,19 @@ EVENT(seeked) EXPECTED (video.currentTime == '1') OK -EXPECTED (activeCues.length == '1') OK +EXPECTED (activeCues.length == '1'), OBSERVED '0' FAIL RUN(video.currentTime = 1.5) EVENT(seeked) EXPECTED (video.currentTime == '1.5') OK -EXPECTED (activeCues.length == '2') OK +EXPECTED (activeCues.length == '2'), OBSERVED '0' FAIL RUN(video.currentTime = 2) EVENT(seeked) EXPECTED (video.currentTime == '2') OK -EXPECTED (activeCues.length == '3') OK +EXPECTED (activeCues.length == '3'), OBSERVED '0' FAIL RUN(video.currentTime = 2.5) So it seems that perhaps the activeCues haven't been loaded by the time the seeking takes place. Is this a fault with this patch, or does the test need to be updated in some way? |