mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibWeb/CSS: Store the style sheet's source text on the CSSStyleSheet
This is to enable the inspector to show this source. There's a fairly hefty FIXME here because duplicating the source text is a significant waste of memory. But I don't want to get too sidetracked.
This commit is contained in:
@@ -371,4 +371,14 @@ void CSSStyleSheet::recalculate_namespaces()
|
||||
}
|
||||
}
|
||||
|
||||
void CSSStyleSheet::set_source_text(String source)
|
||||
{
|
||||
m_source_text = move(source);
|
||||
}
|
||||
|
||||
Optional<String> CSSStyleSheet::source_text(Badge<DOM::Document>) const
|
||||
{
|
||||
return m_source_text;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user