Commit 4d927c1f authored by Butkovits Atila's avatar Butkovits Atila
Browse files

Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE

Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
parent 92b7c2a0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -39,6 +39,11 @@ add_task(async function test_check_window_modal_prompt_service() {
    dialogWin?.docShell?.chromeEventHandler,
    "Should have embedded the dialog."
  );
  is(
    window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"),
    "none",
    "Browser window should be inert."
  );
  for (let menu of document.querySelectorAll("menubar > menu")) {
    ok(menu.disabled, `Menu ${menu.id} should be disabled.`);
  }
@@ -60,6 +65,11 @@ add_task(async function test_check_window_modal_prompt_service() {
  );

  // Check we cleaned up:
  is(
    window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"),
    "auto",
    "Browser window should no longer be inert."
  );
  for (let menu of document.querySelectorAll("menubar > menu")) {
    ok(!menu.disabled, `Menu ${menu.id} should not be disabled anymore.`);
  }
+8 −6
Original line number Diff line number Diff line
@@ -3371,6 +3371,7 @@ nsresult EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
        bool suppressBlur = false;
        if (mCurrentTarget) {
          mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(newFocus));
          const nsStyleUI* ui = mCurrentTarget->StyleUI();
          activeContent = mCurrentTarget->GetContent();

          // In some cases, we do not want to even blur the current focused
@@ -3384,8 +3385,7 @@ nsresult EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
          // we click on a non-focusable element like a <div>.
          // We have to use |aEvent->mTarget| to not make sure we do not check
          // an anonymous node of the targeted element.
          suppressBlur =
              mCurrentTarget->StyleUI()->UserFocus() == StyleUserFocus::Ignore;
          suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore);

          nsCOMPtr<Element> element = do_QueryInterface(aEvent->mTarget);
          if (!suppressBlur && element) {
@@ -4071,7 +4071,7 @@ static CursorImage ComputeCustomCursor(nsPresContext* aPresContext,
  // If we are falling back because any cursor before us is loading, let the
  // consumer know.
  bool loading = false;
  for (const auto& image : style.StyleUI()->Cursor().images.AsSpan()) {
  for (const auto& image : style.StyleUI()->mCursor.images.AsSpan()) {
    MOZ_ASSERT(image.image.IsImageRequestType(),
               "Cursor image should only parse url() types");
    uint32_t status;
@@ -5606,10 +5606,12 @@ bool EventStateManager::SetContentState(nsIContent* aContent,

    // check to see that this state is allowed by style. Check dragover too?
    // XXX Is this even what we want?
    if (mCurrentTarget &&
        mCurrentTarget->StyleUI()->UserInput() == StyleUserInput::None) {
    if (mCurrentTarget) {
      const nsStyleUI* ui = mCurrentTarget->StyleUI();
      if (ui->mUserInput == StyleUserInput::None) {
        return false;
      }
    }

    if (aState == NS_EVENT_STATE_ACTIVE) {
      if (aContent && !CanContentHaveActiveState(*aContent)) {
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ void HTMLOptGroupElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) {
  if (nsIFrame* frame = GetPrimaryFrame()) {
    // FIXME(emilio): This poking at the style of the frame is broken unless we
    // flush before every event handling, which we don't really want to.
    if (frame->StyleUI()->UserInput() == StyleUserInput::None) {
    if (frame->StyleUI()->mUserInput == StyleUserInput::None) {
      return;
    }
  }
+1 −1
Original line number Diff line number Diff line
@@ -1948,7 +1948,7 @@ bool nsGenericHTMLFormElement::IsElementDisabledForEvents(WidgetEvent* aEvent,

  // FIXME(emilio): This poking at the style of the frame is slightly bogus
  // unless we flush before every event, which we don't really want to do.
  if (aFrame && aFrame->StyleUI()->UserInput() == StyleUserInput::None) {
  if (aFrame && aFrame->StyleUI()->mUserInput == StyleUserInput::None) {
    return true;
  }

+2 −2
Original line number Diff line number Diff line
@@ -185,8 +185,8 @@ nsresult nsXULPopupListener::FireFocusOnTargetContent(
  nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame();
  if (!targetFrame) return NS_ERROR_FAILURE;

  const bool suppressBlur =
      targetFrame->StyleUI()->UserFocus() == StyleUserFocus::Ignore;
  const nsStyleUI* ui = targetFrame->StyleUI();
  bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore);

  RefPtr<Element> newFocusElement;

Loading