Bug 1316951. The "select" events fired by HTMLInputElement code should always be trusted, since they always correspond to an actual attempt by the browser to select the text in the control. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 15 Nov 2016 00:18:32 -0500
changeset 350573 8dab325ec3f64bb090663cab992966ce5bcab7ad
parent 350572 aa7ad663977bbded0b6d64b1cbd6df88bd6d8065
child 350574 40f2ef965fde52a2fd626f8a42c74aa1cd5b254d
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1316951
milestone53.0a1
Bug 1316951. The "select" events fired by HTMLInputElement code should always be trusted, since they always correspond to an actual attempt by the browser to select the text in the control. r=smaug
dom/html/HTMLInputElement.cpp
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3749,17 +3749,17 @@ HTMLInputElement::Select()
 
 bool
 HTMLInputElement::DispatchSelectEvent(nsPresContext* aPresContext)
 {
   nsEventStatus status = nsEventStatus_eIgnore;
 
   // If already handling select event, don't dispatch a second.
   if (!mHandlingSelectEvent) {
-    WidgetEvent event(nsContentUtils::LegacyIsCallerChromeOrNativeCode(), eFormSelect);
+    WidgetEvent event(true, eFormSelect);
 
     mHandlingSelectEvent = true;
     EventDispatcher::Dispatch(static_cast<nsIContent*>(this),
                               aPresContext, &event, nullptr, &status);
     mHandlingSelectEvent = false;
   }
 
   // If the DOM event was not canceled (e.g. by a JS event handler