Change dda-20110612-6XE by [email protected] on 2011-06-12 07:04:04 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Remove unneeded (FF 3.6 only) mouse events following context menu

New Features:

Bugs Fixed: LPP-9957 (Repeatedly opening the context menu on the message grid 
will hang the browser)

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

Documentation:

Release Notes:

Overview:
    Running the test program (see mouseout.swf in LPP-9957) revealed that
    immediately after a context menu is opened, an extra mouseout event
    is issued on FF 3.6.  In fact, three extra events are issued immediately
    after MENU_SELECT:  MOUSE_MOVE, MOUSE_OUT, MOUSE_LEAVE.  The solution
    removes the MOUSE_OUT and MOUSE_LEAVE events.  The extra MOUSE_MOVE is
    considered benign because, if a handler is established at all by the
    user, it will be called many times, one less won't make a difference.

    The solution uses __inContextMenu to count down (making it act sort
    of a state machine).  It's complicated by the fact that MOUSE_OUT is
    only really handled by the sprite, and MOUSE_LEAVE is only really
    handled by the Mouse kernel, whereas the context menu has its own
    kernel.

    We presume that this will fix, or at least help the problem seen
    in jade since extra events mean extra processing.  Also 'mouseout'
    events have been seen in a couple of the captured stack traces
    that Maynard sent previously.  And 'mouseleave' events indirectly
    result in 'mouseenter' events, which are seen in two of the stack
    traces seen above.  Finally since the error is only seen with FF3.6,
    any sort of browser behaviour difference is suspect.

Details:
    LzContextMenuKernel.lzs:
      - call into the Mouse Kernel to let it know about a new context menu

    LzMouseKernel.lzs:
      - set up a listener for any context menu to set __inContextMenu
      - decrement __inContextMenu with each mouse event
      - remove MOUSE_LEAVE events if seen in the sequence described above

    LzSprite.as:
      - remove MOUSE_OUT events if seen in the sequence described above
      - set up the 'quirk' variable that identifies the errant browser.


Tests:
    - ran smokecheck dhtml/swf10
    - ran lzx program that appears in LPP-9957 on FF3.6 (windows)
      and FF3.6 (mac).  Now get correct behavior on both.

Files:
M       WEB-INF/lps/lfc/kernel/swf9/LzContextMenuKernel.lzs
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-20110612-6XE.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