mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Move media-query-list serialization code to MediaQuery.{h,cpp}
It's not a complicated algorithm, but having it in one place instead of 2, and with spec comments, is nice. :^)
This commit is contained in:
parent
caac0706c2
commit
46bba44f8b
Notes:
sideshowbarker
2024-07-18 02:20:35 +09:00
Author: https://github.com/AtkinsSJ
Commit: 46bba44f8b
Pull-request: https://github.com/SerenityOS/serenity/pull/10489
Reviewed-by: https://github.com/linusg ✅
4 changed files with 18 additions and 6 deletions
|
@ -29,9 +29,7 @@ MediaQueryList::~MediaQueryList()
|
|||
// https://drafts.csswg.org/cssom-view/#dom-mediaquerylist-media
|
||||
String MediaQueryList::media() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.join(", ", m_media);
|
||||
return builder.to_string();
|
||||
return serialize_a_media_query_list(m_media);
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom-view/#dom-mediaquerylist-matches
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue