Fix cue rendering test and include support for left/right alignment
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 19:00:14 +0000 (19:00 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 19:00:14 +0000 (19:00 +0000)
commit943cc9ba1513123ac54f98e87e57bc8e657210a6
tree3645c1b6435eedc918c352069171c8f3de906106
parent0e5c65a81d0adb63985534d5e64e7d5247c4a619
Fix cue rendering test and include support for left/right alignment
https://bugs.webkit.org/show_bug.cgi?id=130406

Reviewed by Eric Carlson.

Merged from Blink (patch by vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/e695703cb603421c741e59a557a7989113c13b94
http://crbug.com/25155003

Source/WebCore:

No new tests. Covered by media/track/track-cue-rendering-snap-to-lines-not-set.html.

* html/track/VTTCue.cpp:
(WebCore::leftKeyword): Added.
(WebCore::rightKeyword): Added.
(WebCore::VTTCueBox::applyCSSProperties): Added.
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::align): Handle left/right alignment.
(WebCore::VTTCue::setAlign): Ditto.
(WebCore::VTTCue::calculateDisplayParameters): Refactored and revised for left/right tokens.
(WebCore::VTTCue::setCueSettings): Ditto.
(WebCore::VTTCue::getCSSAlignment): Added.
(WebCore::VTTCue::getCSSWritingMode): Added.
* html/track/VTTCue.h:

LayoutTests:

* media/track/captions-webvtt/captions-snap-to-lines-not-set.vtt: Revised for left/right alignment tags.
* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Ditto.
* media/track/track-cue-rendering-snap-to-lines-not-set.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/captions-webvtt/captions-snap-to-lines-not-set.vtt
LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt
LayoutTests/media/track/track-cue-rendering-snap-to-lines-not-set.html
Source/WebCore/ChangeLog
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/html/track/VTTCue.h