Check for filter in style as well as attribute.#1952
Merged
Conversation
Collaborator
|
Why do this instead of getComputedStyle? |
Contributor
Author
Are you talking about |
Member
I'd recommend using |
Contributor
Author
|
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. |
XhmikosR
reviewed
Feb 7, 2024
Co-authored-by: Seth Falco <seth@falco.fun>
SethFalco
reviewed
Feb 7, 2024
SethFalco
reviewed
Feb 7, 2024
Co-authored-by: Seth Falco <seth@falco.fun>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?