Skip to content

Commit

Permalink
[carousel] Fix layout parent style for carousel pseudos
Browse files Browse the repository at this point in the history
Fixed: 392661390
Change-Id: Iea39c18abd88032b948bda10adabfd3abac07bfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211837
Reviewed-by: Morten Stenshorne <[email protected]>
Commit-Queue: Daniil Sakhapov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1413415}
  • Loading branch information
danielsakhapov authored and chromium-wpt-export-bot committed Jan 30, 2025
1 parent 316fa8a commit 364ae9a
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
20 changes: 20 additions & 0 deletions css/css-overflow/root-element-layout-parent-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow Test: root element with ::scroll-marker-group and ::scroll-buttons() doesn't crasah</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group">
<style>
html {
overflow: auto;
scroll-marker-group: before;
}
html::scroll-marker-group {
width: 100px;
height: 100px;
}
html::scroll-button(left) {
content: "";
width: 100px;
height: 100px;
}
</style>
35 changes: 35 additions & 0 deletions css/css-overflow/scroll-buttons-layout-parent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow Test: ::scroll-buttons() have correct layout parent</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<style>
#sc {
z-index: 1;
overflow: hidden;
width: 100px;
height: 100px;
background: red;
}
#sc::scroll-button(left) {
content: "";
border: none;
margin-left: -100px;
z-index: 2;
width: 50px;
height: 100px;
background: green;
}
#sc::scroll-button(right) {
content: "";
border: none;
z-index: 2;
width: 50px;
height: 100px;
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display:flex;">
<div id="sc"></div>
</div>
26 changes: 26 additions & 0 deletions css/css-overflow/scroll-marker-group-layout-parent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow Test: ::scroll-marker-group has correct layout parent</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<style>
#sc {
z-index: 1;
overflow: hidden;
scroll-marker-group: before;
margin-left: -100px;
width: 100px;
height: 100px;
background: red;
}
#sc::scroll-marker-group {
z-index: 2;
width: 100px;
height: 100px;
background: green;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display:flex;">
<div id="sc"></div>
</div>

0 comments on commit 364ae9a

Please sign in to comment.