blob: 5a0d4c2138dbe393183bd8fa148951ed1879432a [file] [log] [blame]
<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
<!-- This test depends on subpixel quantization being disabled, which is the case when threaded scrolling is disabled. -->
<!-- Please note that the expected file also has threaded scrolling turned off. -->
<!DOCTYPE html>
<html>
<head>
<style>
/* Use a fake font family for all of the text that we draw.
The setTextSubpixelPositioning() call changes a global text style
setting. It gets reset after we're dumped, but if we run first, our
style would be cached and would affect other tests, and if we run after
another test, we'd use its cached style and subpixel positioning won't be
enabled. */
body {
font-family: SubpixelPositioning;
}
div {
font-family: SubpixelPositioningAhem;
overflow: hidden; /* the only difference between the test the the ref html */
border: solid thin blue;
}
</style>
<script>
if (window.testRunner && window.testRunner.setTextSubpixelPositioning)
window.testRunner.setTextSubpixelPositioning(true);
if (window.internals)
window.internals.setPageScaleFactor(1.7, 0, 0);
</script>
</head>
<body>
Tests if the bottom of the text is truncated when the page is scaled by a fractional factor.
If success, the text in the "overflow: hidden" div (the test case) should be displayed
the same as in a normal div (the ref html).
'p' is the character in ahem font with only the descent part.
<br><br>
<div style="font-size: 13px">&nbsp;pppp&nbsp;</div>
<div style="font-size: 14px">&nbsp;pppp&nbsp;</div>
<div style="font-size: 15px">&nbsp;pppp&nbsp;</div>
<div style="font-size: 16px">&nbsp;pppp&nbsp;</div>
<div style="font-size: 17px">&nbsp;pppp&nbsp;</div>
<div style="font-size: 18px">&nbsp;pppp&nbsp;</div>
</body>
</html>