blob: e395c712c235e393ab683d6e8e47566b0ab6ae05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<!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; overflow: auto;">
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<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>
|