Improve handling of environment (viewport) changes [chromium/src : main]

0 views
Skip to first unread message

Fredrik Söderquist (Gerrit)

unread,
Mar 23, 2023, 2:18:45 PMMar 23
to Dominic Farolino, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org

Attention is currently required from: Dominic Farolino.

Fredrik Söderquist would like Dominic Farolino to review this change.

View Change

Improve handling of environment (viewport) changes

Pass along additional information from a <source> that changes state, so
that it is possible to determine if the change was due to a media
condition changing state or the element being added/removed/mutated. In
the former case have this change the update behavior passed to the image
loader.

In ImageLoader, move the handling of the `suppress_error_events_` flag
into ImageLoader::DispatchErrorEvent() to make it more unified.

Bug: 1233739
Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
---
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/loader/image_loader.cc
D third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt
5 files changed, 36 insertions(+), 63 deletions(-)


To view, visit change 4365771. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
Gerrit-Change-Number: 4365771
Gerrit-PatchSet: 1
Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Dominic Farolino <d...@chromium.org>
Gerrit-MessageType: newchange

Fredrik Söderquist (Gerrit)

unread,
Mar 23, 2023, 2:18:49 PMMar 23
to blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, Dominic Farolino, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin

Attention is currently required from: Dominic Farolino.

View Change

    To view, visit change 4365771. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
    Gerrit-Change-Number: 4365771
    Gerrit-PatchSet: 1
    Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Dominic Farolino <d...@chromium.org>
    Gerrit-Comment-Date: Thu, 23 Mar 2023 18:18:42 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Dominic Farolino (Gerrit)

    unread,
    Mar 27, 2023, 11:44:12 AMMar 27
    to Fredrik Söderquist, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin

    Attention is currently required from: Fredrik Söderquist.

    Patch set 1:Code-Review +1

    View Change

      To view, visit change 4365771. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
      Gerrit-Change-Number: 4365771
      Gerrit-PatchSet: 1
      Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
      Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
      Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
      Gerrit-CC: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
      Gerrit-Comment-Date: Mon, 27 Mar 2023 15:44:05 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Fredrik Söderquist (Gerrit)

      unread,
      Mar 27, 2023, 12:12:22 PMMar 27
      to blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, Dominic Farolino, Chromium LUCI CQ, chromium...@chromium.org, Nate Chapin

      Attention is currently required from: Fredrik Söderquist.

      Patch set 1:Commit-Queue +2

      View Change

        To view, visit change 4365771. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
        Gerrit-Change-Number: 4365771
        Gerrit-PatchSet: 1
        Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
        Gerrit-Comment-Date: Mon, 27 Mar 2023 16:12:15 +0000

        Chromium LUCI CQ (Gerrit)

        unread,
        Mar 27, 2023, 1:08:37 PMMar 27
        to Fredrik Söderquist, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, Dominic Farolino, chromium...@chromium.org, Nate Chapin

        Chromium LUCI CQ submitted this change.

        View Change

        Approvals: Dominic Farolino: Looks good to me Fredrik Söderquist: Commit
        Improve handling of environment (viewport) changes

        Pass along additional information from a <source> that changes state, so
        that it is possible to determine if the change was due to a media
        condition changing state or the element being added/removed/mutated. In
        the former case have this change the update behavior passed to the image
        loader.

        In ImageLoader, move the handling of the `suppress_error_events_` flag
        into ImageLoader::DispatchErrorEvent() to make it more unified.

        Bug: 1233739
        Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
        Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4365771
        Reviewed-by: Dominic Farolino <d...@chromium.org>
        Commit-Queue: Fredrik Söderquist <f...@opera.com>
        Cr-Commit-Position: refs/heads/main@{#1122491}

        ---
        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/loader/image_loader.cc
        D third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt
        5 files changed, 36 insertions(+), 63 deletions(-)


        To view, visit change 4365771. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ib2b363e3a28e779981cef9fc2e55fbb86fcf8413
        Gerrit-Change-Number: 4365771
        Gerrit-PatchSet: 2
        Gerrit-Owner: Fredrik Söderquist <f...@opera.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Dominic Farolino <d...@chromium.org>
        Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-MessageType: merged
        Reply all
        Reply to author
        Forward
        0 new messages