Skip to content
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

Fix #8443 #8496

Merged
merged 2 commits into from Mar 30, 2016
Merged

Fix #8443 #8496

Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add @SimonSapin's test case for #8443

  • Loading branch information
notriddle committed Mar 29, 2016
commit ef571ef507feacf42431bf82837a5916a1501066
@@ -5628,6 +5628,12 @@
"url": "/_mozilla/css/float_relative_to_position.html"
}
],
"css/meta_viewport_resize.html": [
{
"path": "css/meta_viewport_resize.html",
"url": "/_mozilla/css/meta_viewport_resize.html"
}
],
"css/test_variable_legal_values.html": [
{
"path": "css/test_variable_legal_values.html",
@@ -0,0 +1,4 @@
[meta_viewport_resize.html]
type: testharness
prefs: ["layout.viewport.enabled:true"]

@@ -0,0 +1,33 @@
<!doctype html>
<meta charset=utf-8>
<title>Resizing the initial containing block dynamically with &lt;meta name="viewport">
https://github.com/servo/servo/issues/8443</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
var step2 = function() {
var iframe = document.getElementsByTagName("iframe")[0];
var body_style = iframe.contentWindow.getComputedStyle(iframe.contentDocument.body);
if (body_style.width === "500px") {
t.done();
} else {
window.requestAnimationFrame(step2);
}
};

var step1 = function() {
var iframe = document.getElementsByTagName("iframe")[0];
var body_style = iframe.contentWindow.getComputedStyle(iframe.contentDocument.body);
if (body_style.width === "400px") {
iframe.width = 500;
window.requestAnimationFrame(step2);
} else {
window.requestAnimationFrame(step1);
}
};

window.run = step1;
}, "<body> inside <iframe> has the <iframe>’s width");
</script>
<iframe src="meta_viewport_resize_iframe.html" onload="run()" width=400></iframe>
@@ -0,0 +1,4 @@
<meta name="viewport" content="initial-scale=1.0">
<body style="margin: 0">
Test

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.