ImageReplacement: Prevent reset after sizing related source changes [chromium/src : main]

0 views
Skip to first unread message

Adithya Srinivasan (Gerrit)

unread,
Jul 2, 2026, 3:56:33 PM (4 days ago) Jul 2
to Jeremy Roman, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Jeremy Roman

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Jeremy Roman
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ifd2545575df92899236f0014435cd6308de3944d
Gerrit-Change-Number: 7987496
Gerrit-PatchSet: 10
Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Jul 2026 19:56:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

AI Code Reviewer (Gerrit)

unread,
Jul 2, 2026, 3:57:23 PM (4 days ago) Jul 2
to Adithya Srinivasan, Jeremy Roman, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Jeremy Roman

AI Code Reviewer added 1 comment

File third_party/blink/renderer/core/html/html_image_element.h
Line 154, Patchset 10 (Latest): void SelectSourceURL(ImageLoader::UpdateFromElementBehavior,
AI Code Reviewer . unresolved

Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. To improve type safety and readability without relying on inline comments at the call sites, consider using a base::StrongAlias<class ShouldResetImageReplacementTag, bool> or an enum for the should_reset_image_replacement parameter.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Open in Gerrit

Related details

Attention is currently required from:
  • Jeremy Roman
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: Ifd2545575df92899236f0014435cd6308de3944d
    Gerrit-Change-Number: 7987496
    Gerrit-PatchSet: 10
    Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
    Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
    Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Jul 2026 19:57:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jeremy Roman (Gerrit)

    unread,
    Jul 2, 2026, 4:08:02 PM (4 days ago) Jul 2
    to Adithya Srinivasan, AI Code Reviewer, Jeremy Roman, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Adithya Srinivasan

    Jeremy Roman added 5 comments

    Commit Message
    Line 14, Patchset 10 (Latest):- viewport size change
    - image resize
    - sizes attribute change
    - srcset attribute change
    - enclosing <picture> change
    Jeremy Roman . unresolved

    at a high level, I understand why we might not want to reset it when we change which variant of an image source is selected (assuming that they vary only in resolution etc but not semantically), but not all of these obviously match that criterion, so I feel like some detail is missing here

    File third_party/blink/renderer/core/html/html_image_element.cc
    Line 337, Patchset 10 (Latest): const bool should_reset_image_replacement = name == html_names::kSrcAttr;
    SelectSourceURL(ImageLoader::kUpdateIgnorePreviousError,
    should_reset_image_replacement);
    Jeremy Roman . unresolved

    why not if srcset or sizes is changed?

    File third_party/blink/renderer/core/image_replacement/image_replacement_test.cc
    Line 993, Patchset 10 (Latest): static const unsigned char kGifBytes[] = {
    0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80,
    0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04,
    0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b};
    Jeremy Roman . unresolved

    pull this constant out into a namespace-scoped variable or maybe a function returning Vector<char>, instead of repeating it?

    Line 1113, Patchset 10 (Latest): source->setAttribute(html_names::kSrcsetAttr, AtomicString("bar.png"));
    Jeremy Roman . unresolved

    I don't quite follow here. We're talking about srcset itself being updated, rather than just selecting a different member of the srcset. Why is this a "sizing-related" change and not a potentially semantic change to the rendered image?

    Line 1274, Patchset 10 (Latest): source->remove();
    Jeremy Roman . unresolved

    adding/removing <source>s is maybe a bit more justifiable as "it's still the same one" as long as some <source> (presumably the one that was originally selected) remains, but I don't quite follow the logic here

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Adithya Srinivasan
    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: Ifd2545575df92899236f0014435cd6308de3944d
    Gerrit-Change-Number: 7987496
    Gerrit-PatchSet: 10
    Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
    Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
    Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-Attention: Adithya Srinivasan <adit...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Jul 2026 20:07:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jeremy Roman (Gerrit)

    unread,
    Jul 2, 2026, 5:00:46 PM (4 days ago) Jul 2
    to Adithya Srinivasan, Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Adithya Srinivasan

    Jeremy Roman voted Commit-Queue+2

    Commit-Queue+2
    Gerrit-Comment-Date: Thu, 02 Jul 2026 21:00:30 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jeremy Roman (Gerrit)

    unread,
    Jul 2, 2026, 5:01:21 PM (4 days ago) Jul 2
    to Adithya Srinivasan, Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Adithya Srinivasan

    Jeremy Roman added 1 comment

    Patchset-level comments
    File-level comment, Patchset 10 (Latest):
    Jeremy Roman . resolved

    disregard mistaken CQ

    Gerrit-Comment-Date: Thu, 02 Jul 2026 21:01:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Adithya Srinivasan (Gerrit)

    unread,
    Jul 3, 2026, 2:00:01 PM (3 days ago) Jul 3
    to Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Jeremy Roman

    Adithya Srinivasan added 6 comments

    Commit Message
    Line 14, Patchset 10:- viewport size change

    - image resize
    - sizes attribute change
    - srcset attribute change
    - enclosing <picture> change
    Jeremy Roman . resolved

    at a high level, I understand why we might not want to reset it when we change which variant of an image source is selected (assuming that they vary only in resolution etc but not semantically), but not all of these obviously match that criterion, so I feel like some detail is missing here

    Adithya Srinivasan

    Yeah I think I was being a little over aggressive with this.

    My main rationale here was that the image src attribute changing is probably a stronger semantic signal here that just the srcset attribute changing (they would presumably change both), partly because I read in a web.dev article that setting a src on an img was mandatory (https://web.dev/learn/design/responsive-images#:~:text=You%20still%20need%20to%20have%20a%20valid%20src%20attribute%2C%20but%20the%20browser%20can%20replace%20its%20value%20with%20one%20of%20the%20options%20listed%20in%20the%20srcset).

    But apparently that is not true (https://github.com/whatwg/html/issues/9181), so some of these changes are like you say, potential semantic changes. I've updated the patch to be more conservative and allow replacement reset in more scenarios.

    File third_party/blink/renderer/core/html/html_image_element.h
    Line 154, Patchset 10: void SelectSourceURL(ImageLoader::UpdateFromElementBehavior,
    AI Code Reviewer . resolved

    Blink Style Guide: Prefer enums or StrongAliases to bare bools for function parameters. To improve type safety and readability without relying on inline comments at the call sites, consider using a base::StrongAlias<class ShouldResetImageReplacementTag, bool> or an enum for the should_reset_image_replacement parameter.

    To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
    **Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


    _This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
    _AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
    _[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

    Adithya Srinivasan

    Done

    File third_party/blink/renderer/core/html/html_image_element.cc
    Line 337, Patchset 10: const bool should_reset_image_replacement = name == html_names::kSrcAttr;
    SelectSourceURL(ImageLoader::kUpdateIgnorePreviousError,
    should_reset_image_replacement);
    Jeremy Roman . resolved

    why not if srcset or sizes is changed?

    Adithya Srinivasan

    just `sizes` now, but `sizes` helps determine which src in the srcset gets used but doesn't really change the srcset itself, so it changing on its own probably means a resize of some kind happened (and some sites change `sizes` on a page resize)

    File third_party/blink/renderer/core/image_replacement/image_replacement_test.cc
    Line 993, Patchset 10: static const unsigned char kGifBytes[] = {

    0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80,
    0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04,
    0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b};
    Jeremy Roman . resolved

    pull this constant out into a namespace-scoped variable or maybe a function returning Vector<char>, instead of repeating it?

    Adithya Srinivasan

    Done

    Line 1113, Patchset 10: source->setAttribute(html_names::kSrcsetAttr, AtomicString("bar.png"));
    Jeremy Roman . resolved

    I don't quite follow here. We're talking about srcset itself being updated, rather than just selecting a different member of the srcset. Why is this a "sizing-related" change and not a potentially semantic change to the rendered image?

    Adithya Srinivasan

    removed

    Line 1274, Patchset 10: source->remove();
    Jeremy Roman . resolved

    adding/removing <source>s is maybe a bit more justifiable as "it's still the same one" as long as some <source> (presumably the one that was originally selected) remains, but I don't quite follow the logic here

    Adithya Srinivasan

    removed

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jeremy Roman
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ifd2545575df92899236f0014435cd6308de3944d
      Gerrit-Change-Number: 7987496
      Gerrit-PatchSet: 13
      Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
      Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
      Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
      Gerrit-Comment-Date: Fri, 03 Jul 2026 17:59:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Comment-In-Reply-To: Jeremy Roman <jbr...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jeremy Roman (Gerrit)

      unread,
      Jul 3, 2026, 2:10:57 PM (3 days ago) Jul 3
      to Adithya Srinivasan, Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Adithya Srinivasan

      Jeremy Roman voted and added 1 comment

      Votes added by Jeremy Roman

      Code-Review+1

      1 comment

      File third_party/blink/renderer/core/html/html_source_element.h
      Line 37, Patchset 13 (Latest):class CORE_EXPORT HTMLSourceElement final : public HTMLElement {
      Jeremy Roman . unresolved

      nit: I think this might not be needed anymore

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Adithya Srinivasan
      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: Ifd2545575df92899236f0014435cd6308de3944d
      Gerrit-Change-Number: 7987496
      Gerrit-PatchSet: 13
      Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
      Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
      Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-Attention: Adithya Srinivasan <adit...@chromium.org>
      Gerrit-Comment-Date: Fri, 03 Jul 2026 18:10:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Adithya Srinivasan (Gerrit)

      unread,
      Jul 3, 2026, 2:48:05 PM (3 days ago) Jul 3
      to Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Jeremy Roman

      Adithya Srinivasan added 1 comment

      File third_party/blink/renderer/core/html/html_source_element.h
      Line 37, Patchset 13:class CORE_EXPORT HTMLSourceElement final : public HTMLElement {
      Jeremy Roman . resolved

      nit: I think this might not be needed anymore

      Adithya Srinivasan

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jeremy Roman
      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: Ifd2545575df92899236f0014435cd6308de3944d
        Gerrit-Change-Number: 7987496
        Gerrit-PatchSet: 14
        Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
        Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
        Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
        Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
        Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
        Gerrit-Comment-Date: Fri, 03 Jul 2026 18:47:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Jeremy Roman <jbr...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adithya Srinivasan (Gerrit)

        unread,
        9:48 AM (5 hours ago) 9:48 AM
        to Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Jeremy Roman

        Adithya Srinivasan voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Jeremy Roman
        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: Ifd2545575df92899236f0014435cd6308de3944d
        Gerrit-Change-Number: 7987496
        Gerrit-PatchSet: 14
        Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
        Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
        Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
        Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
        Gerrit-Attention: Jeremy Roman <jbr...@chromium.org>
        Gerrit-Comment-Date: Mon, 06 Jul 2026 13:47:56 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Jeremy Roman (Gerrit)

        unread,
        9:55 AM (5 hours ago) 9:55 AM
        to Adithya Srinivasan, Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Adithya Srinivasan

        Jeremy Roman voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Adithya Srinivasan
        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: Ifd2545575df92899236f0014435cd6308de3944d
          Gerrit-Change-Number: 7987496
          Gerrit-PatchSet: 14
          Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
          Gerrit-Attention: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Comment-Date: Mon, 06 Jul 2026 13:55:33 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Adithya Srinivasan (Gerrit)

          unread,
          10:09 AM (4 hours ago) 10:09 AM
          to Jeremy Roman, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

          Adithya Srinivasan voted and added 1 comment

          Votes added by Adithya Srinivasan

          Commit-Queue+2

          1 comment

          Patchset-level comments
          File-level comment, Patchset 14 (Latest):
          Adithya Srinivasan . resolved

          jbroman:

          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: Ifd2545575df92899236f0014435cd6308de3944d
          Gerrit-Change-Number: 7987496
          Gerrit-PatchSet: 14
          Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
          Gerrit-Comment-Date: Mon, 06 Jul 2026 14:09:03 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          11:03 AM (3 hours ago) 11:03 AM
          to Adithya Srinivasan, Jeremy Roman, AI Code Reviewer, chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          ImageReplacement: Prevent reset after sizing related source changes

          Adds a param to HTMLImageElement::SelectSourceURL that dictates whether
          an associated active image replacement should get discarded if the URL
          changes. This boolean is set to false when a source change is triggered
          by:

          - viewport size changes
          - image resize
          - sizes attribute change (both on <source> and <img> elements)
          Bug: b:517558337
          Change-Id: Ifd2545575df92899236f0014435cd6308de3944d
          Commit-Queue: Adithya Srinivasan <adit...@chromium.org>
          Reviewed-by: Jeremy Roman <jbr...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1657191}
          Files:
          • M third_party/blink/renderer/core/html/html_image_element.cc
          • M third_party/blink/renderer/core/html/html_image_element.h
          • M third_party/blink/renderer/core/html/html_picture_element.cc
          • M third_party/blink/renderer/core/html/html_picture_element.h
          • M third_party/blink/renderer/core/html/html_source_element.cc
          • M third_party/blink/renderer/core/image_replacement/image_replacement.cc
          • M third_party/blink/renderer/core/image_replacement/image_replacement.h
          • M third_party/blink/renderer/core/image_replacement/image_replacement_test.cc
          Change size: L
          Delta: 8 files changed, 446 insertions(+), 27 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Jeremy Roman
          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: Ifd2545575df92899236f0014435cd6308de3944d
          Gerrit-Change-Number: 7987496
          Gerrit-PatchSet: 15
          Gerrit-Owner: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Adithya Srinivasan <adit...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Jeremy Roman <jbr...@chromium.org>
          Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages