Closed Bug 1479486 Opened 2 years ago Closed 2 years ago
Can we remove the forward() and home() APIs on windows?
Window.webidl has these three APIs: [Throws, ChromeOnly] void back(); [Throws, ChromeOnly] void forward(); [Throws, ChromeOnly, NeedsSubjectPrincipal] void home(); According to code coverage, back() is exercised, but forward() and home() are not. Can we remove them? Also, could we change the window.back() caller to doing window.history.back() if that's what it really wants to do?
Yes, we can remove these and change any existing callers of window.back() to window.history.back().
Well, back() is used, but only in tests, and those can use history.back().
Attachment #8996191 - Flags: review?(continuation)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8996191 [details] [diff] [review] Remove some unused chromeonly history APIs on Window Review of attachment 8996191 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsGlobalWindowOuter.cpp @@ -4910,5 @@ > -#endif > - homeURL = NS_LITERAL_STRING(DEFAULT_HOME_PAGE); > - } > - > -#ifdef MOZ_PHOENIX This is a weird ifdef. It is still used in one other place, and is win32 only.
Attachment #8996191 - Flags: review?(continuation) → review+
> This is a weird ifdef Yes, yes, it is. I filed bug 1479894 on nixing it.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/b75e262fac02 Remove some unused chromeonly history APIs on Window. r=mccr8
Backed out 4 changesets (Bug 1479486, Bug 1479497, Bug 1479475) for build bustages on builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:932:53. https://hg.mozilla.org/integration/mozilla-inbound/rev/2ba660590ac8c71eca40e232dd3c047f5a55250d Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b75e262fac02c213e2261078bf6c774ec5a5fdf3&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&selectedJob=191245950 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=191245950&repo=mozilla-inbound&lineNumber=19123
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/81eb830da3e6 Remove some unused chromeonly history APIs on Window. r=mccr8
Documentation updated: https://developer.mozilla.org/en-US/docs/Web/API/Window/back https://developer.mozilla.org/en-US/docs/Web/API/Window/forward https://developer.mozilla.org/en-US/docs/Web/API/Window Noted on Firefox 63 for developers.
(In reply to Eric Shepherd [:sheppy] from comment #9) > Documentation updated: > > https://developer.mozilla.org/en-US/docs/Web/API/Window/back > https://developer.mozilla.org/en-US/docs/Web/API/Window/forward > https://developer.mozilla.org/en-US/docs/Web/API/Window > > Noted on Firefox 63 for developers. Since these methods were [ChromeOnly], they were removed as a Web API far back (Firefox 31, according to bug 1012944).
I fixed the docs to say Firefox 31.
You need to log in before you can comment on or make changes to this bug.