mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-22 02:52:52 +00:00
LibWeb/CSS: Implement the CSSImportRule.media
attribute
This commit is contained in:
parent
b93d2b7be2
commit
cbb169820a
Notes:
github-actions[bot]
2025-04-02 13:56:35 +00:00
Author: https://github.com/tcl3
Commit: cbb169820a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4183
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 11 additions and 1 deletions
|
@ -174,6 +174,15 @@ void CSSImportRule::set_style_sheet(GC::Ref<CSSStyleSheet> style_sheet)
|
|||
m_document->invalidate_style(DOM::StyleInvalidationReason::CSSImportRule);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-cssimportrule-media
|
||||
GC::Ptr<MediaList> CSSImportRule::media() const
|
||||
{
|
||||
// The media attribute must return the value of the media attribute of the associated CSS style sheet.
|
||||
if (!m_style_sheet)
|
||||
return nullptr;
|
||||
return m_style_sheet->media();
|
||||
}
|
||||
|
||||
Optional<String> CSSImportRule::supports_text() const
|
||||
{
|
||||
if (!m_supports)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue