Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VTT): Fix spacing between text lines #4961

Merged
merged 3 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/text/ui_text_displayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,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.
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
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