Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Backout Bug 1279771 due to linux test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mystor committed Jul 5, 2016
1 parent 2786ff1 commit 08ccd28
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 115 deletions.
14 changes: 0 additions & 14 deletions dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3996,20 +3996,6 @@ nsDOMWindowUtils::RespectDisplayPortSuppression(bool aEnabled)
return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::StartHandlingUserInput()
{
EventStateManager::StartHandlingUserInput();
return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::StopHandlingUserInput()
{
EventStateManager::StopHandlingUserInput();
return NS_OK;
}

NS_INTERFACE_MAP_BEGIN(nsTranslationNodeList)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_ENTRY(nsITranslationNodeList)
Expand Down
13 changes: 0 additions & 13 deletions dom/interfaces/base/nsIDOMWindowUtils.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1916,19 +1916,6 @@ interface nsIDOMWindowUtils : nsISupports {
* was last provided is what will be used.
*/
void respectDisplayPortSuppression(in boolean aEnabled);

/**
* Start treating code as running within a user-initiated event callback. Must
* be matched by a call to stopHandlingUserInput.
*/
void startHandlingUserInput();

/**
* Stop treating code as running within a user-initiated event callback. Must
* be matched by a call to startHandlingUserInput.
*/
void stopHandlingUserInput();

};

[scriptable, uuid(c694e359-7227-4392-a138-33c0cc1f15a6)]
Expand Down
15 changes: 0 additions & 15 deletions dom/tests/mochitest/general/file_bug1279771_chromeScript.js

This file was deleted.

2 changes: 0 additions & 2 deletions dom/tests/mochitest/general/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,3 @@ skip-if = buildapp == 'b2g' || buildapp == 'mulet' || toolkit == 'android' # Mou
[test_WebKitCSSMatrix.html]
[test_resource_timing_frameset.html]
[test_bug1208217.html]
[test_bug1279771.html]
support-files = file_bug1279771_chromeScript.js
43 changes: 0 additions & 43 deletions dom/tests/mochitest/general/test_bug1279771.html

This file was deleted.

49 changes: 21 additions & 28 deletions toolkit/modules/SelectContentHelper.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -114,36 +114,29 @@ this.SelectContentHelper.prototype = {
case "Forms:DismissedDropDown":
if (this.initialSelection != this.element.item(this.element.selectedIndex)) {
let win = this.element.ownerDocument.defaultView;
let dwu = win.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
dwu.startHandlingUserInput();
try {
let inputEvent = new win.UIEvent("input", {
let inputEvent = new win.UIEvent("input", {
bubbles: true,
});
this.element.dispatchEvent(inputEvent);

let changeEvent = new win.Event("change", {
bubbles: true,
});
this.element.dispatchEvent(changeEvent);

// Going for mostly-Blink parity here, which (at least on Windows)
// fires a mouseup and click event after each selection -
// even by keyboard. We're firing a mousedown too, since that
// seems to make more sense. Unfortunately, the spec on form
// control behaviours for these events is really not clear.
const MOUSE_EVENTS = ["mousedown", "mouseup", "click"];
for (let eventName of MOUSE_EVENTS) {
let mouseEvent = new win.MouseEvent(eventName, {
view: win,
bubbles: true,
cancelable: true,
});
this.element.dispatchEvent(inputEvent);

let changeEvent = new win.Event("change", {
bubbles: true,
});
this.element.dispatchEvent(changeEvent);

// Going for mostly-Blink parity here, which (at least on Windows)
// fires a mouseup and click event after each selection -
// even by keyboard. We're firing a mousedown too, since that
// seems to make more sense. Unfortunately, the spec on form
// control behaviours for these events is really not clear.
const MOUSE_EVENTS = ["mousedown", "mouseup", "click"];
for (let eventName of MOUSE_EVENTS) {
let mouseEvent = new win.MouseEvent(eventName, {
view: win,
bubbles: true,
cancelable: true,
});
this.element.dispatchEvent(mouseEvent);
}
} finally {
dwu.stopHandlingUserInput();
this.element.dispatchEvent(mouseEvent);
}
}

Expand Down

0 comments on commit 08ccd28

Please sign in to comment.