Skip to content

Commit

Permalink
fix(VTT): Fix spacing between text lines (#4961)
Browse files Browse the repository at this point in the history
Fixes #4958

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joey Parrish <[email protected]>
  • Loading branch information
3 people committed Mar 1, 2023
1 parent bfb6492 commit a44fe84
Show file tree
Hide file tree
Showing 281 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions lib/text/ui_text_displayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ shaka.text.UITextDisplayer = class {
wrapper = shaka.util.Dom.createHTMLElement('span');
wrapper.classList.add('shaka-text-wrapper');
wrapper.style.backgroundColor = cue.backgroundColor;
wrapper.style.lineHeight = 'normal';
cueElement.appendChild(wrapper);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/test/assets/screenshots/chrome-Android/webvtt-ui-classes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/test/assets/screenshots/chrome-Android/webvtt-ui-voices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/test/assets/screenshots/chrome-Linux/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/chrome-Linux/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/chrome-Linux/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/chrome-Mac/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/chrome-Mac/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/chrome-Mac/webvtt-ui-italic-long.png
Binary file modified test/test/assets/screenshots/chrome-Mac/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/chrome-Windows/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/chrome-Windows/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/chrome-Windows/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/firefox-Linux/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/firefox-Linux/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/firefox-Linux/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/firefox-Mac/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/firefox-Mac/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/firefox-Mac/webvtt-ui-italic-long.png
Binary file modified test/test/assets/screenshots/firefox-Mac/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/firefox-Windows/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/firefox-Windows/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/msedge-Linux/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/msedge-Linux/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/msedge-Linux/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/msedge-Mac/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/msedge-Mac/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/msedge-Mac/webvtt-ui-italic-long.png
Binary file modified test/test/assets/screenshots/msedge-Mac/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/msedge-Windows/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/msedge-Windows/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/msedge-Windows/webvtt-ui-voices.png
Binary file modified test/test/assets/screenshots/safari-Mac/webvtt-ui-bold-long.png
Binary file modified test/test/assets/screenshots/safari-Mac/webvtt-ui-classes.png
Binary file modified test/test/assets/screenshots/safari-Mac/webvtt-ui-italic-long.png
Binary file modified test/test/assets/screenshots/safari-Mac/webvtt-ui-voices.png
3 changes: 0 additions & 3 deletions test/text/web_vtt_layout_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ filterDescribe('WebVTT layout', shaka.test.TextLayoutTests.supported, () => {
await helper.checkScreenshot('line-85-position-50-size-63');
});

// FIXME: UI version is slightly wrong: gaps between lines when bold
it('bold long', async () => {
parseAndDisplay([
'WEBVTT\n',
Expand All @@ -278,7 +277,6 @@ filterDescribe('WebVTT layout', shaka.test.TextLayoutTests.supported, () => {
await helper.checkScreenshot('bold-long');
});

// FIXME: UI version is slightly wrong: gaps between lines when italic
it('italic long', async () => {
parseAndDisplay([
'WEBVTT\n',
Expand All @@ -291,7 +289,6 @@ filterDescribe('WebVTT layout', shaka.test.TextLayoutTests.supported, () => {
await helper.checkScreenshot('italic-long');
});

// FIXME: UI version is slightly wrong: gaps between lines when italic
it('underline long', async () => {
parseAndDisplay([
'WEBVTT\n',
Expand Down

0 comments on commit a44fe84

Please sign in to comment.