Skip to content

fix(highlighters): support HTML elements in mask highlighter and node resolution#3285

Merged
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:fix/mask-highlighter-html
Apr 20, 2026
Merged

fix(highlighters): support HTML elements in mask highlighter and node resolution#3285
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:fix/mask-highlighter-html

Conversation

@kumilingus

Copy link
Copy Markdown
Contributor

Summary

  • Mask highlighter falls back to a <rect/> mask for HTML nodes (e.g. inside foreignObject), using V.isSVGGraphicsElement() check — same pattern as text/image elements
  • HighlighterView.findNode() relaxed from SVGElement to Element so HTML nodes can be passed directly

Test plan

  • Added test: highlighting an HTML node resolves correctly via HighlighterView.add()
  • Added test: mask highlighter creates rect-based mask for HTML elements
  • All existing highlighter tests pass

🤖 Generated with Claude Code

… resolution

The mask highlighter now falls back to a rect-based mask for non-SVG
nodes (e.g. HTML elements inside foreignObject), matching the existing
fallback for text/image elements.

Also relaxes HighlighterView.findNode() validation from SVGElement to
Element so HTML nodes can be highlighted directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kumilingus kumilingus requested a review from Geliogabalus April 20, 2026 10:31
@Geliogabalus Geliogabalus merged commit dcd60ac into clientIO:master Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants