Changeset 83306 in webkit


Ignore:
Timestamp:
Apr 8, 2011 9:59:54 AM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-07 Anders Carlsson <andersca@apple.com>

Reviewed by Simon Fraser.

Clicks not recognized on http://www.nibblestutorials.net/ which uses Silverlight
https://bugs.webkit.org/show_bug.cgi?id=58108
<rdar://problem/9167611>

Change platformHandleMouseEvent to return true, which means that the plug-in has handled the
event. Some plug-ins (like Silverlight) will return false from NPP_HandleEvent even though the
event has been handled. In this case it lead to a very subtle bug where the plug-in element would
lose focus right after a mouse down even had been sent.

  • WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleMouseEvent):
Location:
trunk/Source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/page/EventHandler.cpp

    r83298 r83306  
    21762176    }
    21772177
     2178    printf("node: %s\n", targetNode(mev)->nodeName().utf8().data());
    21782179    swallowEvent = dispatchMouseEvent(eventNames().contextmenuEvent, targetNode(mev), true, 0, event, false);
    21792180   
  • trunk/Source/WebKit2/ChangeLog

    r83300 r83306  
     12011-04-07  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Clicks not recognized on http://www.nibblestutorials.net/ which uses Silverlight
     6        https://bugs.webkit.org/show_bug.cgi?id=58108
     7        <rdar://problem/9167611>
     8
     9        Change platformHandleMouseEvent to return true, which means that the plug-in has handled the
     10        event. Some plug-ins (like Silverlight) will return false from NPP_HandleEvent even though the
     11        event has been handled. In this case it lead to a very subtle bug where the plug-in element would
     12        lose focus right after a mouse down even had been sent.
     13
     14        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
     15        (WebKit::NetscapePlugin::platformHandleMouseEvent):
     16
    1172011-04-07  Adam Roben  <aroben@apple.com>
    218
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm

    r82997 r83306  
    509509            RefPtr<NetscapePlugin> protect(this);
    510510
    511             bool returnValue = NPP_HandleEvent(&event);
     511            NPP_HandleEvent(&event);
    512512
    513513            m_currentMouseEvent = previousMouseEvent;
    514514
    515             return returnValue;
     515            // Some plug-ins return false even if the mouse event has been handled.
     516            // This leads to bugs such as <rdar://problem/9167611>. Work around this
     517            // by always returning true.
     518            return true;
    516519        }
    517520
     
    541544            event.where.v = mouseEvent.globalPosition().y();
    542545
    543             return NPP_HandleEvent(&event);
     546            NPP_HandleEvent(&event);
     547
     548            // Some plug-ins return false even if the mouse event has been handled.
     549            // This leads to bugs such as <rdar://problem/9167611>. Work around this
     550            // by always returning true.
     551            return true;
    544552        }
    545553#endif
Note: See TracChangeset for help on using the changeset viewer.