mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Use a CSS transform to update the progress bar instead of changing the width (bug 1768481)
- it isn't a fix for bug 1768481 but just a tiny improvement to refresh the progress bar on the compositor thread.
This commit is contained in:
parent
63441e8f1e
commit
e94b9d1d7f
2 changed files with 15 additions and 11 deletions
|
@ -362,24 +362,26 @@ select {
|
|||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: var(--progressBar-percent);
|
||||
width: 100%;
|
||||
transform: scaleX(var(--progressBar-percent));
|
||||
transform-origin: 0 0;
|
||||
height: 100%;
|
||||
background-color: var(--progressBar-color);
|
||||
overflow: hidden;
|
||||
transition: width 200ms;
|
||||
transition: transform 200ms;
|
||||
}
|
||||
|
||||
@keyframes progressIndeterminate {
|
||||
0% {
|
||||
left: -142px;
|
||||
transform: translateX(-142px);
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
#loadingBar .progress.indeterminate {
|
||||
width: 100%;
|
||||
transform: none;
|
||||
background-color: var(--progressBar-indeterminate-bg-color);
|
||||
transition: none;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue