Conversation

johnkenny54

collapseGroups was not detecting a filter when it was in a style rather than an attribute.

This change resolves one regression mismatch (svgs/oxygen-icons-5.113.0/scalable/mimetypes/small/64x64/image-x-adobe-dng.svg) and reduces pixel mismatches by 67.

This type of problem seems like it is probably widespread (including in the same conditional in this plugin, where it is looking for a clip-path). I didn't see any tools to query the style attribute in a standard way. The solution in this PR is not going to scale well - it seems like it would be desirable to have a standardized, efficient way to query/change the style attribute - maybe it's there and I'm missing it?

@KTibow

Why do this instead of getComputedStyle?

@johnkenny54johnkenny54 marked this pull request as ready for review February 4, 2024 16:37
@johnkenny54

Why do this instead of getComputedStyle?

Are you talking about computeStyle()? This seems like it has a huge overhead.

@SethFalco

Are you talking about computeStyle()? This seems like it has a huge overhead.

I'd recommend using computeStyle too. It will also account for the stylesheet.

@johnkenny54

I changed to computeStyle(). Regression results were identical.

I created issue #1953 to begin discussions on the more general issue that style handling is inconsistent, inefficient, and incorrect.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment, but looks good overall!

Edit: Strange… isn't showing the comment… I'll write it again, I guess. ^-^'

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.