Include filters in SVG occlusion tests [chromium/src : main]

1 view
Skip to first unread message

Philip Rogers (Gerrit)

unread,
May 24, 2026, 5:36:48 PM (2 days ago) May 24
to Fredrik Söderquist, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, fmalit...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, zol...@webkit.org
Attention needed from Fredrik Söderquist

Philip Rogers voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • 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: Ib2cad21105fd829d0cd744a698907fe6dd999a3c
Gerrit-Change-Number: 7858119
Gerrit-PatchSet: 22
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Sun, 24 May 2026 21:36:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
May 25, 2026, 8:12:44 AM (19 hours ago) May 25
to Philip Rogers, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, fmalit...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, zol...@webkit.org
Attention needed from Philip Rogers

Fredrik Söderquist added 5 comments

File third_party/blink/renderer/core/layout/svg/layout_svg_container.h
Line 86, Patchset 22 (Latest): gfx::RectF ComputeVisualOverflowRectIncludingFilters() const {
Fredrik Söderquist . unresolved
```suggestion
gfx::RectF ComputeContentVisualOverflowRectIncludingFilters() const {
```
?
File third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc
Line 547, Patchset 22 (Latest): if (is_visual_overflow || hit_rules.can_hit_bounding_box) {
Fredrik Söderquist . unresolved

So this is now always "imprecise" - could we then return early if it doesn't intersect (rather than running the "actual" intersection test as well)?

Line 548, Patchset 22 (Latest): gfx::RectF bounds = ObjectBoundingBox();
Fredrik Söderquist . unresolved

This would need to be the decorated bbox for the `is_visual_overflow` case, no?

File third_party/blink/renderer/core/layout/svg/svg_layout_support.h
Line 73, Patchset 22 (Latest): static gfx::RectF ComputeVisualOverflowRectIncludingFilters(
Fredrik Söderquist . unresolved

Not sure why we'd want this here. Couldn't it go in `SVGContentContainer`?

File third_party/blink/renderer/core/layout/svg/svg_layout_support.cc
Line 115, Patchset 22 (Latest): if (!filter_reference_box.size().IsZero()) {
Fredrik Söderquist . unresolved

This check is not very obvious to me, could you document why it is needed here?

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Rogers
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: Ib2cad21105fd829d0cd744a698907fe6dd999a3c
    Gerrit-Change-Number: 7858119
    Gerrit-PatchSet: 22
    Gerrit-Owner: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Philip Rogers <p...@chromium.org>
    Gerrit-Comment-Date: Mon, 25 May 2026 12:12:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Philip Rogers (Gerrit)

    unread,
    May 25, 2026, 10:14:04 PM (5 hours ago) May 25
    to Fredrik Söderquist, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Stephen Chenney, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, fmalit...@chromium.org, kouhe...@chromium.org, pdr+svgw...@chromium.org, zol...@webkit.org
    Attention needed from Fredrik Söderquist

    Philip Rogers voted and added 6 comments

    Votes added by Philip Rogers

    Commit-Queue+1

    6 comments

    Patchset-level comments
    File-level comment, Patchset 24 (Latest):
    Philip Rogers . resolved

    PTAL

    File third_party/blink/renderer/core/layout/svg/layout_svg_container.h
    Line 86, Patchset 22: gfx::RectF ComputeVisualOverflowRectIncludingFilters() const {
    Fredrik Söderquist . resolved
    ```suggestion
    gfx::RectF ComputeContentVisualOverflowRectIncludingFilters() const {
    ```
    ?
    Philip Rogers

    Done

    File third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc
    Line 547, Patchset 22: if (is_visual_overflow || hit_rules.can_hit_bounding_box) {
    Fredrik Söderquist . resolved

    So this is now always "imprecise" - could we then return early if it doesn't intersect (rather than running the "actual" intersection test as well)?

    Philip Rogers

    Done

    Line 548, Patchset 22: gfx::RectF bounds = ObjectBoundingBox();
    Fredrik Söderquist . resolved

    This would need to be the decorated bbox for the `is_visual_overflow` case, no?

    Philip Rogers

    Done, which made some other tidying possible.

    File third_party/blink/renderer/core/layout/svg/svg_layout_support.h
    Line 73, Patchset 22: static gfx::RectF ComputeVisualOverflowRectIncludingFilters(
    Fredrik Söderquist . resolved

    Not sure why we'd want this here. Couldn't it go in `SVGContentContainer`?

    Philip Rogers

    Done

    File third_party/blink/renderer/core/layout/svg/svg_layout_support.cc
    Line 115, Patchset 22: if (!filter_reference_box.size().IsZero()) {
    Fredrik Söderquist . resolved

    This check is not very obvious to me, could you document why it is needed here?

    Philip Rogers

    This was introduced by https://crrev.com/c/1364152 and the instance here was copied from LayoutBoxModelObject::ApplyFiltersToRect. I don't think either of these codepaths need this check. I'll go ahead and remove it here.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Fredrik Söderquist
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • 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: Ib2cad21105fd829d0cd744a698907fe6dd999a3c
      Gerrit-Change-Number: 7858119
      Gerrit-PatchSet: 24
      Gerrit-Owner: Philip Rogers <p...@chromium.org>
      Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
      Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
      Gerrit-Comment-Date: Tue, 26 May 2026 02:13:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Fredrik Söderquist <f...@opera.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages