From 987d510dbbec591815a653a19966fd33d1ac4c89 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 19 May 2025 16:10:36 +0100 Subject: [PATCH] LibWeb/CSS: Allow "picture-in-picture" in "display-mode" media feature We don't implement detection for this yet, but it gets us a WPT pass. --- Libraries/LibWeb/CSS/Keywords.json | 1 + Libraries/LibWeb/CSS/MediaFeatures.json | 3 ++- .../expected/wpt-import/css/mediaqueries/display-mode.txt | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Libraries/LibWeb/CSS/Keywords.json b/Libraries/LibWeb/CSS/Keywords.json index abd75df14cf..6b2cd107a82 100644 --- a/Libraries/LibWeb/CSS/Keywords.json +++ b/Libraries/LibWeb/CSS/Keywords.json @@ -366,6 +366,7 @@ "paused", "petite-caps", "pi", + "picture-in-picture", "pixelated", "plaintext", "plus-darker", diff --git a/Libraries/LibWeb/CSS/MediaFeatures.json b/Libraries/LibWeb/CSS/MediaFeatures.json index 6db18552b9c..2beaf64c05b 100644 --- a/Libraries/LibWeb/CSS/MediaFeatures.json +++ b/Libraries/LibWeb/CSS/MediaFeatures.json @@ -64,7 +64,8 @@ "fullscreen", "standalone", "minimal-ui", - "browser" + "browser", + "picture-in-picture" ] }, "dynamic-range": { diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt index c6d1c03e499..d28fa0deb84 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt @@ -2,14 +2,14 @@ Harness status: OK Found 17 tests -11 Pass -6 Fail +12 Pass +5 Fail Pass Should be known: '(display-mode)' Pass Should be known: '(display-mode: standalone)' Pass Should be known: '(display-mode: browser)' Pass Should be known: '(display-mode: minimal-ui)' Pass Should be known: '(display-mode: fullscreen)' -Fail Should be known: '(display-mode: picture-in-picture)' +Pass Should be known: '(display-mode: picture-in-picture)' Fail Should be parseable: '(display-mode: 0)' Pass Should be unknown: '(display-mode: 0)' Fail Should be parseable: '(display-mode: none)'