style: Introduce a generic way of gathering information from the cascade, and use it for viewport units.

This commit is contained in:
Emilio Cobos Álvarez 2016-08-12 16:30:35 -07:00
parent 40c04b4c6b
commit 9e88a495c8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
12 changed files with 205 additions and 23 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>