mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +00:00
LibWeb/CSS: Give all style values a visit_edges() method
Having this hidden away in ImageStyleValue meant that CSSStyleProperties (and anyone else who holds style values) had to know exactly which types need visiting. This is a footgun waiting to happen, so make this a virtual method on CSSStyleValue instead.
This commit is contained in:
parent
c4bb74f40b
commit
a2c89f585f
Notes:
github-actions[bot]
2025-03-27 11:54:20 +00:00
Author: https://github.com/AtkinsSJ
Commit: a2c89f585f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4106
4 changed files with 9 additions and 3 deletions
|
@ -30,6 +30,7 @@ ImageStyleValue::~ImageStyleValue() = default;
|
|||
|
||||
void ImageStyleValue::visit_edges(JS::Cell::Visitor& visitor) const
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
// FIXME: visit_edges in non-GC allocated classes is confusing pattern.
|
||||
// Consider making CSSStyleValue to be GC allocated instead.
|
||||
visitor.visit(m_resource_request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue