Right now when calling getComputedStyle with an element from another document,
we return the style using the pres context of that document, not of the document
of the window getComputedStyle was called on, so this holds.
But it will stop holding if we ever change this, so assert it doesn't happen.
Bug: 1374062
Reviewed-By: Manishearth
MozReview-Commit-ID: 3g8yQWWdsen
Zoom changes can change the meaning of ems, so we can't re-evaluate media
queries with the old values, because otherwise we may miss a restyle.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1357461
MozReview-Commit-ID: HQInvR7RPqR
If there are multiple prefixed/non-prefixed @keyframes with the same name;
* non-prefixed rule overrides earlier rules.
* prefixed rule overrides earlier prefixed rules.
To make it possible to check the rule type when parsing lengths, we need to pass
the `ParserContext` down through many layers to the place where length units are
parsed.
This change leaves it unused, so it's only to prepare for the next change.
MozReview-Commit-ID: 70YwtcCxnWw
Now that cascade() gets a Device, we can use the default computed values from
there to avoid propagating that state all over the place.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
At least until we support scrollbars properly, this size is going to be the
correct one. I've left a TODO to grab the proper one once we support it.
This allows to trivially test viewport units for now.
MozReview-Commit-ID: JdaZ6WlZ2C6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Update cssparser to 0.11
<!-- Please describe your changes on the following line: -->
<s>Depends on https://github.com/servo/rust-cssparser/pull/122.</s>
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15735)
<!-- Reviewable:end -->
Two main notes:
* The nsStringBuffer bit goes untested, since it's only used on windows and
there's no way I can test it, please review with care.
* I haven't implemented yet the "enumerated" media queries. I'd want to do it
as a follow-up, because I'm running out of time, and it requires some
investigation.
MozReview-Commit-ID: 1pBbzyIViPk
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>