[DevTools Release Tasks - Cycle 156] Remove backward compatibility code
Categories
(DevTools :: General, task)
Tracking
(firefox156 fixed)
| Tracking | Status | |
|---|---|---|
| firefox156 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(1 external file)
Per release tasks docs: https://firefox-source-docs.mozilla.org/devtools/backend/backward-compatibility.html
Remove the outdated backward compatible code for v154: https://searchfox.org/firefox-main/search?path=devtools&q=%40backward-compat%20%7B%20version%20154%20%7D
Comment 1•3 months ago
|
||
Removes the 4 remaining @backward-compat { version 154 } sites in devtools, all
related to toggling global highlighters (rulers / measuring tool) through the
target actor configuration's enabledHighlighters option:
- devtools/client/definitions.js, createHighlightButton():
- onClick: drop the
targetConfigurationCommand.supports("enabledHighlighters")
check and the legacy branch which created/showed/hid the highlighters
client-side through the InspectorFront. - isChecked: drop the
"enabledHighlighters" in configurationheuristic and the
legacy fallback based ongetKnownHighlighter(type)?.isShown(). The checked
state now always comes from the pushed configuration.
- onClick: drop the
- devtools/client/fronts/inspector.js: drop the DOCUMENT_EVENT watcher and its
will-navigate listener which cleared the_highlighterscache (the backend now
owns the lifecycle of the globally enabled highlighters across navigations),
as well as the matching unwatchResources call in destroy().hasHighlighter()
is removed with it: it was the only consumer of that cache invalidation and has
no callers left in the tree.getKnownHighlighter()is kept (still used by
highlighters-overlay.js and several tests).
One extra hunk, easy to split out if you'd rather land it separately:
Toolbox.updateToolboxButtonsVisibility() gated "hide the highlighters when the
button is disabled from the options panel" on a cached InspectorFront. That
requirement only existed for the legacy client-side path. With the configuration
path, enabling the rulers from e.g. the console panel and then hiding the button
from the settings panel left the highlighters painted on the page with no way to
turn them off, because no InspectorFront had ever been created. The guard is
dropped; button.isChecked is now the only signal needed, and it cannot throw
(targetConfigurationCommand is always available and configuration defaults to {}).
Testing: no test changes. The legacy branches were only reachable when connecting
to a pre-154 server and had no automated coverage; the surviving configuration path
is covered by
devtools/client/framework/test/browser_toolbox_rulers_button_highlighter_reload.js,
browser_toolbox_measure_button_highlighter_destroy.js,
browser_toolbox_options_disable_buttons.js and
devtools/client/inspector/test/highlighter/browser_inspector_highlighter-viewport-size.js.
Note that these mochitests could not be executed in the environment this patch was
prepared in (no build/objdir available), so please rely on CI for them.
Updated•3 months ago
|
Updated•3 months ago
|
Comment 3•3 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Description
•