Remove grip argument from unHighlightDomElement()
Categories
(DevTools :: General, task, P3)
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.
Updated•4 years ago
|
Description
•