Bug 1194733 - Don't honor DefaultPrevented for mouseup events in list control frames. r=enndeakin, a=sledru
authorMats Palmgren <mats@mozilla.com>
Thu, 20 Aug 2015 18:45:17 +0200
changeset 288853 f973a86d54b17c2b11aced5489542fa0c20c0511
parent 288852 f42fa2b6cc429a235ad8cffe905f9cdf06273f59
child 288854 197a0c3b8d8e2a22fdfbcf1ace0e12f86bc5d51b
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin, sledru
bugs1194733
milestone42.0a2
Bug 1194733 - Don't honor DefaultPrevented for mouseup events in list control frames. r=enndeakin, a=sledru
layout/forms/nsListControlFrame.cpp
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -2456,21 +2456,18 @@ nsListEventListener::HandleEvent(nsIDOME
     bool defaultPrevented = false;
     aEvent->GetDefaultPrevented(&defaultPrevented);
     if (defaultPrevented) {
       return NS_OK;
     }
     return mFrame->nsListControlFrame::MouseDown(aEvent);
   }
   if (eventType.EqualsLiteral("mouseup")) {
-    bool defaultPrevented = false;
-    aEvent->GetDefaultPrevented(&defaultPrevented);
-    if (defaultPrevented) {
-      return NS_OK;
-    }
+    // Don't try to honor defaultPrevented here - it's not web compatible.
+    // (bug 1194733)
     return mFrame->nsListControlFrame::MouseUp(aEvent);
   }
   if (eventType.EqualsLiteral("mousemove")) {
     // I don't think we want to honor defaultPrevented on mousemove
     // in general, and it would only prevent highlighting here.
     return mFrame->nsListControlFrame::MouseMove(aEvent);
   }