Auto merge of #12838 - emilio:viewport, r=SimonSapin

Fix restyling on viewport resize.

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

Fixes https://github.com/servo/servo/issues/12835

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

<!-- 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/12838)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-16 13:48:20 -05:00 committed by GitHub
commit 49431be44a
16 changed files with 236 additions and 46 deletions

View file

@ -1356,6 +1356,18 @@
"url": "/_mozilla/css/direction_style_caching.html"
}
],
"css/dirty_viewport.html": [
{
"path": "css/dirty_viewport.html",
"references": [
[
"/_mozilla/css/dirty_viewport_ref.html",
"=="
]
],
"url": "/_mozilla/css/dirty_viewport.html"
}
],
"css/empty_cells_a.html": [
{
"path": "css/empty_cells_a.html",
@ -10576,6 +10588,18 @@
"url": "/_mozilla/css/direction_style_caching.html"
}
],
"css/dirty_viewport.html": [
{
"path": "css/dirty_viewport.html",
"references": [
[
"/_mozilla/css/dirty_viewport_ref.html",
"=="
]
],
"url": "/_mozilla/css/dirty_viewport.html"
}
],
"css/empty_cells_a.html": [
{
"path": "css/empty_cells_a.html",

View file

@ -0,0 +1,11 @@
<!doctype html>
<meta charset="utf-8">
<title>Test elements subject to viewport units are restyled correctly</title>
<link rel="match" href="dirty_viewport_ref.html">
<iframe seamless src="dirty_viewport_inner.html" width="500" height="500"></iframe>
<script>
window.onload = function() {
var iframe = document.querySelector('iframe');
iframe.width = iframe.height = 100;
}
</script>

View file

@ -0,0 +1,11 @@
<!doctype html>
<title>Dirty viewport test (inner)</title>
<style>
div {
background: green;
width: 50vw;
height: 50vh;
}
html, body { margin: 0; padding: 0; }
</style>
<div></div>

View file

@ -0,0 +1,9 @@
<!doctype html>
<style>
div {
background: green;
width: 50px;
height: 50px;
}
</style>
<div></div>