Bug 190004

Summary: WebVTT cue alignment broken
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebCore Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, eric.carlson, ews-watchlist, rniwa, tsavell
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews103 for mac-sierra
none
Archive of layout-test-results from ews113 for mac-sierra
none
Patch none

Per Arne Vollan
Reported 2018-09-26 11:06:44 PDT
Closed caption rendering of proper cue alignment from a WebVTT file is broken. Left alignment is rendered on the right, right alignment is rendered on the left.
Attachments
Patch (37.72 KB, patch)
2018-09-26 11:52 PDT, Per Arne Vollan
eric.carlson: review+
Patch (37.41 KB, patch)
2018-09-26 12:39 PDT, Per Arne Vollan
ews-watchlist: commit-queue-
Archive of layout-test-results from ews103 for mac-sierra (2.40 MB, application/zip)
2018-09-26 13:46 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews113 for mac-sierra (3.09 MB, application/zip)
2018-09-26 14:34 PDT, EWS Watchlist
no flags
Patch (37.44 KB, patch)
2018-09-26 14:47 PDT, Per Arne Vollan
no flags
Per Arne Vollan
Comment 1 2018-09-26 11:07:03 PDT
Per Arne Vollan
Comment 2 2018-09-26 11:52:48 PDT
Eric Carlson
Comment 3 2018-09-26 12:24:02 PDT
Comment on attachment 350876 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350876&action=review > Source/WebCore/html/track/TextTrackCueGeneric.cpp:173 > +ExceptionOr<void> TextTrackCueGeneric::setPosition(const Variant<double, AutoKeyword>& position) Nit: "Variant<double, AutoKeyword>" is used often enough that it would be good to define a type for it: using LineAndPositionSetting = Variant<double, AutoKeyword>; > Source/WebCore/html/track/VTTCue.cpp:401 > + Variant<double, AutoKeyword> pos; > + if (textPositionIsAuto()) > + pos = Auto; > + else > + pos = m_textPosition; > + return pos; Nit: this can be reduced to something like: return textPositionIsAuto() ? Auto : m_textPosition; > Source/WebCore/html/track/VTTCue.cpp:412 > + if (position.index() == 1) { I think WTF::holds_alternative<> would be cleaner: WTF::holds_alternative<AutoKeyword>(position)
Per Arne Vollan
Comment 4 2018-09-26 12:26:28 PDT
(In reply to Eric Carlson from comment #3) > Comment on attachment 350876 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=350876&action=review > > > Source/WebCore/html/track/TextTrackCueGeneric.cpp:173 > > +ExceptionOr<void> TextTrackCueGeneric::setPosition(const Variant<double, AutoKeyword>& position) > > Nit: "Variant<double, AutoKeyword>" is used often enough that it would be > good to define a type for it: > > using LineAndPositionSetting = Variant<double, AutoKeyword>; > > > Source/WebCore/html/track/VTTCue.cpp:401 > > + Variant<double, AutoKeyword> pos; > > + if (textPositionIsAuto()) > > + pos = Auto; > > + else > > + pos = m_textPosition; > > + return pos; > > Nit: this can be reduced to something like: > > return textPositionIsAuto() ? Auto : m_textPosition; > > > Source/WebCore/html/track/VTTCue.cpp:412 > > + if (position.index() == 1) { > > I think WTF::holds_alternative<> would be cleaner: > > WTF::holds_alternative<AutoKeyword>(position) Thanks for reviewing! I will update the patch.
Per Arne Vollan
Comment 5 2018-09-26 12:39:29 PDT
EWS Watchlist
Comment 6 2018-09-26 13:46:11 PDT
Comment on attachment 350883 [details] Patch Attachment 350883 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9359332 New failing tests: media/track/track-webvtt-tc016-align-positioning.html media/track/track-cue-mutable.html media/track/track-vttcue.html media/track/track-webvtt-tc021-valign.html media/track/track-webvtt-tc018-align-text-line-position.html media/track/track-add-remove-cue.html media/track/track-webvtt-tc015-positioning.html media/track/track-webvtt-tc013-settings.html
EWS Watchlist
Comment 7 2018-09-26 13:46:13 PDT
Created attachment 350895 [details] Archive of layout-test-results from ews103 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 8 2018-09-26 14:34:56 PDT
Comment on attachment 350883 [details] Patch Attachment 350883 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9359515 New failing tests: media/track/track-webvtt-tc018-align-text-line-position.html media/track/track-cue-mutable.html media/track/track-vttcue.html media/track/track-webvtt-tc021-valign.html media/track/track-webvtt-tc016-align-positioning.html media/track/track-add-remove-cue.html media/track/track-webvtt-tc015-positioning.html media/track/track-webvtt-tc013-settings.html
EWS Watchlist
Comment 9 2018-09-26 14:34:58 PDT
Created attachment 350901 [details] Archive of layout-test-results from ews113 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-sierra Platform: Mac OS X 10.12.6
Per Arne Vollan
Comment 10 2018-09-26 14:47:43 PDT
WebKit Commit Bot
Comment 11 2018-09-26 16:10:48 PDT
Comment on attachment 350905 [details] Patch Clearing flags on attachment: 350905 Committed r236531: <https://trac.webkit.org/changeset/236531>
Note You need to log in before you can comment on or make changes to this bug.