Skip to content

Commit

Permalink
[carousel] Fix AttachLayoutTree for ::scroll-marker expecting parent
Browse files Browse the repository at this point in the history
If ::scroll-marker is inside the element that requires style recalc,
but not layout, context.parent is nullptr. So, we have to if()
attachment instead of CHECK(context.parent).

Fixed: 394980089
Change-Id: Iefdc99a1b65cabeb91d1cf5d7f79e47a0a787e0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6298048
Reviewed-by: Rune Lillesveen <[email protected]>
Commit-Queue: Daniil Sakhapov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1423840}
  • Loading branch information
danielsakhapov authored and chromium-wpt-export-bot committed Feb 24, 2025
1 parent f2615dc commit 6f1558a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions css/css-overflow/scroll-markers-inside-canvas-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<link rel="help" href="crbug.com/394980089">
<style>
#scroller { overflow: scroll; scroll-marker-group: after; }
#item::scroll-marker { content: "X" }
</style>
<div id="scroller">
<canvas>
<div id="item">You don't see me</div>
</canvas>
</div>
16 changes: 16 additions & 0 deletions css/css-overflow/scroll-markers-inside-select-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<link rel="help" href="crbug.com/394980089">
<style>
#scroller {
overflow: scroll;
scroll-marker-group: after;
}
#scroller div::scroll-marker {
content: counter(test);
}
</style>
<select>
<div id="scroller">
<div></div>
</div>
</select>

0 comments on commit 6f1558a

Please sign in to comment.