3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
4 <style type=
"text/css">
8 font-family: "Lohit Telugu";
12 var ITERATIONS
= 10000;
14 if (window
.testRunner
)
15 testRunner
.waitUntilDone();
17 function mouseSelection() {
18 var body
= document
.body
;
24 if (window
.eventSender
) {
25 eventSender
.mouseMoveTo(xStart
, yStart
);
26 eventSender
.mouseDown();
27 for(i
=0;i
<ITERATIONS
;i
++) {
28 randomCoord
= randomCoordinate();
29 eventSender
.mouseMoveTo(randomCoord
.x
, randomCoord
.y
);
32 if (window
.testRunnder
)
33 testRunner
.notifyDone();
36 function randomCoordinate(axis
) {
37 return { x
: Math
.floor(Math
.random()*window
.innerWidth
),
38 y
: Math
.floor(Math
.random()* window
.innerHeight
) }
43 <body onload=
"mouseSelection()"><p>
44 This test fuzzes HarfBuzzShaper::offsetForPosition to trigger an assertion in the downstream function characterIndexForXPosition().
45 See https://bugs.webkit.org/show_bug.cgi?id=
92376 - reason of the assertion being hit is a minuscule floating point inaccuracy
46 between an if condition that gates the call to characterIndexForXPosition and the actual argument that's then given to the function.
47 This test works on WebKit EFL, with the Ubuntu Telugu Lohit font installed to the EFL jhbuild font directory, like:
</p>
48 <pre>$ cp /usr/share/fonts/truetype/ttf-telugu-fonts/lohit_te.ttf WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-
0.0.3</pre>
50 <pre>$ WebKitBuild/Debug/bin/DumpRenderTree ManualTests/harfbuzz-mouse-selection-crash.html
</pre>
51 <p>Before the change, this would crash
10/
10 times. Test passes if it does not crash.
</p>
52 <p id=
"telugu">చేనేత కార్మికుల సమస్యలను ప్రభుత్వం దృష్టికి తీసుకువెళ్లేందుకు సిరిసిల్లలో వైఎస్ఆర్ సిపి గౌరవాధ్యక్షురాలు విజయమ్మ చేపట్టినదీక్ష విజయవంతమైంది.
</p>