Loading browser/base/content/test/tabPrompts/browser_windowPrompt.js +0 −36 Original line number Diff line number Diff line Loading @@ -39,11 +39,6 @@ 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.`); } Loading @@ -65,11 +60,6 @@ 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.`); } Loading @@ -95,11 +85,6 @@ 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." ); let container = dialogWin.docShell.chromeEventHandler.closest("dialog"); let closedPromise = BrowserTestUtils.waitForMutationCondition( Loading @@ -114,11 +99,6 @@ add_task(async function test_check_window_modal_prompt_service() { await closedPromise; // 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.`); } Loading @@ -145,11 +125,6 @@ add_task(async function test_check_multiple_prompts() { dialogWin?.docShell?.chromeEventHandler, "Should have embedded the dialog." ); is( window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"), "none", "Browser window should be inert." ); is(container.childElementCount, 1, "Should only have 1 dialog in the DOM."); let secondDialogClosedPromise = new Promise(resolve => { Loading @@ -173,12 +148,6 @@ add_task(async function test_check_multiple_prompts() { isnot(oldWin, dialogWin, "Opened a new dialog."); ok(container.open, "Dialog should be open."); is( window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"), "none", "Browser window should be inert again." ); info("Now close the second dialog."); dialogWin.document.querySelector("dialog").acceptDialog(); Loading @@ -191,11 +160,6 @@ add_task(async function test_check_multiple_prompts() { () => !container.hasChildNodes() && !container.open ); // 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.`); } Loading dom/events/EventStateManager.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -3371,7 +3371,6 @@ 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 Loading @@ -3385,7 +3384,8 @@ 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 = (ui->mUserFocus == StyleUserFocus::Ignore); suppressBlur = mCurrentTarget->StyleUI()->UserFocus() == StyleUserFocus::Ignore; nsCOMPtr<Element> element = do_QueryInterface(aEvent->mTarget); if (!suppressBlur && element) { Loading Loading @@ -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()->mCursor.images.AsSpan()) { for (const auto& image : style.StyleUI()->Cursor().images.AsSpan()) { MOZ_ASSERT(image.image.IsImageRequestType(), "Cursor image should only parse url() types"); uint32_t status; Loading Loading @@ -5606,12 +5606,10 @@ 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) { const nsStyleUI* ui = mCurrentTarget->StyleUI(); if (ui->mUserInput == StyleUserInput::None) { if (mCurrentTarget && mCurrentTarget->StyleUI()->UserInput() == StyleUserInput::None) { return false; } } if (aState == NS_EVENT_STATE_ACTIVE) { if (aContent && !CanContentHaveActiveState(*aContent)) { Loading dom/html/HTMLOptGroupElement.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()->mUserInput == StyleUserInput::None) { if (frame->StyleUI()->UserInput() == StyleUserInput::None) { return; } } Loading dom/html/nsGenericHTMLElement.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()->mUserInput == StyleUserInput::None) { if (aFrame && aFrame->StyleUI()->UserInput() == StyleUserInput::None) { return true; } Loading dom/xul/nsXULPopupListener.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ nsresult nsXULPopupListener::FireFocusOnTargetContent( nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame(); if (!targetFrame) return NS_ERROR_FAILURE; const nsStyleUI* ui = targetFrame->StyleUI(); bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore); const bool suppressBlur = targetFrame->StyleUI()->UserFocus() == StyleUserFocus::Ignore; RefPtr<Element> newFocusElement; Loading Loading
browser/base/content/test/tabPrompts/browser_windowPrompt.js +0 −36 Original line number Diff line number Diff line Loading @@ -39,11 +39,6 @@ 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.`); } Loading @@ -65,11 +60,6 @@ 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.`); } Loading @@ -95,11 +85,6 @@ 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." ); let container = dialogWin.docShell.chromeEventHandler.closest("dialog"); let closedPromise = BrowserTestUtils.waitForMutationCondition( Loading @@ -114,11 +99,6 @@ add_task(async function test_check_window_modal_prompt_service() { await closedPromise; // 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.`); } Loading @@ -145,11 +125,6 @@ add_task(async function test_check_multiple_prompts() { dialogWin?.docShell?.chromeEventHandler, "Should have embedded the dialog." ); is( window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"), "none", "Browser window should be inert." ); is(container.childElementCount, 1, "Should only have 1 dialog in the DOM."); let secondDialogClosedPromise = new Promise(resolve => { Loading @@ -173,12 +148,6 @@ add_task(async function test_check_multiple_prompts() { isnot(oldWin, dialogWin, "Opened a new dialog."); ok(container.open, "Dialog should be open."); is( window.getComputedStyle(document.body).getPropertyValue("-moz-user-input"), "none", "Browser window should be inert again." ); info("Now close the second dialog."); dialogWin.document.querySelector("dialog").acceptDialog(); Loading @@ -191,11 +160,6 @@ add_task(async function test_check_multiple_prompts() { () => !container.hasChildNodes() && !container.open ); // 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.`); } Loading
dom/events/EventStateManager.cpp +6 −8 Original line number Diff line number Diff line Loading @@ -3371,7 +3371,6 @@ 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 Loading @@ -3385,7 +3384,8 @@ 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 = (ui->mUserFocus == StyleUserFocus::Ignore); suppressBlur = mCurrentTarget->StyleUI()->UserFocus() == StyleUserFocus::Ignore; nsCOMPtr<Element> element = do_QueryInterface(aEvent->mTarget); if (!suppressBlur && element) { Loading Loading @@ -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()->mCursor.images.AsSpan()) { for (const auto& image : style.StyleUI()->Cursor().images.AsSpan()) { MOZ_ASSERT(image.image.IsImageRequestType(), "Cursor image should only parse url() types"); uint32_t status; Loading Loading @@ -5606,12 +5606,10 @@ 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) { const nsStyleUI* ui = mCurrentTarget->StyleUI(); if (ui->mUserInput == StyleUserInput::None) { if (mCurrentTarget && mCurrentTarget->StyleUI()->UserInput() == StyleUserInput::None) { return false; } } if (aState == NS_EVENT_STATE_ACTIVE) { if (aContent && !CanContentHaveActiveState(*aContent)) { Loading
dom/html/HTMLOptGroupElement.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()->mUserInput == StyleUserInput::None) { if (frame->StyleUI()->UserInput() == StyleUserInput::None) { return; } } Loading
dom/html/nsGenericHTMLElement.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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()->mUserInput == StyleUserInput::None) { if (aFrame && aFrame->StyleUI()->UserInput() == StyleUserInput::None) { return true; } Loading
dom/xul/nsXULPopupListener.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ nsresult nsXULPopupListener::FireFocusOnTargetContent( nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame(); if (!targetFrame) return NS_ERROR_FAILURE; const nsStyleUI* ui = targetFrame->StyleUI(); bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore); const bool suppressBlur = targetFrame->StyleUI()->UserFocus() == StyleUserFocus::Ignore; RefPtr<Element> newFocusElement; Loading