Remove "resize" as a <popup> light dismiss trigger [chromium/src : main]

1 view
Skip to first unread message

Mason Freed (Gerrit)

unread,
Sep 24, 2021, 12:44:19 PM9/24/21
to Dan Clark, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

Attention is currently required from: Dan Clark.

Mason Freed would like Dan Clark to review this change.

View Change

Remove "resize" as a <popup> light dismiss trigger

This ended up being a confusing part of the implementation of
<popup>: it was easy to accidentally resize the popup, causing
it to light dismiss. For example, adding a :hover style that
adds a border to the popup or an element might cause a light
dismiss. And the rationale for this being a trigger in the
first place was an implementation concern - avoiding
expensive relayout in the case that the popup is anchor-
positioned to something on the page.

Bug:1168738
Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
Fixed:1252176
---
M third_party/blink/renderer/core/html/html_popup_element.cc
M third_party/blink/renderer/core/html/html_popup_element.h
D third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss-resize.tentative.html
3 files changed, 0 insertions(+), 94 deletions(-)


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

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
Gerrit-Change-Number: 3180152
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-MessageType: newchange

Mason Freed (Gerrit)

unread,
Sep 24, 2021, 12:44:23 PM9/24/21
to blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Dan Clark, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Dan Clark.

Patch set 1:Auto-Submit +1

View Change

1 comment:

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

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
Gerrit-Change-Number: 3180152
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Dan Clark <dan...@microsoft.com>
Gerrit-Comment-Date: Fri, 24 Sep 2021 16:44:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Blink WPT Bot (Gerrit)

unread,
Sep 24, 2021, 12:49:10 PM9/24/21
to Mason Freed, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Dan Clark, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Dan Clark.

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/30948.

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

View Change

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
    Gerrit-Change-Number: 3180152
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink WPT Bot <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Dan Clark <dan...@microsoft.com>
    Gerrit-Comment-Date: Fri, 24 Sep 2021 16:48:59 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Dan Clark (Gerrit)

    unread,
    Sep 24, 2021, 1:35:27 PM9/24/21
    to Mason Freed, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Blink WPT Bot, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Mason Freed.

    Patch set 1:Code-Review +1

    View Change

    2 comments:

    • Patchset:

    • File third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss-resize.tentative.html:

      • Patch Set #1, Line 35: assert_false(popup.open,'popup should close when resized');

        Just a thought, would it be worthwhile to keep the test and have it validate that resize doesn't close the popup? Although checking that an async operation never happens is kind of a strange test...so maybe not worth it.

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
    Gerrit-Change-Number: 3180152
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink WPT Bot <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Sep 2021 17:35:18 +0000

    Mason Freed (Gerrit)

    unread,
    Sep 24, 2021, 5:11:47 PM9/24/21
    to blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Dan Clark, Blink WPT Bot, Chromium LUCI CQ, chromium...@chromium.org

    Patch set 2:Auto-Submit +1Commit-Queue +2

    View Change

    1 comment:

    • File third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss-resize.tentative.html:

      • Just a thought, would it be worthwhile to keep the test and have it validate that resize doesn't clo […]

        Thanks! I did think about doing that, but as you mentioned, it's hard to write a test to check for something that (asynchronously) "never happens". You almost have to write a setTimeout() and that's discouraged. So I just went with no test here.

        I'm going to land this, but if you really think we need a test, I'm happy to land one as a followup!

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
    Gerrit-Change-Number: 3180152
    Gerrit-PatchSet: 2
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink WPT Bot <blink-w3c-te...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Sep 2021 21:11:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Dan Clark <dan...@microsoft.com>
    Gerrit-MessageType: comment

    Chromium LUCI CQ (Gerrit)

    unread,
    Sep 24, 2021, 5:18:00 PM9/24/21
    to Mason Freed, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Dan Clark, Blink WPT Bot, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change



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

    Approvals: Dan Clark: Looks good to me Mason Freed: Commit; Send CL to CQ automatically after approval
    Remove "resize" as a <popup> light dismiss trigger

    This ended up being a confusing part of the implementation of
    <popup>: it was easy to accidentally resize the popup, causing
    it to light dismiss. For example, adding a :hover style that
    adds a border to the popup or an element might cause a light
    dismiss. And the rationale for this being a trigger in the
    first place was an implementation concern - avoiding
    expensive relayout in the case that the popup is anchor-
    positioned to something on the page.

    Bug: 1168738
    Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
    Fixed: 1252176
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3180152
    Commit-Queue: Mason Freed <mas...@chromium.org>
    Auto-Submit: Mason Freed <mas...@chromium.org>
    Reviewed-by: Dan Clark <dan...@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#924911}

    ---
    M third_party/blink/renderer/core/html/html_popup_element.cc
    M third_party/blink/renderer/core/html/html_popup_element.h
    D third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-popup-element/popup-light-dismiss-resize.tentative.html
    3 files changed, 0 insertions(+), 94 deletions(-)


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

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
    Gerrit-Change-Number: 3180152
    Gerrit-PatchSet: 3
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink WPT Bot <blink-w3c-te...@chromium.org>
    Gerrit-MessageType: merged

    Blink WPT Bot (Gerrit)

    unread,
    Sep 24, 2021, 6:35:04 PM9/24/21
    to Chromium LUCI CQ, Mason Freed, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Dan Clark, chromium...@chromium.org

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

    View Change

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

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic5a3e616941ace8b47b4abc02dbf786aa78521c4
      Gerrit-Change-Number: 3180152
      Gerrit-PatchSet: 3
      Gerrit-Owner: Mason Freed <mas...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
      Gerrit-CC: Blink WPT Bot <blink-w3c-te...@chromium.org>
      Gerrit-Comment-Date: Fri, 24 Sep 2021 22:34:45 +0000
      Reply all
      Reply to author
      Forward
      0 new messages