Skip to content

v0.20.0

Choose a tag to compare

@adamXbot adamXbot released this 31 Aug 06:16
· 38 commits to main since this release

Two fixes to the selector audit, both about not confusing a name with a different name that resembles it.

A name Firefox ships outranks one it merely resembles (#24)

suggest() consulted the shipped-chrome pack last, after both fuzzy matchers, so a token Firefox ships under its own spelling could still be reported as a typo for an unrelated live element. The pack lookup now runs before the fuzzy matchers and after the exact namespace flip: an exact same-name match in the other namespace is direct rename evidence and still wins, but a 0.80-similarity match to a different name never outranks Firefox shipping the literal name.

Also in #24: fxcss upgrade --audit selected upgrade-blockers with != "unresolved", the inverse of what --strict uses, so an offscreen finding — a name the shipped chrome demonstrably still carries — blocked an upgrade. The predicate is now named once in audit.actionable() and called from both places.

A rule scoped to another document is not judged by this window (#25)

@-moz-document binds a block to particular documents, and the audit had no handling for it: extraction was scope-blind, so every token was compared against DOM collected only from the main browser window. Tokens now carry the binding they were written under, and every live-DOM branch is skipped when that binding cannot reach browser.xhtml. The pack is still consulted, since omni.ja carries those documents. A new other-document confidence covers what the pack cannot answer.

Findings are now emitted per (token, scope) rather than per token. write_patch rewrites the exact file:line sites a finding carries, so one verdict spanning occurrences in different documents would rewrite sites the verdict was never about.

The case both came from

WhiteSur's #placesToolbar is the Library window's toolbar in places.xhtml. The live audit never opens that window, so the near-miss branch offered #PlacesToolbar — the main window's bookmarks toolbar, a different element in a different document. Against WhiteSur on Firefox 153 the selector findings drop from two to one and the offscreen tier rises from 78 to 79.

255 unit tests; CI green on Linux, macOS and Windows.