Open Bug 1525189 Opened 6 years ago Updated 2 months ago

Link definitions in WebIDL files to uses in JS

Categories

(Webtools :: Searchfox, defect)

defect
Not set
normal

Tracking

(Not tracked)

REOPENED

People

(Reporter: botond, Unassigned)

References

Details

STR:

  1. Load https://searchfox.org/mozilla-central/source/mobile/android/components/SessionStore.js
  2. Click on restoreScrollPosition on this line.
  3. Click "Go to definition of restoreScrollPosition"

Expected results:

Searchfox navigates to the definition of the function in question in SessionStoreUtils.webidl.

Actual results:

Searchfox navigates to an unrelated definition of the same name in aboutPolicies.js.

Summary: "Go to definition" on JS method goes to the wrong place → "Go to definition" on JS function goes to the wrong place

That WebIDL file doesn't seem to have any definition information hooked up for it. If you click on anything, it only has the "search for substring" option. I don't recall if that's expected behavior or maybe something broke.

Summary: "Go to definition" on JS function goes to the wrong place → JS function use does not find definition in Chrome WebIDL

I think this is a dupe of bug 1416899, or at least depends on it.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

I suppose this is about the JS part of WebIDL, and that bug is talking about the C++ part.

Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
See Also: → 1416899
Summary: JS function use does not find definition in Chrome WebIDL → Link definitions in WebIDL files to uses in JS

Offhand, this seems like it would be a lot trickier than the C++ part of it, because the analysis would have to understand what implementations are defined on the global. It would be quite cool, though, if you could click on some random DOM API and get to the C++ implementation in a few clicks (with the combination of both of these bugs).

See Also: → 1775130
You need to log in before you can comment on or make changes to this bug.