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 322558 8dab325ec3f64bb090663cab992966ce5bcab7ad
parent 322557 aa7ad663977bbded0b6d64b1cbd6df88bd6d8065
child 322559 40f2ef965fde52a2fd626f8a42c74aa1cd5b254d
push id30952
push usercbook@mozilla.com
push dateTue, 15 Nov 2016 11:27:04 +0000
treeherdermozilla-central@e16d1a881481 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1316951
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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