Use IsCorsSameOrigin() for StyleImage::ForceOrientationIfNecessary() [chromium/src : main]

0 views
Skip to first unread message

Stephen Chenney (Gerrit)

unread,
Apr 16, 2026, 12:31:49 PM (2 days ago) Apr 16
to Fredrik Söderquist, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Fredrik Söderquist

Stephen Chenney voted and added 2 comments

Votes added by Stephen Chenney

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Stephen Chenney . resolved

LGTM with one request for confirmation.

File third_party/blink/renderer/core/style/style_fetched_image.cc
Line 262, Patchset 3 (Parent): if (image_->GetImage()->IsSVGImage()) {
return default_orientation;
}
Stephen Chenney . unresolved

Am I right in thinking this is not needed because even if we say it needs to respect orientation is won't make any difference to the rendering?

Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
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: I4925aea80a1e2dcbe2e063bbf6a49065d584a8a4
Gerrit-Change-Number: 7765189
Gerrit-PatchSet: 3
Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Thu, 16 Apr 2026 16:31:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
Apr 16, 2026, 12:35:42 PM (2 days ago) Apr 16
to Stephen Chenney, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

Fredrik Söderquist added 1 comment

File third_party/blink/renderer/core/style/style_fetched_image.cc
Line 262, Patchset 3 (Parent): if (image_->GetImage()->IsSVGImage()) {
return default_orientation;
}
Stephen Chenney . resolved

Am I right in thinking this is not needed because even if we say it needs to respect orientation is won't make any difference to the rendering?

Fredrik Söderquist

Yes, that's the thinking. (I don't think this assert is there anymore though.)

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: I4925aea80a1e2dcbe2e063bbf6a49065d584a8a4
    Gerrit-Change-Number: 7765189
    Gerrit-PatchSet: 3
    Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Apr 2026 16:35:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Stephen Chenney <sche...@chromium.org>
    satisfied_requirement
    open
    diffy

    Fredrik Söderquist (Gerrit)

    unread,
    Apr 17, 2026, 4:05:37 AM (yesterday) Apr 17
    to Stephen Chenney, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

    Fredrik Söderquist voted Commit-Queue+2

    Commit-Queue+2
    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: I4925aea80a1e2dcbe2e063bbf6a49065d584a8a4
    Gerrit-Change-Number: 7765189
    Gerrit-PatchSet: 4
    Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Stephen Chenney <sche...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Apr 2026 08:05:21 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 17, 2026, 4:20:17 AM (yesterday) Apr 17
    to Fredrik Söderquist, Stephen Chenney, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

    Chromium LUCI CQ submitted the change

    Unreviewed changes

    3 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Change information

    Commit message:
    Use IsCorsSameOrigin() for StyleImage::ForceOrientationIfNecessary()

    Since ForceOrientationIfNecessary() is essentially checking if any
    underlying image is not same origin - and StyleImage already has
    IsCorsSameOrigin() for the same purpose - reimplement it as a helper on
    StyleImage instead of requiring each concrete subclass to implement
    both.
    Change-Id: I4925aea80a1e2dcbe2e063bbf6a49065d584a8a4
    Reviewed-by: Stephen Chenney <sche...@chromium.org>
    Commit-Queue: Fredrik Söderquist <f...@opera.com>
    Cr-Commit-Position: refs/heads/main@{#1616392}
    Files:
    • M third_party/blink/renderer/core/style/style_crossfade_image.cc
    • M third_party/blink/renderer/core/style/style_crossfade_image.h
    • M third_party/blink/renderer/core/style/style_fetched_image.cc
    • M third_party/blink/renderer/core/style/style_fetched_image.h
    • M third_party/blink/renderer/core/style/style_image.cc
    • M third_party/blink/renderer/core/style/style_image.h
    • M third_party/blink/renderer/core/style/style_image_set.cc
    • M third_party/blink/renderer/core/style/style_image_set.h
    Change size: M
    Delta: 8 files changed, 12 insertions(+), 48 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Stephen Chenney
    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: I4925aea80a1e2dcbe2e063bbf6a49065d584a8a4
    Gerrit-Change-Number: 7765189
    Gerrit-PatchSet: 5
    Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Stephen Chenney <sche...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages