Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 408701
Collapse All | Expand All

(-)js/rwt/event/MouseEvent.js (-5 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright: 2004, 2012 1&1 Internet AG, Germany, http://www.1und1.de,
2
 *  Copyright: 2004, 2013 1&1 Internet AG, Germany, http://www.1und1.de,
3
 *                        and EclipseSource
3
 *                        and EclipseSource
4
 *
4
 *
5
 * This program and the accompanying materials are made available under the
5
 * This program and the accompanying materials are made available under the
Lines 224-234 Link Here
224
    getPageX : rwt.util.Variant.select("qx.client",
224
    getPageX : rwt.util.Variant.select("qx.client",
225
    {
225
    {
226
      "mshtml" : function() {
226
      "mshtml" : function() {
227
        return this.getDomEvent().clientX + rwt.html.Viewport.getScrollLeft(window);
227
        return Math.round( this.getDomEvent().clientX + rwt.html.Viewport.getScrollLeft( window ) );
228
      },
228
      },
229
229
230
      "default" : function() {
230
      "default" : function() {
231
        return this.getDomEvent().pageX;
231
        return Math.round( this.getDomEvent().pageX );
232
      }
232
      }
233
    }),
233
    }),
234
234
Lines 242-252 Link Here
242
    getPageY : rwt.util.Variant.select("qx.client",
242
    getPageY : rwt.util.Variant.select("qx.client",
243
    {
243
    {
244
      "mshtml" : function() {
244
      "mshtml" : function() {
245
        return this.getDomEvent().clientY + rwt.html.Viewport.getScrollTop(window);
245
        return Math.round( this.getDomEvent().clientY + rwt.html.Viewport.getScrollTop( window ) );
246
      },
246
      },
247
247
248
      "default" : function() {
248
      "default" : function() {
249
        return this.getDomEvent().pageY;
249
        return Math.round( this.getDomEvent().pageY );
250
      }
250
      }
251
    }),
251
    }),
252
252
(-)js/org/eclipse/rwt/test/tests/ShellProtocolIntegrationTest.js (-1 / +22 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2011, 2012 EclipseSource and others.
2
 * Copyright (c) 2011, 2013 EclipseSource and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 611-616 Link Here
611
      this._disposeShell();
611
      this._disposeShell();
612
    },
612
    },
613
613
614
    testNotifyMouseDown_FloatPointValues : function() {
615
      rwt.remote.EventUtil.setSuspended( true );
616
      var shell = this._protocolCreateShell();
617
      this._protocolListen( { "MouseDown" : true } );
618
      this._protocolSet( { "visibility" : true } );
619
      TestUtil.flush();
620
      rwt.remote.EventUtil.setSuspended( false );
621
622
      TestUtil.click( shell, 10.4, 20.3 );
623
624
      var message = TestUtil.getMessageObject();
625
      assertEquals( 1, message.findNotifyProperty( "w3", "MouseDown", "button" ) );
626
      assertEquals( 10, message.findNotifyProperty( "w3", "MouseDown", "x" ) );
627
      assertEquals( 20, message.findNotifyProperty( "w3", "MouseDown", "y" ) );
628
      assertNotNull( message.findNotifyProperty( "w3", "MouseDown", "time" ) );
629
      assertFalse( message.findNotifyProperty( "w3", "MouseDown", "shiftKey" ) );
630
      assertFalse( message.findNotifyProperty( "w3", "MouseDown", "ctrlKey" ) );
631
      assertFalse( message.findNotifyProperty( "w3", "MouseDown", "altKey" ) );
632
      this._disposeShell();
633
    },
634
614
    testNotifyMouseUp : function() {
635
    testNotifyMouseUp : function() {
615
      rwt.remote.EventUtil.setSuspended( true );
636
      rwt.remote.EventUtil.setSuspended( true );
616
      var shell = this._protocolCreateShell();
637
      var shell = this._protocolCreateShell();

Return to bug 408701