mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb/CSS: Store CSSStyleSheet location as a URL
We already have a URL when we construct these, and we want a URL later, so avoid serializing and re-parsing it.
This commit is contained in:
committed by
Tim Ledbetter
parent
5cc371d54c
commit
da1ff1ba40
Notes:
github-actions[bot]
2025-04-09 17:48:14 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/da1ff1ba406 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4285 Reviewed-by: https://github.com/tcl3 ✅
@@ -27,6 +27,13 @@ void StyleSheet::visit_edges(Cell::Visitor& visitor)
|
||||
visitor.visit(m_media);
|
||||
}
|
||||
|
||||
Optional<String> StyleSheet::href() const
|
||||
{
|
||||
if (m_location.has_value())
|
||||
return m_location->to_string();
|
||||
return {};
|
||||
}
|
||||
|
||||
void StyleSheet::set_owner_node(DOM::Element* element)
|
||||
{
|
||||
m_owner_node = element;
|
||||
|
||||
Reference in New Issue
Block a user