-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(WebVTT): Fix horizontal positioning with cue box size (#4949)
When the VTT size setting is used, the horizontal positioning was wrong in both native and UI display. The native display is wrong on Chrome and Edge because of a layout bug in Chrome, where the shadow DOM for the cue box has conflicting (redundant) styles. For example, these VTT settings: `line: 85% position: 50% size: 63%` result in these styles in the shadow DOM: `top: 85%; left: 18.5%; transform: translate(-18.5%, -85%)`. The `translate` style is what breaks the positioning. Unfortunately, there is no way to fix that in JavaScript. The UI display, however, was buggy for different reasons and is fixable. The styles `left: 0; top: 0;` were applied by default, and then `top: 85%;` and `width: 63%;` were set based on the cue settings. The default of `left: 0` was what broke the positioning. Removing this leaves `left` set implicitly to `auto`, which is correct. No other test cases were broken (or fixed) by this change. This also adds a filter parameter to the lab workflow to run a subset of tests for quicker results. This is useful for updating screenshots. Closes b/259121343
- Loading branch information
1 parent
2b50b88
commit f456318
Showing
24 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.25 KB
...t/assets/screenshots/chrome-Linux/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.59 KB
.../test/assets/screenshots/chrome-Linux/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.76 KB
...est/assets/screenshots/chrome-Mac/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.84 KB
test/test/assets/screenshots/chrome-Mac/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.33 KB
...assets/screenshots/chrome-Windows/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.51 KB
...est/assets/screenshots/chrome-Windows/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.36 KB
.../assets/screenshots/firefox-Linux/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.59 KB
...test/assets/screenshots/firefox-Linux/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.35 KB
...st/assets/screenshots/firefox-Mac/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.91 KB
test/test/assets/screenshots/firefox-Mac/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.29 KB
...ssets/screenshots/firefox-Windows/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.49 KB
...st/assets/screenshots/firefox-Windows/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.24 KB
...t/assets/screenshots/msedge-Linux/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.59 KB
.../test/assets/screenshots/msedge-Linux/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.76 KB
...est/assets/screenshots/msedge-Mac/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.84 KB
test/test/assets/screenshots/msedge-Mac/webvtt-ui-line-85-position-50-size-63.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 added
BIN
+2.33 KB
...assets/screenshots/msedge-Windows/webvtt-native-line-85-position-50-size-63.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 added
BIN
+4.51 KB
...est/assets/screenshots/msedge-Windows/webvtt-ui-line-85-position-50-size-63.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2.96 KB
...est/assets/screenshots/safari-Mac/webvtt-native-line-85-position-50-size-63.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 added
BIN
+5.05 KB
test/test/assets/screenshots/safari-Mac/webvtt-ui-line-85-position-50-size-63.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters