mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-01 01:41:37 +00:00
#399: M1249913 M1310403 M1260515
This commit is contained in:
parent
82f1d5895c
commit
fbde989ca7
|
@ -1584,15 +1584,11 @@ nsXMLHttpRequest::Open(const nsACString& inMethod, const nsACString& url,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sync request is not allowed using withCredential or responseType
|
// sync request is not allowed to use responseType or timeout
|
||||||
// in window context
|
// in window context
|
||||||
if (!async && HasOrHasHadOwner() &&
|
if (!async && HasOrHasHadOwner() &&
|
||||||
(mState & XML_HTTP_REQUEST_AC_WITH_CREDENTIALS ||
|
(mTimeoutMilliseconds ||
|
||||||
mTimeoutMilliseconds ||
|
|
||||||
mResponseType != XML_HTTP_RESPONSE_TYPE_DEFAULT)) {
|
mResponseType != XML_HTTP_RESPONSE_TYPE_DEFAULT)) {
|
||||||
if (mState & XML_HTTP_REQUEST_AC_WITH_CREDENTIALS) {
|
|
||||||
LogMessage("WithCredentialsSyncXHRWarning", GetOwner());
|
|
||||||
}
|
|
||||||
if (mTimeoutMilliseconds) {
|
if (mTimeoutMilliseconds) {
|
||||||
LogMessage("TimeoutSyncXHRWarning", GetOwner());
|
LogMessage("TimeoutSyncXHRWarning", GetOwner());
|
||||||
}
|
}
|
||||||
|
@ -3262,14 +3258,6 @@ nsXMLHttpRequest::SetWithCredentials(bool aWithCredentials, ErrorResult& aRv)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sync request is not allowed setting withCredentials in window context
|
|
||||||
if (HasOrHasHadOwner() &&
|
|
||||||
!(mState & (XML_HTTP_REQUEST_UNSENT | XML_HTTP_REQUEST_ASYNC))) {
|
|
||||||
LogMessage("WithCredentialsSyncXHRWarning", GetOwner());
|
|
||||||
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aWithCredentials) {
|
if (aWithCredentials) {
|
||||||
mState |= XML_HTTP_REQUEST_AC_WITH_CREDENTIALS;
|
mState |= XML_HTTP_REQUEST_AC_WITH_CREDENTIALS;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -311,69 +311,6 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case eMouseDown:
|
|
||||||
{
|
|
||||||
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
|
|
||||||
if (mouseEvent->button == WidgetMouseEvent::eLeftButton) {
|
|
||||||
if (mouseEvent->mFlags.mIsTrusted) {
|
|
||||||
EventStateManager* esm =
|
|
||||||
aVisitor.mPresContext->EventStateManager();
|
|
||||||
EventStateManager::SetActiveManager(
|
|
||||||
static_cast<EventStateManager*>(esm), this);
|
|
||||||
}
|
|
||||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
|
||||||
if (fm) {
|
|
||||||
uint32_t flags = nsIFocusManager::FLAG_BYMOUSE |
|
|
||||||
nsIFocusManager::FLAG_NOSCROLL;
|
|
||||||
// If this was a touch-generated event, pass that information:
|
|
||||||
if (mouseEvent->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) {
|
|
||||||
flags |= nsIFocusManager::FLAG_BYTOUCH;
|
|
||||||
}
|
|
||||||
fm->SetFocus(this, flags);
|
|
||||||
}
|
|
||||||
mouseEvent->mFlags.mMultipleActionsPrevented = true;
|
|
||||||
} else if (mouseEvent->button == WidgetMouseEvent::eMiddleButton ||
|
|
||||||
mouseEvent->button == WidgetMouseEvent::eRightButton) {
|
|
||||||
// cancel all of these events for buttons
|
|
||||||
//XXXsmaug What to do with these events? Why these should be cancelled?
|
|
||||||
if (aVisitor.mDOMEvent) {
|
|
||||||
aVisitor.mDOMEvent->StopPropagation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// cancel all of these events for buttons
|
|
||||||
//XXXsmaug What to do with these events? Why these should be cancelled?
|
|
||||||
case eMouseUp:
|
|
||||||
case eMouseDoubleClick:
|
|
||||||
{
|
|
||||||
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
|
|
||||||
if (aVisitor.mDOMEvent &&
|
|
||||||
(mouseEvent->button == WidgetMouseEvent::eMiddleButton ||
|
|
||||||
mouseEvent->button == WidgetMouseEvent::eRightButton)) {
|
|
||||||
aVisitor.mDOMEvent->StopPropagation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case eMouseOver:
|
|
||||||
{
|
|
||||||
aVisitor.mPresContext->EventStateManager()->
|
|
||||||
SetContentState(this, NS_EVENT_STATE_HOVER);
|
|
||||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// XXX this doesn't seem to do anything yet
|
|
||||||
case eMouseOut:
|
|
||||||
{
|
|
||||||
aVisitor.mPresContext->EventStateManager()->
|
|
||||||
SetContentState(nullptr, NS_EVENT_STATE_HOVER);
|
|
||||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -755,10 +755,13 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext,
|
||||||
} else {
|
} else {
|
||||||
MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
|
MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea),
|
||||||
"Should use aBorderArea for box-decoration-break:clone");
|
"Should use aBorderArea for box-decoration-break:clone");
|
||||||
MOZ_ASSERT(aForFrame->GetSkipSides().IsEmpty(),
|
MOZ_ASSERT(aForFrame->GetSkipSides().IsEmpty() ||
|
||||||
|
IS_TRUE_OVERFLOW_CONTAINER(aForFrame),
|
||||||
"Should not skip sides for box-decoration-break:clone except "
|
"Should not skip sides for box-decoration-break:clone except "
|
||||||
"::first-letter/line continuations or other frame types that "
|
"::first-letter/line continuations or other frame types that "
|
||||||
"don't have borders but those shouldn't reach this point.");
|
"don't have borders but those shouldn't reach this point. "
|
||||||
|
"Overflow containers do reach this point though.");
|
||||||
|
border.ApplySkipSides(aSkipSides);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to dev pixels.
|
// Convert to dev pixels.
|
||||||
|
|
|
@ -1011,7 +1011,8 @@ nsIFrame::Sides
|
||||||
nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
|
nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
|
||||||
{
|
{
|
||||||
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
if (MOZ_UNLIKELY(StyleBorder()->mBoxDecorationBreak ==
|
||||||
NS_STYLE_BOX_DECORATION_BREAK_CLONE)) {
|
NS_STYLE_BOX_DECORATION_BREAK_CLONE) &&
|
||||||
|
!(GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) {
|
||||||
return Sides();
|
return Sides();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user