forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[carousel] Support :focus for ::column::scroll-marker
This CL enables focusability for column scroll marker and updates node traversal code to include column pseudo elements. For now, we can't properly test focus on column scroll markers with WPT test, as getComputedStyle doesn't allow to get nested pseudo elements. Bug: 365680822 Change-Id: Icc283ff2e853f052ce1df40b4793e0a483cbd88c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6040171 Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1388721}
- Loading branch information
1 parent
1abbdf0
commit 1059389
Showing
5 changed files
with
124 additions
and
16 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
77 changes: 77 additions & 0 deletions
77
third_party/blink/web_tests/wpt_internal/css/css-overflow/column-scroll-marker-009.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,77 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Overflow Test: ::column::scroll-marker supports :focus</title> | ||
<link rel="help" href="https://github.com/flackr/carousel/tree/main/fragmentation"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<style> | ||
#container { | ||
overflow: hidden; | ||
columns: 3; | ||
column-fill: auto; | ||
gap: 0; | ||
orphans: 1; | ||
widows: 1; | ||
height: 100px; | ||
border: 15px solid; | ||
line-height: 20px; | ||
scroll-marker-group: before; | ||
background: yellow; | ||
} | ||
#container::scroll-marker-group { | ||
display: flex; | ||
justify-content: space-between; | ||
height: 50px; | ||
background: cyan; | ||
} | ||
#container::column::scroll-marker { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 50px; | ||
height: 50px; | ||
background: hotpink; | ||
content: "*"; | ||
} | ||
#container::column::scroll-marker:focus { | ||
background: blue; | ||
} | ||
</style> | ||
<div style="width:450px;"> | ||
<div id="container"> | ||
First column<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
Second column<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
Third column<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
Fourth column<br> | ||
<br> | ||
<br> | ||
<br> | ||
<br> | ||
Fifth column<br> | ||
</div> | ||
</div> | ||
<script> | ||
promise_test(async t => { | ||
actions_promise = new test_driver.Actions() | ||
.pointerMove(15, 15) | ||
.pointerDown() | ||
.pointerUp() | ||
.send(); | ||
await actions_promise; | ||
assert_equals(getComputedStyle(container, "::column::scroll-marker").backgroundColor, "blue"); | ||
}); | ||
</script> |