Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[MQ4] Implement overflow-block/overflow-inline media query features
https://bugs.webkit.org/show_bug.cgi?id=253662 rdar://106511968 Reviewed by Darin Adler. https://drafts.csswg.org/mediaqueries-4/#mf-overflow-block https://drafts.csswg.org/mediaqueries-4/#mf-overflow-inline * LayoutTests/fast/css/media-query-overflow-block-dynamic-expected.html: Added. * LayoutTests/fast/css/media-query-overflow-block-dynamic.html: Added. * LayoutTests/fast/css/media-query-overflow-block-paged-expected.html: Added. * LayoutTests/fast/css/media-query-overflow-block-paged.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries-expected.txt: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/query/MediaQueryFeatures.cpp: (WebCore::MQ::Features::overflowBlock): (WebCore::MQ::Features::overflowInline): * Source/WebCore/css/query/MediaQueryFeatures.h: Canonical link: https://commits.webkit.org/263088@main
- Loading branch information
Showing
8 changed files
with
121 additions
and
9 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
LayoutTests/fast/css/media-query-overflow-block-dynamic-expected.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,2 @@ | ||
<!DOCTYPE html> | ||
<html style="color: green;"><p>This text should be green.</p></html> |
40 changes: 40 additions & 0 deletions
40
LayoutTests/fast/css/media-query-overflow-block-dynamic.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,40 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<style> | ||
:root { | ||
color: blue; | ||
} | ||
@media (overflow-block: paged) { | ||
:root { | ||
color: red; | ||
} | ||
} | ||
@media (overflow-block: scroll) { | ||
:root { | ||
color: green; | ||
} | ||
} | ||
@media (overflow-block: none) { | ||
:root { | ||
color: red; | ||
} | ||
} | ||
</style> | ||
<p>This text should be green.</p> | ||
<script> | ||
addEventListener("load", () => { | ||
if (!window.internals) | ||
return; | ||
|
||
internals.setPagination("LeftToRightPaginated", 0); | ||
|
||
// Give it a chance to actually render as overflow-block: paged before switching back. | ||
requestAnimationFrame(() => { | ||
setTimeout(() => { | ||
internals.setPagination("Unpaginated", 0); | ||
document.documentElement.classList.remove("reftest-wait"); | ||
}, 0); | ||
}); | ||
}); | ||
</script> | ||
</html> |
2 changes: 2 additions & 0 deletions
2
LayoutTests/fast/css/media-query-overflow-block-paged-expected.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,2 @@ | ||
<!DOCTYPE html> | ||
<html style="color: green;"><p>This text should be green in paginated mode.</p></html> |
28 changes: 28 additions & 0 deletions
28
LayoutTests/fast/css/media-query-overflow-block-paged.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,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<style> | ||
:root { | ||
color: blue; | ||
} | ||
@media (overflow-block: paged) { | ||
:root { | ||
color: green; | ||
} | ||
} | ||
@media (overflow-block: scroll) { | ||
:root { | ||
color: red; | ||
} | ||
} | ||
@media (overflow-block: none) { | ||
:root { | ||
color: red; | ||
} | ||
} | ||
</style> | ||
<p>This text should be green in paginated mode.</p> | ||
<script> | ||
if (window.internals) | ||
internals.setPagination("LeftToRightPaginated", 0); | ||
</script> | ||
</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
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