Auto merge of #13075 - emilio:calc-media, r=SimonSapin

style: Allow calc in media queries.

<!-- Please describe your changes on the following line: -->

---
<!-- 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

<!-- Either: -->
- [x] There are tests for these changes OR

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1290228

No tests have been added yet, I expect wpt to catch something, otherwise I'll write/import others.

<!-- 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/13075)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-30 15:53:09 -05:00 committed by GitHub
commit 1fcc447941
5 changed files with 72 additions and 30 deletions

View file

@ -6354,6 +6354,12 @@
"url": "/_mozilla/css/float_relative_to_position.html"
}
],
"css/media_calc_crash.html": [
{
"path": "css/media_calc_crash.html",
"url": "/_mozilla/css/media_calc_crash.html"
}
],
"css/meta_viewport_resize.html": [
{
"path": "css/meta_viewport_resize.html",

View file

@ -0,0 +1,17 @@
<!doctype html>
<meta charset="utf-8">
<title>Don't crash when a media query with calc() is found.</title>
<style>
@media (min-width: calc(60px)) {
pease-do {
not: crash;
}
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
assert_true(true, "Reached here without crashing");
})
</script>