mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 895274 part.2 Define event messages as anonymous enum with EventMessageList.h r=smaug (44a28d5da) - Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug (1a1651a54) - Bug 895274 part.170 Rename NS_ANIMATION_EVENT_START to eAnimationEventFirst r=smaug (e3bedfd02) - some cleanup (c496de395) - Bug 1186582 - AskPermission should check for prompt exceptions; r=fabrice (e7fc39d0a) - Bug 1170314 - Make console.timeStamp to add also Gecko profiler markers if Gecko profiler is active, r=baku,benwa (7e78b02c1) - Bug 1178172 - Fix all compile errors in dom/base on non-unified build. r=baku (ffc87d5ae) - namespace (93bb2e778) - Bug 1001158 - Handle an invalid distribution.ini gracefully, r=gijs (260ab12f2) - Bug 1157760: Remove incorrect MOZ_ASSERT in nsMessageManagerSH<Super>::Enumerate. r=bz (e1d86db8a) - Bug 1148694 patch 1 - Stop creating a CharsetRule object when parsing @charset rules. r=dbaron (5d3b4a237) - Bug 1148694 patch 2 - Remove interface and implementation of CSSCharsetRule. r=dbaron (e687d6a51) - Bug 1148694 patch 3 - remove tests affected by removal of CSSCharsetRule. r=dbaron, r=khuey (84e04ec3c) - Bug 958778 - De-holder nsIXPConnect::GetWrappedNativePrototype(). r=gabor (e862b0197) - non-EME part of Bug 1160445 - Add detailed logging for EME promise failures (90c5ae1a1) - Bug 1191305 - Alphabetize some includes; r=froydnj (6bc41455c) - Bug 1188640 - Add ChromeOnly MutationObserver.mergeAttributeRecords to speed up devtools, r=bz,bgrins (5f07c777f) - namespace (0e90aac16)
This commit is contained in:
@@ -3018,7 +3018,7 @@ HTMLInputElement::NeedToInitializeEditorForEvent(
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (aVisitor.mEvent->message) {
|
||||
switch (aVisitor.mEvent->mMessage) {
|
||||
case NS_MOUSE_MOVE:
|
||||
case NS_MOUSE_ENTER_WIDGET:
|
||||
case NS_MOUSE_EXIT_WIDGET:
|
||||
@@ -3043,7 +3043,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
{
|
||||
// Do not process any DOM events if the element is disabled
|
||||
aVisitor.mCanHandle = false;
|
||||
if (IsDisabledForEvents(aVisitor.mEvent->message)) {
|
||||
if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -3081,7 +3081,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
|
||||
bool outerActivateEvent =
|
||||
((mouseEvent && mouseEvent->IsLeftClickEvent()) ||
|
||||
(aVisitor.mEvent->message == NS_UI_ACTIVATE && !mInInternalActivate));
|
||||
(aVisitor.mEvent->mMessage == NS_UI_ACTIVATE && !mInInternalActivate));
|
||||
|
||||
if (outerActivateEvent) {
|
||||
aVisitor.mItemFlags |= NS_OUTER_ACTIVATE_EVENT;
|
||||
@@ -3146,7 +3146,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
aVisitor.mItemFlags |= NS_NO_CONTENT_DISPATCH;
|
||||
}
|
||||
if (IsSingleLineTextControl(false) &&
|
||||
aVisitor.mEvent->message == NS_MOUSE_CLICK &&
|
||||
aVisitor.mEvent->mMessage == NS_MOUSE_CLICK &&
|
||||
aVisitor.mEvent->AsMouseEvent()->button ==
|
||||
WidgetMouseEvent::eMiddleButton) {
|
||||
aVisitor.mEvent->mFlags.mNoContentDispatch = false;
|
||||
@@ -3156,7 +3156,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
aVisitor.mItemFlags |= mType;
|
||||
|
||||
// Fire onchange (if necessary), before we do the blur, bug 357684.
|
||||
if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
|
||||
// Experimental mobile types rely on the system UI to prevent users to not
|
||||
// set invalid values but we have to be extra-careful. Especially if the
|
||||
// option has been enabled on desktop.
|
||||
@@ -3170,8 +3170,8 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
}
|
||||
|
||||
if (mType == NS_FORM_INPUT_RANGE &&
|
||||
(aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->message == NS_BLUR_CONTENT)) {
|
||||
(aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT)) {
|
||||
// Just as nsGenericHTMLFormElementWithState::PreHandleEvent calls
|
||||
// nsIFormControlFrame::SetFocus, we handle focus here.
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
@@ -3189,7 +3189,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
// we want to end the spin. We do this here (rather than in
|
||||
// PostHandleEvent) because we don't want to let content preventDefault()
|
||||
// the end of the spin.
|
||||
if (aVisitor.mEvent->message == NS_MOUSE_MOVE) {
|
||||
if (aVisitor.mEvent->mMessage == NS_MOUSE_MOVE) {
|
||||
// Be aggressive about stopping the spin:
|
||||
bool stopSpin = true;
|
||||
nsNumberControlFrame* numberControlFrame =
|
||||
@@ -3220,13 +3220,13 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
if (stopSpin) {
|
||||
StopNumberControlSpinnerSpin();
|
||||
}
|
||||
} else if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_UP) {
|
||||
} else if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP) {
|
||||
StopNumberControlSpinnerSpin();
|
||||
}
|
||||
}
|
||||
if (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->message == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->message == NS_FOCUS_CONTENT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
|
||||
// Tell our frame it's getting focus so that it can make sure focus
|
||||
// is moved to our anonymous text control.
|
||||
nsNumberControlFrame* numberControlFrame =
|
||||
@@ -3246,7 +3246,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
// that).
|
||||
frame->InvalidateFrame();
|
||||
}
|
||||
} else if (aVisitor.mEvent->message == NS_KEY_UP) {
|
||||
} else if (aVisitor.mEvent->mMessage == NS_KEY_UP) {
|
||||
WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
|
||||
if ((keyEvent->keyCode == NS_VK_UP || keyEvent->keyCode == NS_VK_DOWN) &&
|
||||
!(keyEvent->IsShift() || keyEvent->IsControl() ||
|
||||
@@ -3278,7 +3278,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
textControl = numberControlFrame->GetAnonTextControl();
|
||||
}
|
||||
if (textControl && aVisitor.mEvent->originalTarget == textControl) {
|
||||
if (aVisitor.mEvent->message == NS_EDITOR_INPUT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_EDITOR_INPUT) {
|
||||
// Propogate the anon text control's new value to our HTMLInputElement:
|
||||
nsAutoString value;
|
||||
numberControlFrame->GetValueOfAnonTextControl(value);
|
||||
@@ -3290,7 +3290,7 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
numberControlFrame->HandlingInputEvent(false);
|
||||
}
|
||||
}
|
||||
else if (aVisitor.mEvent->message == NS_FORM_CHANGE) {
|
||||
else if (aVisitor.mEvent->mMessage == NS_FORM_CHANGE) {
|
||||
// We cancel the DOM 'change' event that is fired for any change to our
|
||||
// anonymous text control since we fire our own 'change' events and
|
||||
// content shouldn't be seeing two 'change' events. Besides that we
|
||||
@@ -3577,15 +3577,15 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
return MaybeInitPickers(aVisitor);
|
||||
}
|
||||
|
||||
if (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->message == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->message == NS_FOCUS_CONTENT &&
|
||||
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
|
||||
aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT &&
|
||||
MayFireChangeOnBlur() &&
|
||||
!mIsDraggingRange) { // StartRangeThumbDrag already set mFocusedValue
|
||||
GetValue(mFocusedValue);
|
||||
}
|
||||
|
||||
if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
|
||||
if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
|
||||
if (mIsDraggingRange) {
|
||||
FinishRangeThumbDrag();
|
||||
} else if (mNumberControlSpinnerIsSpinning) {
|
||||
@@ -3593,7 +3593,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
}
|
||||
}
|
||||
|
||||
UpdateValidityUIBits(aVisitor.mEvent->message == NS_FOCUS_CONTENT);
|
||||
UpdateValidityUIBits(aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT);
|
||||
|
||||
UpdateState(true);
|
||||
}
|
||||
@@ -3710,7 +3710,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
|
||||
if (mType == NS_FORM_INPUT_NUMBER &&
|
||||
keyEvent && keyEvent->message == NS_KEY_PRESS &&
|
||||
keyEvent && keyEvent->mMessage == NS_KEY_PRESS &&
|
||||
aVisitor.mEvent->mFlags.mIsTrusted &&
|
||||
(keyEvent->keyCode == NS_VK_UP || keyEvent->keyCode == NS_VK_DOWN) &&
|
||||
!(keyEvent->IsShift() || keyEvent->IsControl() ||
|
||||
@@ -3733,7 +3733,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
} else if (nsEventStatus_eIgnore == aVisitor.mEventStatus) {
|
||||
switch (aVisitor.mEvent->message) {
|
||||
switch (aVisitor.mEvent->mMessage) {
|
||||
|
||||
case NS_FOCUS_CONTENT:
|
||||
{
|
||||
@@ -3768,9 +3768,9 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
// For backwards compat, trigger checks/radios/buttons with
|
||||
// space or enter (bug 25300)
|
||||
WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
|
||||
if ((aVisitor.mEvent->message == NS_KEY_PRESS &&
|
||||
if ((aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
|
||||
keyEvent->keyCode == NS_VK_RETURN) ||
|
||||
(aVisitor.mEvent->message == NS_KEY_UP &&
|
||||
(aVisitor.mEvent->mMessage == NS_KEY_UP &&
|
||||
keyEvent->keyCode == NS_VK_SPACE)) {
|
||||
switch(mType) {
|
||||
case NS_FORM_INPUT_CHECKBOX:
|
||||
@@ -3796,7 +3796,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
} // case
|
||||
} // switch
|
||||
}
|
||||
if (aVisitor.mEvent->message == NS_KEY_PRESS &&
|
||||
if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
|
||||
mType == NS_FORM_INPUT_RADIO && !keyEvent->IsAlt() &&
|
||||
!keyEvent->IsControl() && !keyEvent->IsMeta()) {
|
||||
bool isMovingBack = false;
|
||||
@@ -3842,7 +3842,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
* not submit, period.
|
||||
*/
|
||||
|
||||
if (aVisitor.mEvent->message == NS_KEY_PRESS &&
|
||||
if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
|
||||
keyEvent->keyCode == NS_VK_RETURN &&
|
||||
(IsSingleLineTextControl(false, mType) ||
|
||||
mType == NS_FORM_INPUT_NUMBER ||
|
||||
@@ -3852,7 +3852,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
if (aVisitor.mEvent->message == NS_KEY_PRESS &&
|
||||
if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
|
||||
mType == NS_FORM_INPUT_RANGE && !keyEvent->IsAlt() &&
|
||||
!keyEvent->IsControl() && !keyEvent->IsMeta() &&
|
||||
(keyEvent->keyCode == NS_VK_LEFT ||
|
||||
@@ -3942,7 +3942,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
nsNumberControlFrame* numberControlFrame =
|
||||
do_QueryFrame(GetPrimaryFrame());
|
||||
if (numberControlFrame) {
|
||||
if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN &&
|
||||
if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN &&
|
||||
IsMutable()) {
|
||||
switch (numberControlFrame->GetSpinButtonForPointerEvent(
|
||||
aVisitor.mEvent->AsMouseEvent())) {
|
||||
@@ -4004,7 +4004,7 @@ HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
// pres shell. See bug 125624.
|
||||
// TODO: removing this code and have the submit event sent by the
|
||||
// form, see bug 592124.
|
||||
if (presShell && (event.message != NS_FORM_SUBMIT ||
|
||||
if (presShell && (event.mMessage != NS_FORM_SUBMIT ||
|
||||
mForm->HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate) ||
|
||||
// We know the element is a submit control, if this check is moved,
|
||||
// make sure formnovalidate is used only if it's a submit control.
|
||||
@@ -4059,7 +4059,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (aVisitor.mEvent->message)
|
||||
switch (aVisitor.mEvent->mMessage)
|
||||
{
|
||||
case NS_MOUSE_BUTTON_DOWN:
|
||||
case NS_TOUCH_START: {
|
||||
@@ -4076,7 +4076,7 @@ HTMLInputElement::PostHandleEventForRangeThumb(EventChainPostVisitor& aVisitor)
|
||||
inputEvent->IsOS()) {
|
||||
break; // ignore
|
||||
}
|
||||
if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN) {
|
||||
if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
|
||||
if (aVisitor.mEvent->AsMouseEvent()->buttons ==
|
||||
WidgetMouseEvent::eLeftButtonFlag) {
|
||||
StartRangeThumbDrag(inputEvent);
|
||||
|
||||
Reference in New Issue
Block a user