@@ -482,7 +482,8 @@ class HTML5Window
482482 private function handleCutOrCopyEvent (event : ClipboardEvent ): Void
483483 {
484484 var text = Clipboard .text ;
485- if (text == null ) {
485+ if (text == null )
486+ {
486487 text = " " ;
487488 }
488489 event .clipboardData .setData (" text/plain" , text );
@@ -705,7 +706,6 @@ class HTML5Window
705706 }
706707
707708 case " mouseup" :
708-
709709 // see comment below for mousemove for an explanation of
710710 // what the __stopMousePropagation flag is used for.
711711 if (__stopMousePropagation && event .currentTarget != parent .element )
@@ -729,7 +729,6 @@ class HTML5Window
729729 }
730730
731731 case " mousemove" :
732-
733732 // this same listener is added to the parent element and to
734733 // the browser window for both the mousemove and the mouseup
735734 // event types, if mousedown happens first. this allows both
@@ -866,7 +865,11 @@ class HTML5Window
866865 }
867866 }
868867
869- var touch , x , y , cacheX , cacheY ;
868+ var touch : Touch ;
869+ var x : Float ;
870+ var y : Float ;
871+ var cacheX : Float ;
872+ var cacheY : Float ;
870873
871874 for (data in event .changedTouches )
872875 {
@@ -1300,7 +1303,6 @@ class HTML5Window
13001303 textInput .removeEventListener (' paste' , handlePasteEvent , true );
13011304 textInput .removeEventListener (' compositionstart' , handleCompositionstartEvent , true );
13021305 textInput .removeEventListener (' compositionend' , handleCompositionendEvent , true );
1303-
13041306 }
13051307 }
13061308
@@ -1344,7 +1346,8 @@ class HTML5Window
13441346 {
13451347 if (! parent .__resizable ) return ;
13461348
1347- var elementWidth , elementHeight ;
1349+ var elementWidth : Float ;
1350+ var elementHeight : Float ;
13481351
13491352 if (parent .element != null )
13501353 {
@@ -1370,8 +1373,8 @@ class HTML5Window
13701373 {
13711374 if (parent .__width != elementWidth || parent .__height != elementHeight )
13721375 {
1373- parent .__width = elementWidth ;
1374- parent .__height = elementHeight ;
1376+ parent .__width = Std . int ( elementWidth ) ;
1377+ parent .__height = Std . int ( elementHeight ) ;
13751378
13761379 if (canvas != null )
13771380 {
@@ -1390,7 +1393,7 @@ class HTML5Window
13901393 div .style .height = elementHeight + " px" ;
13911394 }
13921395
1393- parent .onResize .dispatch (elementWidth , elementHeight );
1396+ parent .onResize .dispatch (Std . int ( elementWidth ), Std . int ( elementHeight ) );
13941397 }
13951398 }
13961399 else
0 commit comments