diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 2c68e652b..9d36d6d92 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -1584,15 +1584,11 @@ nsXMLHttpRequest::Open(const nsACString& inMethod, const nsACString& url, return rv; } - // sync request is not allowed using withCredential or responseType + // sync request is not allowed to use responseType or timeout // in window context if (!async && HasOrHasHadOwner() && - (mState & XML_HTTP_REQUEST_AC_WITH_CREDENTIALS || - mTimeoutMilliseconds || + (mTimeoutMilliseconds || mResponseType != XML_HTTP_RESPONSE_TYPE_DEFAULT)) { - if (mState & XML_HTTP_REQUEST_AC_WITH_CREDENTIALS) { - LogMessage("WithCredentialsSyncXHRWarning", GetOwner()); - } if (mTimeoutMilliseconds) { LogMessage("TimeoutSyncXHRWarning", GetOwner()); } @@ -3262,14 +3258,6 @@ nsXMLHttpRequest::SetWithCredentials(bool aWithCredentials, ErrorResult& aRv) 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) { mState |= XML_HTTP_REQUEST_AC_WITH_CREDENTIALS; } else { diff --git a/dom/html/HTMLButtonElement.cpp b/dom/html/HTMLButtonElement.cpp index ddcc7dd22..46ef80e40 100644 --- a/dom/html/HTMLButtonElement.cpp +++ b/dom/html/HTMLButtonElement.cpp @@ -311,69 +311,6 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor) } 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(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: break; } diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index cf4e52937..31ed80e81 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -755,10 +755,13 @@ nsCSSRendering::PaintBorderWithStyleBorder(nsPresContext* aPresContext, } else { MOZ_ASSERT(joinedBorderArea.IsEqualEdges(aBorderArea), "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 " "::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. diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 20e7a892f..7ccfe6683 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1011,7 +1011,8 @@ nsIFrame::Sides nsIFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const { 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(); }