Open Bug 2064103 Opened 10 days ago Updated 2 days ago

Update consumers of gBrowser.ownerDocument to gBrowser.document

Categories

(Firefox :: Tabbed Browser, task, P3)

task

Tracking

()

People

(Reporter: dao, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 2049770 renames the tabbrowser's ownerDocument handle to document -- the old name dates from when the tabbrowser was a XUL element and inherited it, and is meaningless on a plain class. ownerDocument is kept as an alias there so consumers outside the module keep working, notably so the New Tab train stays trainhop-ready.

This bug is for updating those consumers, after which the alias in Tabbrowser.sys.mjs can go. Thirteen references across eleven files:

  • browser/base/content/test/siteIdentity/head.js, browser_identity_UI.js, browser_identity_web_controlled_blank.js
  • browser/components/asrouter/modules/InfoBar.sys.mjs
  • browser/extensions/formautofill/test/browser/focus-leak/browser_iframe_typecontent_input_focus.js
  • testing/mochitest/BrowserTestUtils/BrowserTestUtils.sys.mjs
  • testing/webcompat/client.py (a JS snippet embedded in Python)
  • devtools/client/performance-new/test/browser/helpers.js (2), devtools/client/responsive/test/browser/browser_tooltip.js, devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_addons_popup_picker.js
  • devtools/docs/user/browser_console/index.md (2, in example snippets)

Several use it only to reach the window (gBrowser.ownerDocument.defaultView), which is more directly gBrowser.documentGlobal.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.