Open Bug 2062209 Opened 9 days ago Updated 1 hour ago

[MCAB HNT] Phase 1: Render <moz-urlbar> on about:newtab via the New Tab external component registry

Categories

(Firefox :: Address Bar, enhancement, P2)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: dao, Assigned: dao, NeedInfo)

References

(Blocks 4 open bugs)

Details

(Keywords: leave-open, Whiteboard: [sng][mcab-hnt])

Attachments

(2 files)

Part of the MCAB HNT roadmap: putting <moz-urlbar> on the Home / New Tab page. Builds on the IPC Urlbar infrastructure.

Render <moz-urlbar> on about:newtab through EXPO, the New Tab external component registry (bug 2004784, AboutNewTabComponents.sys.mjs) -- the same mechanism the handoff searchbar already uses.

  • Extend the Urlbar actor registration in DesktopActorRegistry.sys.mjs to match about:newtab and about:home, relaxing the includeChrome-only scoping.
  • Add "privilegedabout" to the actor's remoteTypes, locked to ["parent"] today (bug 2049496). It must never be a web content process: bug 2047680 refuses to load actors in web content unless they set safeForUntrustedWebProcess, which the Urlbar actor should not.
  • Acquire the actor from the content realm. windowGlobalChild.getActor is [ChromeOnly], so this depends on the IPC Urlbar content-realm actor-acquisition shim (window.UrlbarActorPort).
  • Register { componentURL, tagName: "moz-urlbar" } under the browser-newtab-external-component category from a registrant gated on a new browser.urlbar.newtab.featureGate pref, superseding the handoff bar only while the gate is on. Follow the SearchNewTabComponentsRegistrant pattern in SearchUIUtils.sys.mjs: a declareLazy pref getter with onUpdate: () => this.updated(), so a live pref flip swaps handoff bar and moz-urlbar without a restart.
  • Default the gate to false on every channel -- ["newtab.featureGate", false] in PREF_URLBAR_DEFAULTS (UrlbarPrefs.sys.mjs) and pref("browser.urlbar.newtab.featureGate", false); in firefox.js. That default is what lets this and the later phases develop in-tree without release risk.
  • Deliver UrlbarInput.mjs, UrlbarView.mjs and their CSS to the content document as the componentURL; they are chrome-only (chrome://browser/content/urlbar/) today and need a content-accessible URL.
  • Carry over the sap-name, popover and unifiedsearchbutton-available attributes the chrome instances set.

Done when opening about:newtab shows a focused <moz-urlbar> that performs a query and renders results end-to-end through the actor. Styling is a separate phase.

Severity: -- → N/A
Priority: -- → P2
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

Not ready to land: <moz-urlbar> can't load in a content process yet, so
flipping the gate on would leave New Tab without a search bar. That will be
fixed before this lands.

Attachment #9626743 - Attachment description: Bug 2062209 - Register <moz-urlbar> as New Tab's search component behind a feature gate. r?#urlbar-reviewers!,mconley! → WIP: Bug 2062209 - Register <moz-urlbar> as New Tab's search component behind a feature gate. r?#urlbar-reviewers!,mconley!
Attachment #9626742 - Attachment description: Bug 2062209 - Scope the Urlbar actor to about:newtab and about:home. r?#urlbar-reviewers!,mconley! → WIP: Bug 2062209 - Scope the Urlbar actor to about:newtab and about:home. r?#urlbar-reviewers!,mconley!
Attachment #9626742 - Attachment description: WIP: Bug 2062209 - Scope the Urlbar actor to about:newtab and about:home. r?#urlbar-reviewers!,mconley! → Bug 2062209 - Scope the Urlbar actor to about:newtab and about:home. r?#urlbar-reviewers!,mconley!
Attachment #9626743 - Attachment description: WIP: Bug 2062209 - Register <moz-urlbar> as New Tab's search component behind a feature gate. r?#urlbar-reviewers!,mconley! → Bug 2062209 - Register <moz-urlbar> as New Tab's search component behind a feature gate. r?#urlbar-reviewers!,mconley!
Keywords: leave-open
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4abe827f6c93 https://hg.mozilla.org/integration/autoland/rev/2ba38cc40930 Revert "Bug 2062209, Bug 2064279, Bug 2064185, Bug 2062987, Bug 2064277, Bug 2064276 - Scope the Urlbar actor to about:newtab and about:home. r=mconley,mbeier" for causing mochitests failures in browser_searchbar_new.js.

Reverted this because it was causing mochitests failures in browser_searchbar_new.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | accessible/tests/browser/tree/browser_searchbar_new.js | test_searchbar_a11y_tree - [DOM node id: searchbar-new, role: grouping, address: [xpconnect wrapped nsIAccessible]] has an extra child at index 1 : [role: section, address: [xpconnect wrapped nsIAccessible]]
Flags: needinfo?(dao+bmo)
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/91c8ca3faa6c https://hg.mozilla.org/mozilla-central/rev/1125f63f232f Revert "Bug 2062209, Bug 2064279, Bug 2064185, Bug 2062987, Bug 2064277, Bug 2064276 - Scope the Urlbar actor to about:newtab and about:home. r=mconley,mbeier" for causing mochitests failures in browser_searchbar_new.js.
Pushed by archaeopteryx@coole-files.de: https://github.com/mozilla-firefox/firefox/commit/449eb52bd631 https://hg.mozilla.org/integration/autoland/rev/04c5149b0b49 Revert "Bug 2062209 - Scope the Urlbar actor to about:newtab and about:home. r=mconley,mbeier" for causing merge conflict with its own backout

Sorry, the backout from comment 5 needed to be cherry-picked to be able to merge to main which created a new commit hash which would have caused the merge from main to autoland to revert the relanding from comment 6 but it already got stuck because of a merge conflict.

Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4b2111d9ec12 https://hg.mozilla.org/integration/autoland/rev/fd6defb82b68 Scope the Urlbar actor to about:newtab and about:home. r=mconley,mbeier https://github.com/mozilla-firefox/firefox/commit/82def3f8a6f0 https://hg.mozilla.org/integration/autoland/rev/7c36dc8533d1 Register <moz-urlbar> as New Tab's search component behind a feature gate. r=mconley,urlbar-reviewers,search-reviewers,daleharvey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: