-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
LibWeb: Account for animated values when computing font #6757
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
base: master
Are you sure you want to change the base?
Conversation
79e61b1 to
9e35545
Compare
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest |
9e35545 to
f0b64c5
Compare
|
Rebased to resolve conflicts |
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest |
f0b64c5 to
da6c986
Compare
|
Rebased to resolve conflicts |
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest |
Since we resolve any relative lengths at compute time there's no need for the value to be passed around as a `NumberOrCalculated` and we can just resolve it within `ComputedProperties::font_variation_settings`. The only place this is used it is used with value_or so there's no need to return it is an `Optional`. This is only used for loading fonts (which occurs during style computation) so there's no need to store it in `ComputedValues`
Font computation and loading is distinct enough from style computation that it makes more sense to have this in it's own class. This will be useful later when we move the font loading process to `ComputedProperties` in order to respect animated values.
Computing the font for an element in `compute_font` is premature since we are yet to apply animated properties - instead we should compute the value on the fly (with a cache to avoid unnecessary work) to ensure we are respecting the latest values
da6c986 to
fd1b97e
Compare
|
Rebased to resolve conflicts |
See individual commits for details