| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 /* Use a fake font family for all of the text that we draw. | 5 /* Use a fake font family for all of the text that we draw. |
| 6 The setTextSubpixelPositioning() call changes a global text style | 6 The setTextSubpixelPositioning() call changes a global text style |
| 7 setting. It gets reset after we're dumped, but if we run first, our | 7 setting. It gets reset after we're dumped, but if we run first, our |
| 8 style would be cached and would affect other tests, and if we run after | 8 style would be cached and would affect other tests, and if we run after |
| 9 another test, we'd use its cached style and subpixel positioning won't be | 9 another test, we'd use its cached style and subpixel positioning won't be |
| 10 enabled. */ | 10 enabled. */ |
| 11 body { | 11 body { |
| 12 font-family: SubpixelPositioning; | 12 font-family: SubpixelPositioning; |
| 13 } | 13 } |
| 14 div { | 14 div { |
| 15 font-family: SubpixelPositioningAhem; | 15 font-family: SubpixelPositioningAhem; |
| 16 overflow: hidden; /* the only difference between the test the the ref ht
ml */ | 16 overflow: hidden; /* the only difference between the test the the ref ht
ml */ |
| 17 border: solid thin blue; | 17 border: solid thin blue; |
| 18 } | 18 } |
| 19 </style> | 19 </style> |
| 20 <script> | 20 <script> |
| 21 if (window.testRunner && window.testRunner.setTextSubpixelPositioning) | 21 if (window.testRunner && window.testRunner.setTextSubpixelPositioning) |
| 22 window.testRunner.setTextSubpixelPositioning(true); | 22 window.testRunner.setTextSubpixelPositioning(true); |
| 23 if (window.internals) | 23 if (window.eventSender) |
| 24 window.internals.setPageScaleFactor(1.7, 0, 0); | 24 window.eventSender.setPageScaleFactor(1.7, 0, 0); |
| 25 </script> | 25 </script> |
| 26 </head> | 26 </head> |
| 27 <body> | 27 <body> |
| 28 Tests if the bottom of the text is truncated when the page is scaled by a fr
actional factor. | 28 Tests if the bottom of the text is truncated when the page is scaled by a fr
actional factor. |
| 29 If success, the text in the "overflow: hidden" div (the test case) should be
displayed | 29 If success, the text in the "overflow: hidden" div (the test case) should be
displayed |
| 30 the same as in a normal div (the ref html). | 30 the same as in a normal div (the ref html). |
| 31 'p' is the character in ahem font with only the descent part. | 31 'p' is the character in ahem font with only the descent part. |
| 32 <br><br> | 32 <br><br> |
| 33 <div style="font-size: 13px"> pppp </div> | 33 <div style="font-size: 13px"> pppp </div> |
| 34 <div style="font-size: 14px"> pppp </div> | 34 <div style="font-size: 14px"> pppp </div> |
| 35 <div style="font-size: 15px"> pppp </div> | 35 <div style="font-size: 15px"> pppp </div> |
| 36 <div style="font-size: 16px"> pppp </div> | 36 <div style="font-size: 16px"> pppp </div> |
| 37 <div style="font-size: 17px"> pppp </div> | 37 <div style="font-size: 17px"> pppp </div> |
| 38 <div style="font-size: 18px"> pppp </div> | 38 <div style="font-size: 18px"> pppp </div> |
| 39 </body> | 39 </body> |
| 40 </html> | 40 </html> |
| OLD | NEW |