mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 21:49:42 +00:00
LibWeb: Use document's viewport when resolving lengths in media queries
Previously we would always use the window's viewport which was incorrect if we were within an iframe. This is likely applicable to all uses of `Length::ResolutionContext::for_window`.
This commit is contained in:
parent
c33be71df9
commit
05c336ea4e
Notes:
github-actions[bot]
2025-10-07 09:34:36 +00:00
Author: https://github.com/Calme1709
Commit: 05c336ea4e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6412
Reviewed-by: https://github.com/AtkinsSJ ✅
23 changed files with 198 additions and 83 deletions
|
@ -63,7 +63,7 @@ public:
|
|||
void for_each_effective_rule(TraversalOrder, Function<void(CSSRule const&)> const& callback) const;
|
||||
void for_each_effective_style_producing_rule(Function<void(CSSRule const&)> const& callback) const;
|
||||
// Returns whether the match state of any media queries changed after evaluation.
|
||||
bool evaluate_media_queries(HTML::Window const&);
|
||||
bool evaluate_media_queries(DOM::Document const&);
|
||||
void for_each_effective_keyframes_at_rule(Function<void(CSSKeyframesRule const&)> const& callback) const;
|
||||
|
||||
void add_owning_document_or_shadow_root(DOM::Node& document_or_shadow_root);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue