mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 895274 part.25 Rename NS_MOUSE_MOVE to eMouseMove r=smaug (fd637481f2) - Bug 895274 part.26 Rename NS_MOUSE_BUTTON_UP to eMouseUp r=smaug (01314a434b) - Bug 895274 part.27 Rename NS_MOUSE_BUTTON_DOWN to eMouseDown r=smaug (b4839f190c) - Bug 895274 part.28 Rename NS_MOUSE_ENTER_WIDGET to eMouseEnterIntoWidget r=smaug (148807ec51) - Bug 895274 part.29 Rename NS_MOUSE_EXIT_WIDGET to eMouseExitFromWidget r=smaug (249a5db8de) - Bug 1157195, null check for widget before generating drag events, r=masayuki (ca08721f76) - Bug 1156964, consume tab key also in e10s, r=felipe (4f169cb329) - Bug 1158633, if EventStateManager::mGestureDownContent is non-null, so should mGestureDownFrameOwner be, r=enndeakin (8975a44344) - Bug 895274 part.30 Rename NS_MOUSE_DOUBLECLICK to eMouseDoubleClick r=smaug (fe39991215) - style (5b3468be0c) - Bug 895274 part.31 Rename NS_MOUSE_CLICK to eMouseClick r=smaug (c442dc8a76) - Bug 895274 part.32 Rename NS_MOUSE_ACTIVATE to eMouseActivate r=smaug (46e3e0712a) - Bug 895274 part.33 Rename NS_MOUSE_OVER to eMouseOver r=smaug (fd9f4ad861) - Bug 895274 part.33 Rename NS_MOUSE_OVER to eMouseOver r=smaug (2631639696) - missing parts of Bug 1173725 - part 1: force top border to be visible on windows 10 (2533fe48c3) - Bug 1184942 - Use DPI scaling factor to ensure top window border is correct thickness. r=jimm (e0ffd4538a) - Bug 1163113 - Implement -moz-window-dragging on Windows for Graphene r=jimm (d4c02f04dd) - Bug 895274 part.35 Rename NS_MOUSE_MOZHITTEST to eMouseHitTest r=smaug (aea1520561) - reinstatiate full WebRTC configure options (7519d9431a) - Bug 1106958 - Use android.media.MediaCodec for decoding in WebRTC stack. r=snorp, r=gcp, r=ted (0a9f2ca886) - ... and add back missing file critical_section_win.cc in webrtc
This commit is contained in:
+24
-25
@@ -468,8 +468,8 @@ public:
|
||||
virtual void HandleEvent(EventChainPostVisitor& aVisitor) override
|
||||
{
|
||||
if (aVisitor.mPresContext && aVisitor.mEvent->mClass != eBasicEventClass) {
|
||||
if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
|
||||
aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP) {
|
||||
if (aVisitor.mEvent->mMessage == eMouseDown ||
|
||||
aVisitor.mEvent->mMessage == eMouseUp) {
|
||||
// Mouse-up and mouse-down events call nsFrame::HandlePress/Release
|
||||
// which call GetContentOffsetsFromPoint which requires up-to-date layout.
|
||||
// Bring layout up-to-date now so that GetCurrentEventFrame() below
|
||||
@@ -493,7 +493,7 @@ public:
|
||||
}
|
||||
nsIFrame* frame = mPresShell->GetCurrentEventFrame();
|
||||
if (!frame &&
|
||||
(aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP ||
|
||||
(aVisitor.mEvent->mMessage == eMouseUp ||
|
||||
aVisitor.mEvent->mMessage == NS_TOUCH_END)) {
|
||||
// Redirect BUTTON_UP and TOUCH_END events to the root frame to ensure
|
||||
// that capturing is released.
|
||||
@@ -5572,7 +5572,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
|
||||
refpoint += view->ViewToWidgetOffset();
|
||||
}
|
||||
NS_ASSERTION(view->GetWidget(), "view should have a widget here");
|
||||
WidgetMouseEvent event(true, NS_MOUSE_MOVE, view->GetWidget(),
|
||||
WidgetMouseEvent event(true, eMouseMove, view->GetWidget(),
|
||||
WidgetMouseEvent::eSynthesized);
|
||||
event.refPoint = LayoutDeviceIntPoint::FromAppUnitsToNearest(refpoint, viewAPD);
|
||||
event.time = PR_IntervalNow();
|
||||
@@ -6331,7 +6331,7 @@ void
|
||||
PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
|
||||
{
|
||||
switch (aEvent->mMessage) {
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case eMouseEnterIntoWidget:
|
||||
// In this case we have to know information about available mouse pointers
|
||||
if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
|
||||
gActivePointersIds->Put(mouseEvent->pointerId,
|
||||
@@ -6356,7 +6356,7 @@ PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
case eMouseExitFromWidget:
|
||||
// In this case we have to remove information about disappeared mouse pointers
|
||||
if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
|
||||
gActivePointersIds->Remove(mouseEvent->pointerId);
|
||||
@@ -6552,11 +6552,11 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((aEvent->mMessage == NS_MOUSE_MOVE &&
|
||||
if ((aEvent->mMessage == eMouseMove &&
|
||||
aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
|
||||
aEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
|
||||
aEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
|
||||
aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
|
||||
aEvent->mMessage == eMouseEnterIntoWidget ||
|
||||
aEvent->mMessage == eMouseDown ||
|
||||
aEvent->mMessage == eMouseUp) {
|
||||
nsIFrame* rootFrame = GetRootFrame();
|
||||
if (!rootFrame) {
|
||||
nsView* rootView = mViewManager->GetRootView();
|
||||
@@ -6567,17 +6567,17 @@ PresShell::RecordMouseLocation(WidgetGUIEvent* aEvent)
|
||||
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
|
||||
}
|
||||
#ifdef DEBUG_MOUSE_LOCATION
|
||||
if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
|
||||
if (aEvent->mMessage == eMouseEnterIntoWidget) {
|
||||
printf("[ps=%p]got mouse enter for %p\n",
|
||||
this, aEvent->widget);
|
||||
}
|
||||
printf("[ps=%p]setting mouse location to (%d,%d)\n",
|
||||
this, mMouseLocation.x, mMouseLocation.y);
|
||||
#endif
|
||||
if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
|
||||
if (aEvent->mMessage == eMouseEnterIntoWidget) {
|
||||
SynthesizeMouseMove(false);
|
||||
}
|
||||
} else if (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
|
||||
} else if (aEvent->mMessage == eMouseExitFromWidget) {
|
||||
// Although we only care about the mouse moving into an area for which this
|
||||
// pres shell doesn't receive mouse move events, we don't check which widget
|
||||
// the mouse exit was for since this seems to vary by platform. Hopefully
|
||||
@@ -6655,16 +6655,16 @@ DispatchPointerFromMouseOrTouch(PresShell* aShell,
|
||||
}
|
||||
int16_t button = mouseEvent->button;
|
||||
switch (mouseEvent->mMessage) {
|
||||
case NS_MOUSE_MOVE:
|
||||
case eMouseMove:
|
||||
if (mouseEvent->buttons == 0) {
|
||||
button = -1;
|
||||
}
|
||||
pointerMessage = NS_POINTER_MOVE;
|
||||
break;
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case eMouseUp:
|
||||
pointerMessage = NS_POINTER_UP;
|
||||
break;
|
||||
case NS_MOUSE_BUTTON_DOWN:
|
||||
case eMouseDown:
|
||||
pointerMessage = NS_POINTER_DOWN;
|
||||
break;
|
||||
default:
|
||||
@@ -7295,7 +7295,7 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
|
||||
bool isWindowLevelMouseExit = (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) &&
|
||||
bool isWindowLevelMouseExit = (aEvent->mMessage == eMouseExitFromWidget) &&
|
||||
(mouseEvent && mouseEvent->exit == WidgetMouseEvent::eTopLevel);
|
||||
|
||||
// Get the frame at the event point. However, don't do this if we're
|
||||
@@ -7456,10 +7456,9 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
// a document which needs events suppressed
|
||||
if (aEvent->mClass == eMouseEventClass &&
|
||||
frame->PresContext()->Document()->EventHandlingSuppressed()) {
|
||||
if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
|
||||
if (aEvent->mMessage == eMouseDown) {
|
||||
mNoDelayedMouseEvents = true;
|
||||
} else if (!mNoDelayedMouseEvents &&
|
||||
aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
|
||||
} else if (!mNoDelayedMouseEvents && aEvent->mMessage == eMouseUp) {
|
||||
DelayedEvent* event = new DelayedMouseEvent(aEvent->AsMouseEvent());
|
||||
if (!mDelayedEvents.AppendElement(event)) {
|
||||
delete event;
|
||||
@@ -7868,8 +7867,8 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NS_MOUSE_BUTTON_DOWN:
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case eMouseDown:
|
||||
case eMouseUp:
|
||||
isHandlingUserInput = true;
|
||||
break;
|
||||
|
||||
@@ -7911,7 +7910,7 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
|
||||
AutoHandlingUserInputStatePusher userInpStatePusher(isHandlingUserInput,
|
||||
aEvent, mDocument);
|
||||
|
||||
if (aEvent->mFlags.mIsTrusted && aEvent->mMessage == NS_MOUSE_MOVE) {
|
||||
if (aEvent->mFlags.mIsTrusted && aEvent->mMessage == eMouseMove) {
|
||||
nsIPresShell::AllowMouseCapture(
|
||||
EventStateManager::GetActiveEventStateManager() == manager);
|
||||
}
|
||||
@@ -7973,11 +7972,11 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, nsEventStatus* aStatus)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NS_MOUSE_BUTTON_UP:
|
||||
case eMouseUp:
|
||||
// reset the capturing content now that the mouse button is up
|
||||
SetCapturingContent(nullptr, 0);
|
||||
break;
|
||||
case NS_MOUSE_MOVE:
|
||||
case eMouseMove:
|
||||
nsIPresShell::AllowMouseCapture(false);
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user