blob: 190cce44caefc052a529de4771f61982f6f01e90 [file] [log] [blame]
<!DOCTYPE html>
<html style="font-size: 16px">
<head>
<meta name="viewport" content="width=800">
<style>
body {
width: 800px;
margin: 0;
overflow-y: hidden;
}
.largersize{font-size: 1.1em}
</style>
<script>
if (window.internals) {
window.internals.settings.setTextAutosizingEnabled(true);
window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
} else if (window.console && console.warn) {
console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
}
</script>
</head>
<body>
<div style="top:50px;position:absolute;">
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br/>
This paragraph should be autosized to 19.8px<br/>
because it contains line breaks.<br/>
This test is intended to check<br/>
that there are no oscillations due to javascript<br/>
briefly increasing the font size of a<br/>
small paragraph below.
</div>
<div id="sizechanging">
This text changes size using javascript below.
</div>
<script>
element = document.getElementById("sizechanging");
if (element.offsetHeight) {
// force layout (computation of offsetHeight triggers reflow)
}
element.className = 'largersize';
if (element.offsetHeight) {}
element.className = '';
if (element.offsetHeight) {}
</script>
<noscript>fail (no support for javascript)</noscript>
</body>
</html>