-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement overflow-block and overflow-inline media features.
In current implementation only printing vs other devices is differentiated. Currently overflow-block will not support (none) as there is no way to understand we have a billboard. https://drafts.csswg.org/mediaqueries-4/#mf-overflow-block https://drafts.csswg.org/mediaqueries-4/#mf-overflow-inline Fixed: 790911 Change-Id: I6462b1685716f66f5a6267d26bf3f96e864bd58d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4279967 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1108951}
- Loading branch information
1 parent
70cc39b
commit cbddc7d
Showing
10 changed files
with
185 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
third_party/blink/web_tests/external/wpt/css/mediaqueries/overflow-media-features.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Media Queries Test: overflow media features</title> | ||
<link rel="help" href="https://drafts.csswg.org/mediaqueries-4/#descdef-media-update"> | ||
<meta assert="The test is supposed to be run on computer displays as it will no match otherwise"> | ||
<script type="text/javascript" src="/resources/testharness.js"></script> | ||
<script type="text/javascript" src="/resources/testharnessreport.js"></script> | ||
<script type="text/javascript" src="resources/matchmedia-utils.js"></script> | ||
|
||
<script> | ||
query_should_be_known("(overflow-inline)"); | ||
query_should_be_known("(overflow-inline: none)"); | ||
query_should_be_known("(overflow-inline: scroll)"); | ||
|
||
query_should_be_unknown("overflow-inline"); | ||
query_should_be_unknown("(overflow-inline: ?)"); | ||
query_should_be_unknown("(overflow-inline: 10px)"); | ||
query_should_be_unknown("(overflow-inline: 0)"); | ||
|
||
query_should_be_known("(overflow-block)"); | ||
query_should_be_known("(overflow-block: none)"); | ||
query_should_be_known("(overflow-block: scroll)"); | ||
query_should_be_known("(overflow-block: paged)"); | ||
|
||
query_should_be_unknown("overflow-block"); | ||
query_should_be_unknown("(overflow-block: ?)"); | ||
query_should_be_unknown("(overflow-block: 10px)"); | ||
query_should_be_unknown("(overflow-block: 0)"); | ||
|
||
test(() => { | ||
let match_standard = window.matchMedia("(overflow-inline: scroll)"); | ||
assert_true(match_standard.matches); | ||
}, "Check that overflow-inline: scroll always matches non printing documents"); | ||
|
||
test(() => { | ||
let match_standard = window.matchMedia("(overflow-block: scroll)"); | ||
assert_true(match_standard.matches); | ||
}, "Check that overflow-block: scroll always matches non printing documents"); | ||
|
||
test(() => { | ||
let match_standard = window.matchMedia("(overflow-inline: none)"); | ||
assert_false(match_standard.matches); | ||
}, "Check that overflow-inline: none doesn't match non printing documents"); | ||
|
||
test(() => { | ||
let match_standard = window.matchMedia("(overflow-block: none)"); | ||
assert_false(match_standard.matches); | ||
}, "Check that overflow-block: none doesn't match non printing documents"); | ||
|
||
test(() => { | ||
let match_standard = window.matchMedia("(overflow-block: paged)"); | ||
assert_false(match_standard.matches); | ||
}, "Check that overflow-block: paged doesn't match non printing documents"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters