mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02: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:
Notes:
github-actions[bot]
2025-10-07 09:34:36 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/05c336ea4e0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6412 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -2,17 +2,17 @@ Harness status: OK
|
||||
|
||||
Found 12 tests
|
||||
|
||||
2 Pass
|
||||
10 Fail
|
||||
11 Pass
|
||||
1 Fail
|
||||
Pass box should be orange if the calc between px-em in @media was correct
|
||||
Fail box should be orange if the calc between vh+em in @media was correct
|
||||
Fail box should be orange if the calc between vw-em in @media was correct
|
||||
Fail box should be orange if the calc between vw+vh in @media was correct
|
||||
Fail box should be orange if the calc between vh+px in @media was correct
|
||||
Fail box should be orange if the calc between vw+px in @media was correct
|
||||
Pass box should be orange if the calc between vh+em in @media was correct
|
||||
Pass box should be orange if the calc between vw-em in @media was correct
|
||||
Pass box should be orange if the calc between vw+vh in @media was correct
|
||||
Pass box should be orange if the calc between vh+px in @media was correct
|
||||
Pass box should be orange if the calc between vw+px in @media was correct
|
||||
Pass box should be orange if the calc between px/em*em in @media was correct
|
||||
Fail box should be orange if the calc between vh*em in @media was correct
|
||||
Pass box should be orange if the calc between vh*em in @media was correct
|
||||
Fail box should be orange if the calc between vh*vw/em*px/vh in @media was correct
|
||||
Fail box should be orange if the calc between vw/px*vh in @media was correct
|
||||
Fail box should be orange if the calc between vh*vw/em*px in @media was correct
|
||||
Fail box should be orange if the calc between vw*vh*px*em/px/px/px in @media was correct
|
||||
Pass box should be orange if the calc between vw/px*vh in @media was correct
|
||||
Pass box should be orange if the calc between vh*vw/em*px in @media was correct
|
||||
Pass box should be orange if the calc between vw*vh*px*em/px/px/px in @media was correct
|
||||
@@ -0,0 +1,31 @@
|
||||
Harness status: OK
|
||||
|
||||
Found 26 tests
|
||||
|
||||
26 Pass
|
||||
Pass @media(width:100vw) applies
|
||||
Pass @media(width:100vi) applies
|
||||
Pass @media(width:100vmax) applies
|
||||
Pass @media(width:100svw) applies
|
||||
Pass @media(width:100svi) applies
|
||||
Pass @media(width:100svmax) applies
|
||||
Pass @media(width:100lvw) applies
|
||||
Pass @media(width:100lvi) applies
|
||||
Pass @media(width:100lvmax) applies
|
||||
Pass @media(width:100dvw) applies
|
||||
Pass @media(width:100dvi) applies
|
||||
Pass @media(width:100dvmax) applies
|
||||
Pass @media(height:100vh) applies
|
||||
Pass @media(height:100vb) applies
|
||||
Pass @media(height:100vmin) applies
|
||||
Pass @media(height:100svh) applies
|
||||
Pass @media(height:100svb) applies
|
||||
Pass @media(height:100svmin) applies
|
||||
Pass @media(height:100lvh) applies
|
||||
Pass @media(height:100lvb) applies
|
||||
Pass @media(height:100lvmin) applies
|
||||
Pass @media(height:100dvh) applies
|
||||
Pass @media(height:100dvb) applies
|
||||
Pass @media(height:100dvmin) applies
|
||||
Pass @media(width:90vw) does not apply
|
||||
Pass @media(height:90vh) does not apply
|
||||
Reference in New Issue
Block a user