1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibWeb: Implement Window::query_media_feature()

This method provides the needed information to evaluate media queries.

Every feature in Media Queries Level 4 is present, either as code or as
a FIXME: https://www.w3.org/TR/mediaqueries-4/#media-descriptor-table
There's a draft Level 5 which I have ignored for now.

Some are unimplemented for now since we do not have access to the
requested information. Some require StyleValue types that we do not yet
support. Many are hard-coded for now since we do not (and may never)
support monochrome or text-only displays for Browser.
This commit is contained in:
Sam Atkins 2021-10-03 19:26:17 +01:00 committed by Andreas Kling
parent de82764f2f
commit fd51b02f9d
2 changed files with 45 additions and 0 deletions

View file

@ -84,6 +84,7 @@ public:
NonnullRefPtr<CSS::CSSStyleDeclaration> get_computed_style(DOM::Element&) const;
NonnullRefPtr<CSS::MediaQueryList> match_media(String);
RefPtr<CSS::StyleValue> query_media_feature(FlyString const&) const;
float scroll_x() const;
float scroll_y() const;