mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 455871 - [mac] Regression: drag & drop is not working at all after some-time of browser usage; fix, v2 + colorpicker test update; r+sr=roc
This commit is contained in:
parent
19179e88b6
commit
7f2567b670
@ -24,6 +24,10 @@ var gCp = null;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function preventDefault(event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function runTests()
|
||||
{
|
||||
gCp = document.getElementById("colorpicker-popup");
|
||||
@ -31,6 +35,8 @@ function runTests()
|
||||
is(gCp.tabIndex, 1, "button tabindex is initialized");
|
||||
is(gCp.disabled, false, "button is not disabled");
|
||||
|
||||
document.addEventListener("keypress", preventDefault, false);
|
||||
|
||||
goNext();
|
||||
}
|
||||
|
||||
@ -97,6 +103,7 @@ function goNext()
|
||||
{
|
||||
gTestPhase++;
|
||||
if (gTestPhase >= phases.length) {
|
||||
document.removeEventListener("keypress", preventDefault, false);
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
@ -1284,7 +1284,9 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
||||
if ((aEvent->message == NS_MOUSE_MOVE &&
|
||||
static_cast<nsMouseEvent*>(aEvent)->reason ==
|
||||
nsMouseEvent::eReal) ||
|
||||
aEvent->message == NS_MOUSE_ENTER) {
|
||||
aEvent->message == NS_MOUSE_ENTER ||
|
||||
aEvent->message == NS_MOUSE_BUTTON_DOWN ||
|
||||
aEvent->message == NS_MOUSE_BUTTON_UP) {
|
||||
// aEvent->point is relative to the widget, i.e. the view top-left,
|
||||
// so we need to add the offset to the view origin
|
||||
nsPoint rootOffset = baseView->GetDimensions().TopLeft();
|
||||
|
@ -312,6 +312,9 @@ nsDragService::InvokeDragSession(nsIDOMNode* aDOMNode, nsISupportsArray* aTransf
|
||||
source:mNativeDragView
|
||||
slideBack:YES];
|
||||
|
||||
if (mDoingDrag)
|
||||
nsBaseDragService::EndDragSession(PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
Loading…
Reference in New Issue
Block a user