Can we remove the forward() and home() APIs on windows?

RESOLVED FIXED in Firefox 63

Status

()

RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

unspecified
mozilla63
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

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?
Flags: needinfo?(dtownsend)
(Assignee)

Updated

6 months ago
Depends on: 1479475
Yes, we can remove these and change any existing callers of window.back() to window.history.back().
Flags: needinfo?(dtownsend)
Created attachment 8996191 [details] [diff] [review]
Remove some unused chromeonly history APIs on Window

Well, back() is used, but only in tests, and those can use history.back().
Attachment #8996191 - Flags: review?(continuation)
(Assignee)

Updated

6 months ago
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.
Blocks: 1479894

Comment 5

6 months ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b75e262fac02
Remove some unused chromeonly history APIs on Window.  r=mccr8

Comment 7

6 months ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/81eb830da3e6
Remove some unused chromeonly history APIs on Window.  r=mccr8

Comment 8

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/81eb830da3e6
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
(Assignee)

Updated

6 months ago
Flags: needinfo?(bzbarsky)
Keywords: dev-doc-needed
(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.