[scrollbar-gutter] Fix "scrollbar-gutter: stable both" clipping on macOS [chromium/src : main]

0 views
Skip to first unread message

David Grogan (Gerrit)

unread,
Jan 5, 2026, 2:31:32 AM (6 days ago) Jan 5
to David Grogan, Ian Kilpatrick, Stefan Zager, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Ian Kilpatrick and Stefan Zager

David Grogan added 3 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
David Grogan . resolved

Hi Stefan and Ian,

Please review this CL that you've consulted on in the past. Its hopefully approaching its final form here.

https://chromium-review.googlesource.com/c/chromium/src/+/7121439 has your original changes from a few months ago in case you want to look.

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3129, Patchset 2: state.contents_rect = {
David Grogan . unresolved

Example 2, from bottom left of scrollbar-gutter-content-overflowing.html:

```html
<div style="width: 185px; height: 185px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable both-edges; will-change: transform;">
<div style="width: 500px; height: 50px; margin-left: -100px;"></div>
<div style="width: 185px; height: 500px;"></div>
</div>
```

Before this change, state.contents_size was `400x550`. This worked!

After this change, `state.contents_rect = 16,1 400x550` _before_ the `Union`. This **breaks** this example's rendering, with the contents not painting over the left gutter even though it should, because of the -margin.

Then, after we `Union` with `state.container_rect = 1,1 170x185`, we get the final `state.contents_rect = 1,1 415x550`, which DOES work.

Line 3129, Patchset 2: state.contents_rect = {
David Grogan . unresolved

Example 1, from bottom middle of -003.html:

```html
<div style="width: 200px; height: 200px; overflow-y: scroll; scrollbar-gutter: stable both-edges; will-change: transform;">
<div style="width: 200px; height: 400px;"></div>
</div>
```

Before this change, state.contents_size was `170x400`. Each scrollbar/gutter was 15px wide. This resulted in the right-most 15px of content being (incorrectly) clipped because this box had an implicit offset of `0,0`.

After this change, `state.contents_rect = 15,0 170x400` _before_ the `Union`. This on its own works for this case.

Then, after we `Union` with `state.container_rect = 0,0 185x200`, we get the final `state.contents_rect = 0,0 185x400`. This still works.

Open in Gerrit

Related details

Attention is currently required from:
  • Ian Kilpatrick
  • Stefan Zager
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
Gerrit-Change-Number: 7392466
Gerrit-PatchSet: 5
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
Gerrit-CC: David Bokan <bo...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Stefan Zager <sza...@chromium.org>
Gerrit-Attention: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-Comment-Date: Mon, 05 Jan 2026 07:31:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Grogan (Gerrit)

unread,
Jan 5, 2026, 2:38:33 AM (6 days ago) Jan 5
to David Grogan, Ian Kilpatrick, Stefan Zager, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from Ian Kilpatrick and Stefan Zager

David Grogan added 1 comment

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3129, Patchset 2: state.contents_rect = {
David Grogan . unresolved

Example 2, from bottom left of scrollbar-gutter-content-overflowing.html:

```html
<div style="width: 185px; height: 185px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable both-edges; will-change: transform;">
<div style="width: 500px; height: 50px; margin-left: -100px;"></div>
<div style="width: 185px; height: 500px;"></div>
</div>
```

Before this change, state.contents_size was `400x550`. This worked!

After this change, `state.contents_rect = 16,1 400x550` _before_ the `Union`. This **breaks** this example's rendering, with the contents not painting over the left gutter even though it should, because of the -margin.

Then, after we `Union` with `state.container_rect = 1,1 170x185`, we get the final `state.contents_rect = 1,1 415x550`, which DOES work.

David Grogan

Oops, the scroller had `border: 1px solid` when I logged all the geometry for this example. I accidentally omitted that property from the markup here, but it explains the 1s and 16s.

Gerrit-Comment-Date: Mon, 05 Jan 2026 07:38:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Grogan <dgr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Stefan Zager (Gerrit)

unread,
Jan 5, 2026, 12:24:32 PM (6 days ago) Jan 5
to David Grogan, Ian Kilpatrick, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from David Grogan and Ian Kilpatrick

Stefan Zager added 1 comment

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3132, Patchset 5 (Latest): box.ScrollableOverflowRect().PixelSnappedOffset() +
Stefan Zager . unresolved

Is `box.ScrollableOverflowRect().PixelSnappedOffset()` the same as `state.container_rect.location`? If it is, then I think using the latter formulation here makes the code easier to grok. If it's not, then can you add a comment (or replace the current comment) explaining how they are different?

Open in Gerrit

Related details

Attention is currently required from:
  • David Grogan
  • Ian Kilpatrick
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
Gerrit-Change-Number: 7392466
Gerrit-PatchSet: 5
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
Gerrit-CC: David Bokan <bo...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: David Grogan <dgr...@chromium.org>
Gerrit-Attention: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-Comment-Date: Mon, 05 Jan 2026 17:24:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Grogan (Gerrit)

unread,
Jan 6, 2026, 2:18:16 AM (5 days ago) Jan 6
to David Grogan, Ian Kilpatrick, Stefan Zager, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from David Grogan and Ian Kilpatrick

David Grogan voted and added 1 comment

Votes added by David Grogan

Commit-Queue+1

1 comment

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3132, Patchset 5 (Latest): box.ScrollableOverflowRect().PixelSnappedOffset() +
Stefan Zager . unresolved

Is `box.ScrollableOverflowRect().PixelSnappedOffset()` the same as `state.container_rect.location`? If it is, then I think using the latter formulation here makes the code easier to grok. If it's not, then can you add a comment (or replace the current comment) explaining how they are different?

David Grogan

Heh, I got `box.ScrollableOverflowRect().PixelSnappedOffset()` from you.

(And I assume you meant `state.container_rect.origin_`.) They are different, but I don't know the terminology to describe them accurately and succinctly.

I want to say that `container_rect.origin` is the distance from the top left of the container's outer border box to the top left of the inner scroll box, not including any gutters. By contrast, `ScrollableOverflowRect().PixelSnappedOffset()` DOES include the gutters.

So, in the horizontal-tb ltr case,
```
<div style="width: 200px; height: 200px; border: 1px solid; scrollbar-gutter: stable both-edges; overflow: auto;">
<div style="width: 100px; height: 400px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = 16,1
```
Then `rtl` changes the scroll origin:
```
<div style="width: 200px; height: 200px; border: 1px solid; direction: rtl; overflow: auto;">
<div style="width: 400px; height: 100px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = -199,1
```

So `ScrollableOverflowRect().PixelSnappedOffset()` looks like the distance between the top-left of the container's border box and the top-left of the scrollable overflow rect.

Do you know I should describe these?

(I've been looking at this picture: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/doc/rtl-tb-scroll.png .)

Gerrit-Comment-Date: Tue, 06 Jan 2026 07:18:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Stefan Zager <sza...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Ian Kilpatrick (Gerrit)

unread,
Jan 8, 2026, 3:33:04 PM (3 days ago) Jan 8
to David Grogan, Code Review Nudger, Stefan Zager, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from David Grogan

Ian Kilpatrick voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • David Grogan
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
Gerrit-Change-Number: 7392466
Gerrit-PatchSet: 5
Gerrit-Owner: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: David Bokan <bo...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: David Grogan <dgr...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 20:32:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Stefan Zager (Gerrit)

unread,
Jan 9, 2026, 12:06:44 PM (2 days ago) Jan 9
to David Grogan, Ian Kilpatrick, Code Review Nudger, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org
Attention needed from David Grogan

Stefan Zager voted and added 2 comments

Votes added by Stefan Zager

Code-Review+1

2 comments

Patchset-level comments
Stefan Zager . resolved

lgtm

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3132, Patchset 5 (Latest): box.ScrollableOverflowRect().PixelSnappedOffset() +
Stefan Zager . unresolved

Is `box.ScrollableOverflowRect().PixelSnappedOffset()` the same as `state.container_rect.location`? If it is, then I think using the latter formulation here makes the code easier to grok. If it's not, then can you add a comment (or replace the current comment) explaining how they are different?

David Grogan

Heh, I got `box.ScrollableOverflowRect().PixelSnappedOffset()` from you.

(And I assume you meant `state.container_rect.origin_`.) They are different, but I don't know the terminology to describe them accurately and succinctly.

I want to say that `container_rect.origin` is the distance from the top left of the container's outer border box to the top left of the inner scroll box, not including any gutters. By contrast, `ScrollableOverflowRect().PixelSnappedOffset()` DOES include the gutters.

So, in the horizontal-tb ltr case,
```
<div style="width: 200px; height: 200px; border: 1px solid; scrollbar-gutter: stable both-edges; overflow: auto;">
<div style="width: 100px; height: 400px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = 16,1
```
Then `rtl` changes the scroll origin:
```
<div style="width: 200px; height: 200px; border: 1px solid; direction: rtl; overflow: auto;">
<div style="width: 400px; height: 100px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = -199,1
```

So `ScrollableOverflowRect().PixelSnappedOffset()` looks like the distance between the top-left of the container's border box and the top-left of the scrollable overflow rect.

Do you know I should describe these?

(I've been looking at this picture: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/doc/rtl-tb-scroll.png .)

Stefan Zager

OK I understand better now, no need to document this (I don't think it would be all that helpful).

Gerrit-Comment-Date: Fri, 09 Jan 2026 17:06:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Stefan Zager <sza...@chromium.org>
Comment-In-Reply-To: David Grogan <dgr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

David Grogan (Gerrit)

unread,
Jan 9, 2026, 12:52:51 PM (2 days ago) Jan 9
to David Grogan, Stefan Zager, Ian Kilpatrick, Code Review Nudger, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

David Grogan voted and added 3 comments

Votes added by David Grogan

Commit-Queue+2

3 comments

File third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
Line 3129, Patchset 2: state.contents_rect = {
David Grogan . resolved

Example 1, from bottom middle of -003.html:

```html
<div style="width: 200px; height: 200px; overflow-y: scroll; scrollbar-gutter: stable both-edges; will-change: transform;">
<div style="width: 200px; height: 400px;"></div>
</div>
```

Before this change, state.contents_size was `170x400`. Each scrollbar/gutter was 15px wide. This resulted in the right-most 15px of content being (incorrectly) clipped because this box had an implicit offset of `0,0`.

After this change, `state.contents_rect = 15,0 170x400` _before_ the `Union`. This on its own works for this case.

Then, after we `Union` with `state.container_rect = 0,0 185x200`, we get the final `state.contents_rect = 0,0 185x400`. This still works.

David Grogan

Acknowledged

Line 3129, Patchset 2: state.contents_rect = {
David Grogan . resolved

Example 2, from bottom left of scrollbar-gutter-content-overflowing.html:

```html
<div style="width: 185px; height: 185px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable both-edges; will-change: transform;">
<div style="width: 500px; height: 50px; margin-left: -100px;"></div>
<div style="width: 185px; height: 500px;"></div>
</div>
```

Before this change, state.contents_size was `400x550`. This worked!

After this change, `state.contents_rect = 16,1 400x550` _before_ the `Union`. This **breaks** this example's rendering, with the contents not painting over the left gutter even though it should, because of the -margin.

Then, after we `Union` with `state.container_rect = 1,1 170x185`, we get the final `state.contents_rect = 1,1 415x550`, which DOES work.

David Grogan

Oops, the scroller had `border: 1px solid` when I logged all the geometry for this example. I accidentally omitted that property from the markup here, but it explains the 1s and 16s.

David Grogan

Acknowledged

Line 3132, Patchset 5 (Latest): box.ScrollableOverflowRect().PixelSnappedOffset() +
Stefan Zager . resolved

Is `box.ScrollableOverflowRect().PixelSnappedOffset()` the same as `state.container_rect.location`? If it is, then I think using the latter formulation here makes the code easier to grok. If it's not, then can you add a comment (or replace the current comment) explaining how they are different?

David Grogan

Heh, I got `box.ScrollableOverflowRect().PixelSnappedOffset()` from you.

(And I assume you meant `state.container_rect.origin_`.) They are different, but I don't know the terminology to describe them accurately and succinctly.

I want to say that `container_rect.origin` is the distance from the top left of the container's outer border box to the top left of the inner scroll box, not including any gutters. By contrast, `ScrollableOverflowRect().PixelSnappedOffset()` DOES include the gutters.

So, in the horizontal-tb ltr case,
```
<div style="width: 200px; height: 200px; border: 1px solid; scrollbar-gutter: stable both-edges; overflow: auto;">
<div style="width: 100px; height: 400px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = 16,1
```
Then `rtl` changes the scroll origin:
```
<div style="width: 200px; height: 200px; border: 1px solid; direction: rtl; overflow: auto;">
<div style="width: 400px; height: 100px;">
```
```
state.container_rect.origin() = 1,1
box.ScrollableOverflowRect().PixelSnappedOffset() = -199,1
```

So `ScrollableOverflowRect().PixelSnappedOffset()` looks like the distance between the top-left of the container's border box and the top-left of the scrollable overflow rect.

Do you know I should describe these?

(I've been looking at this picture: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/doc/rtl-tb-scroll.png .)

Stefan Zager

OK I understand better now, no need to document this (I don't think it would be all that helpful).

David Grogan

Acknowledged

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
    Gerrit-Change-Number: 7392466
    Gerrit-PatchSet: 5
    Gerrit-Owner: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Jan 2026 17:52:40 +0000
    satisfied_requirement
    open
    diffy

    Blink W3C Test Autoroller (Gerrit)

    unread,
    Jan 9, 2026, 1:00:56 PM (2 days ago) Jan 9
    to David Grogan, Stefan Zager, Ian Kilpatrick, Code Review Nudger, Chromium LUCI CQ, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

    Message from Blink W3C Test Autoroller

    Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/57111.

    When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

    WPT Export docs:
    https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
    Gerrit-Change-Number: 7392466
    Gerrit-PatchSet: 5
    Gerrit-Owner: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Jan 2026 18:00:46 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Jan 9, 2026, 2:21:14 PM (2 days ago) Jan 9
    to David Grogan, Blink W3C Test Autoroller, Stefan Zager, Ian Kilpatrick, Code Review Nudger, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    [scrollbar-gutter] Fix "scrollbar-gutter: stable both" clipping on macOS

    Previously, ScrollPaintPropertyNode only stored contents_size with no
    offset, effectively assuming the content always started at the offset
    (0,0). With scrollbar gutters appearing on the left, that is no longer
    accurate.

    Because the code assumed an offset of 0, the contents_rect was
    positioned too far to the left relative to the actual content. This
    caused the right-most part of the content to fall outside the calculated
    layer bounds, resulting in incorrect clipping on the right side.

    This CL changes contents_size to contents_rect in
    ScrollPaintPropertyNode to allow specifying an explicit offset.

    In PaintPropertyTreeBuilder, we now:
    1. Calculate the contents_rect offset relative to the container's border
    box, correctly accounting for the gutter shift.
    2. Union contents_rect with container_rect. This ensures the scrolling
    contents layer fully covers the scrollport (including the gutter),
    preventing clipping of overflowing content in the gutter area.
    Fixed: 40064879
    Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
    Reviewed-by: Ian Kilpatrick <ikilp...@chromium.org>
    Reviewed-by: Stefan Zager <sza...@chromium.org>
    Commit-Queue: David Grogan <dgr...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1567083}
    Files:
    • M third_party/blink/renderer/core/frame/visual_viewport.cc
    • M third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
    • M third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor_test.cc
    • M third_party/blink/renderer/platform/graphics/paint/scroll_paint_property_node.cc
    • M third_party/blink/renderer/platform/graphics/paint/scroll_paint_property_node.h
    • M third_party/blink/renderer/platform/runtime_enabled_features.json5
    • M third_party/blink/renderer/platform/testing/paint_property_test_helpers.h
    • A third_party/blink/web_tests/external/wpt/css/css-overflow/scrollbar-gutter-003.html
    • M third_party/blink/web_tests/wpt_internal/css/css-overflow/scrollbar-gutter-content-overflowing-ref.html
    • M third_party/blink/web_tests/wpt_internal/css/css-overflow/scrollbar-gutter-content-overflowing.html
    Change size: M
    Delta: 10 files changed, 134 insertions(+), 11 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Stefan Zager, +1 by Ian Kilpatrick
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
    Gerrit-Change-Number: 7392466
    Gerrit-PatchSet: 6
    Gerrit-Owner: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    open
    diffy
    satisfied_requirement

    Blink W3C Test Autoroller (Gerrit)

    unread,
    Jan 9, 2026, 4:28:18 PM (2 days ago) Jan 9
    to Chromium LUCI CQ, David Grogan, Stefan Zager, Ian Kilpatrick, Code Review Nudger, David Bokan, chromium...@chromium.org, Dirk Schulze, Kenneth Rohde Christiansen, Stephen Chenney, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, drott+bl...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

    Message from Blink W3C Test Autoroller

    The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/57111

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I2bdb8adc47d115d7163e13761283b353e28de6aa
    Gerrit-Change-Number: 7392466
    Gerrit-PatchSet: 6
    Gerrit-Owner: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Grogan <dgr...@chromium.org>
    Gerrit-Reviewer: Ian Kilpatrick <ikilp...@chromium.org>
    Gerrit-Reviewer: Stefan Zager <sza...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Kenneth Rohde Christiansen <kenneth.ch...@gmail.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Jan 2026 21:28:13 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages