Open Bug 1671154 Opened 4 years ago Updated 4 years ago

Remove grip argument from unHighlightDomElement()

Categories

(DevTools :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: rcaliman, Unassigned)

References

Details

After Bug 1623667, the unHighlightDomElement() methods throughout DevTools panels no longer need a grip argument in order to find the currently highlighted element and hide it. All methods end up calling Toolbox.getHighlighter().unhighlight() which doesn't use the grip.

This is based on the assumption that only one element may be highlighted at any given time. While this assumption is true, the grip argument is no longer necessary (you can't unhighlight any node other than the currently highlighted one, regardless of what grip you pass).

Call sites for unHighlightDomElement() should be updated to remove the grip argument.
To avoid confusion, the method name should probably be updated too.

History

Previously, in some circumstances, the unHighlightDomElement() did not call through to Toolbox.getHighlighter().unhighlight() but used the grip to get a NodeFront, then access the HighlighterFront from it and call .hide() directly on it. See this historical version for Inspector Sidebar Extensions.

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