Bug 261117 - SVGStyleElement::attributeChanged does much less than HTMLStyleElement
Summary: SVGStyleElement::attributeChanged does much less than HTMLStyleElement
Status: RESOLVED DUPLICATE of bug 259979
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-04 09:13 PDT by Anne van Kesteren
Modified: 2023-09-11 15:31 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2023-09-04 09:13:03 PDT
I haven't verified if that is the reason for the failure in https://wpt.fyi/results/html/semantics/document-metadata/the-style-element/style_type_svg.svg, but it undoubtedly will result in other failures. Perhaps these elements should share more logic somehow.
Comment 1 Ahmad Saleem 2023-09-04 10:27:29 PDT
I fixed it.

https://commits.webkit.org/266744@main
Comment 2 Anne van Kesteren 2023-09-04 22:24:31 PDT
Ah, I was wondering why the current code would not pass that test. I think what will end up failing is something like this:

<svg:style type="blah">
body { color:lime }
</svg:style>

document.querySelector("style").type = "text/css"

because there is nothing in SVGStyleElement::attributeChanged to trigger style sheet changes. Setting the type doesn't do much on its own. HTMLStyleElement::attributeChanged does seem to account for that.
Comment 3 Radar WebKit Bug Importer 2023-09-11 09:13:15 PDT
<rdar://problem/115293825>
Comment 4 Said Abou-Hallawa 2023-09-11 15:31:17 PDT

*** This bug has been marked as a duplicate of bug 259979 ***