blob: 216b1f120cb28f95173cd4a5cecfa66fab81476e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=800">
<style>
html { font-size: 16px; }
body { width: 800px; margin: 0; overflow-y: hidden; }
</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="position: absolute">
This text should not be autosized (its computed font size should remain 16px), since the position:absolute causes this to be a new cluster, and this cluster doesn't contain enough text.
</div>
<div style="margin-top: 3em; float: left">
This text should not be autosized (its computed font size should remain 16px), since the float:left causes this to be a new cluster, and this cluster doesn't contain enough text.
</div>
<table>
<tr>
<td style="width: 50%">
This shouldn't be autosized: table cell =&gt; new cluster, and it doesn't contain enough text.
</td>
<td style="width: 50%">
However this text should be autosized to 20px computed font size, since this table cell does contain enough text.<br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</td>
</tr>
</table>
<div style="-webkit-writing-mode: vertical-rl">
This text should not be autosized (its computed font size should remain 16px), since the perpendicular writing-mode compared to its containing block causes this to be a new cluster, and this cluster doesn't contain enough text (or have large enough logicalWidth).
</div>
<div>
This text is here to make sure the root cluster has enough text and hence gets autosized, so when the divs above don't get autosized it's because they formed a new cluster.<br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</body>
</html>