Change dda-20110620-3lu by [email protected] on 2011-06-20 14:21:12 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Remove events related to context menu

New Features:

Bugs Fixed: LPP-9967, LPP-9957

Technical Reviewer: philip (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
    This addresses two issues, one related to LPP-9957:
    the extra MOUSE_MOVE event generated immediately after MENU_SELECT
    is now eliminated.

    And for LPP-9967, we now know that on FF3.6/Windows,
    when a right click is done, there are two additional events
    that occur *before* the MENU_SELECT event:
       MOUSE_MOVE
       MOUSE_OVER
    Because they occur before the MENU_SELECT, there's no way to distinguish
    these events from any other MOUSE_MOVE or MOUSE_OVER that might normally
    occur.  However, as indicated in Jira, occasionally these events have
    bogus coordinates (usually stageY is about 150 pixels too big, sometimes
    stageX is increased).  We try to detect these errant events (in the
    narrowest way possible, to avoid eliminating good events).  As MOUSE_MOVE
    or MOUSE_OVER occur, their X/Y values are saved (last two pairs are saved),
    so if a sequence of MOUSE_MOVE/MOUSE_OVER occurs with a X/Y that is 'far'
    from the last one, it is silently dropped.  The MOUSE_LEAVE that occurs
    as a part of the overall sequence resets the saved X/Y values.

    It's not pretty, but it works.  Frankly, I can't see a better solution,
    except to require users to upgrade to newer FF.

    Unknown whether this will have any affect on browser hangs seen by
    Maynard.  I have not seen such hangs in my VM, so I can't tell.

Details:
  WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
    - change name of quirk to 'ignoreextramenuevents' to be more descriptive
      of the current situation.
    - narrow the quirk to only apply to FF3.6 on Windows (instead of all FF3.6)
    - remove any events that occur between MENU_SELECT and MOUSE_LEAVE
    - call LzMouseKernel.ignoreMouseEvent to track/make decisions about
      events with bogus coordinate.

    WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
    - more internal doc to describe the messy bug and solution
    - change name of quirk to 'ignoreextramenuevents' to be more descriptive
      of the current situation.
    - use __{prev,last}Stage{X,Y} variables to track coordinates
      (since JS has no typed arrays, and we want speed here)
    - ignoreMouseEvent tracks the previous two sets of coordinates,
      and determines if the current event can be removed.
    - use ignoreMouseEvents to remove events with bogus coordinates
      when they happen.

Tests:

Files:
M       WEB-INF/lps/lfc/kernel/swf9/LzMouseKernel.as
M       WEB-INF/lps/lfc/kernel/swf9/LzSprite.as

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/dda-20110620-3lu.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-306-2057
email: [email protected]
www: http://www.ddanderson.com
blog: http://libdb.wordpress.com





Reply via email to