Make setting defaultValue from a trusted input event validate [chromium/src : main]

0 views
Skip to first unread message

Blink W3C Test Autoroller (Gerrit)

unread,
Apr 17, 2024, 9:12:11 PMApr 17
to Mason Freed, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

Message from Blink W3C Test Autoroller

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

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

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
Gerrit-Change-Number: 5463568
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 01:11:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Apr 17, 2024, 11:21:09 PMApr 17
to David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Baron

Mason Freed voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
Gerrit-Change-Number: 5463568
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 03:21:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Apr 18, 2024, 10:18:10 AMApr 18
to Mason Freed, David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

David Baron added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
David Baron . resolved

It seems a bit weird to me that the behavior for setDefaultValue should be different from the behavior for changing the child content. That doesn't appear to be the case in either Gecko or WebKit:
https://searchfox.org/mozilla-central/source/dom/html/HTMLTextAreaElement.cpp#322
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextAreaElement.cpp#408

It also seems like the WebKit source matches our current code rather than your modifications, so I'm curious what the source of the behavior difference is. It also seems like the Gecko code (which should go through `ContentChanged` and then `Reset`) matches our current code.

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
Gerrit-Change-Number: 5463568
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 14:18:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Baron (Gerrit)

unread,
Apr 18, 2024, 10:29:32 AMApr 18
to Mason Freed, David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

David Baron added 1 comment

Patchset-level comments
David Baron . resolved

It seems a bit weird to me that the behavior for setDefaultValue should be different from the behavior for changing the child content. That doesn't appear to be the case in either Gecko or WebKit:
https://searchfox.org/mozilla-central/source/dom/html/HTMLTextAreaElement.cpp#322
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextAreaElement.cpp#408

It also seems like the WebKit source matches our current code rather than your modifications, so I'm curious what the source of the behavior difference is. It also seems like the Gecko code (which should go through `ContentChanged` and then `Reset`) matches our current code.

David Baron

Oops, I misread the Gecko code. It resets `mUserInteracted` but it *doesn't* reset `mLastValueChangeWasInteractive` which is the one that's relevant here. (But that holds for content changes too.)

But the webkit code looks like it resets both `m_lastChangeWasNotUserEdit` and `m_wasModifiedByUser`.

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
Gerrit-Change-Number: 5463568
Gerrit-PatchSet: 1
Gerrit-Owner: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 14:29:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Baron <dba...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Apr 22, 2024, 8:45:38 PMApr 22
to David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Baron

Mason Freed added 1 comment

Patchset-level comments
David Baron . unresolved

It seems a bit weird to me that the behavior for setDefaultValue should be different from the behavior for changing the child content. That doesn't appear to be the case in either Gecko or WebKit:
https://searchfox.org/mozilla-central/source/dom/html/HTMLTextAreaElement.cpp#322
https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextAreaElement.cpp#408

It also seems like the WebKit source matches our current code rather than your modifications, so I'm curious what the source of the behavior difference is. It also seems like the Gecko code (which should go through `ContentChanged` and then `Reset`) matches our current code.

David Baron

Oops, I misread the Gecko code. It resets `mUserInteracted` but it *doesn't* reset `mLastValueChangeWasInteractive` which is the one that's relevant here. (But that holds for content changes too.)

But the webkit code looks like it resets both `m_lastChangeWasNotUserEdit` and `m_wasModifiedByUser`.

Mason Freed

Hmm, I admit I'm not great at navigating Gecko code, but I can't seem to find how setting defaultValue avoids setting `mLastValueChangeWasInteractive`. I'm happy to follow another pattern, if I can find it. This way (just adding a local var to keep track) seemed the most straightforward. But suggestions appreciated!

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: David Baron <dba...@chromium.org>
    Gerrit-Comment-Date: Tue, 23 Apr 2024 00:45:30 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Baron (Gerrit)

    unread,
    Apr 23, 2024, 12:35:49 PMApr 23
    to Mason Freed, David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Mason Freed

    David Baron added 1 comment

    Patchset-level comments
    David Baron . unresolved

    It seems a bit weird to me that the behavior for setDefaultValue should be different from the behavior for changing the child content. That doesn't appear to be the case in either Gecko or WebKit:
    https://searchfox.org/mozilla-central/source/dom/html/HTMLTextAreaElement.cpp#322
    https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextAreaElement.cpp#408

    It also seems like the WebKit source matches our current code rather than your modifications, so I'm curious what the source of the behavior difference is. It also seems like the Gecko code (which should go through `ContentChanged` and then `Reset`) matches our current code.

    David Baron

    Oops, I misread the Gecko code. It resets `mUserInteracted` but it *doesn't* reset `mLastValueChangeWasInteractive` which is the one that's relevant here. (But that holds for content changes too.)

    But the webkit code looks like it resets both `m_lastChangeWasNotUserEdit` and `m_wasModifiedByUser`.

    Mason Freed

    Hmm, I admit I'm not great at navigating Gecko code, but I can't seem to find how setting defaultValue avoids setting `mLastValueChangeWasInteractive`. I'm happy to follow another pattern, if I can find it. This way (just adding a local var to keep track) seemed the most straightforward. But suggestions appreciated!

    David Baron

    At a minimum, I'd suggest making the change unconditionally in `ChildrenChanged()` rather than conditioning it on the boolean; I don't see the reason to make the `defaultValue` setter different from changing the child content. I think it's clear that it doesn't match WebKit but I think it's plausible (although I haven't really verified -- this is complicated) that it makes the behavior closer to Gecko's. (It's possible that the condition call to `SetLastChangeWasNotUserEdit` in `HTMLTextAreaElement::SetValueCommon` could be equivalent to what Gecko does -- but I didn't really check -- see below.)

    Some previous Chrome changes here were https://chromium.googlesource.com/chromium/src/+/21d9f6214b83322e0a741b77977556c735d0b189 and https://chromium.googlesource.com/chromium/src/+/e91b6459cf18e90f2766a68a2487701610213be4 and https://chromium.googlesource.com/chromium/src/+/90b048661a3949cd38ef690052d6930c230b4100 , but I didn't dig in to the details enough to really understand what's going on and whether something there made the behavior diverge from WebKit.

    The Gecko logic is that `HTMLTextAreaElement::ContentChanged` (similar to WebKit and Chromium `ChildrenChanged`) calls `HTMLTextAreaElement::Reset` which calls `HTMLTextAreaElement::SetValueInternal(..., ValueSetterOption::ByInternalAPI)` which calls `TextControlState::SetValue` which uses that option to set `changeKind` to `ValueChangeKind::Internal` which calls `HTMLTextAreaElement::OnValueChanged`, which, as a result of the `aChangeKind`, does not touch `mLastValueChangeWasInteractive`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 23 Apr 2024 16:35:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Baron <dba...@chromium.org>
    Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Baron (Gerrit)

    unread,
    Apr 23, 2024, 1:05:55 PMApr 23
    to Mason Freed, David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Mason Freed

    David Baron added 1 comment

    Patchset-level comments
    David Baron . unresolved

    Also, whatever you do, you probably should have a feature flag for this.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Tue, 23 Apr 2024 17:05:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mason Freed (Gerrit)

    unread,
    Apr 25, 2024, 5:56:48 PMApr 25
    to AyeAye, David Baron, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from David Baron

    Mason Freed voted and added 2 comments

    Votes added by Mason Freed

    Auto-Submit+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 1:
    David Baron . resolved

    Also, whatever you do, you probably should have a feature flag for this.

    Mason Freed

    Done

    File-level comment, Patchset 1:
    David Baron . resolved

    It seems a bit weird to me that the behavior for setDefaultValue should be different from the behavior for changing the child content. That doesn't appear to be the case in either Gecko or WebKit:
    https://searchfox.org/mozilla-central/source/dom/html/HTMLTextAreaElement.cpp#322
    https://searchfox.org/wubkat/source/Source/WebCore/html/HTMLTextAreaElement.cpp#408

    It also seems like the WebKit source matches our current code rather than your modifications, so I'm curious what the source of the behavior difference is. It also seems like the Gecko code (which should go through `ContentChanged` and then `Reset`) matches our current code.

    David Baron

    Oops, I misread the Gecko code. It resets `mUserInteracted` but it *doesn't* reset `mLastValueChangeWasInteractive` which is the one that's relevant here. (But that holds for content changes too.)

    But the webkit code looks like it resets both `m_lastChangeWasNotUserEdit` and `m_wasModifiedByUser`.

    Mason Freed

    Hmm, I admit I'm not great at navigating Gecko code, but I can't seem to find how setting defaultValue avoids setting `mLastValueChangeWasInteractive`. I'm happy to follow another pattern, if I can find it. This way (just adding a local var to keep track) seemed the most straightforward. But suggestions appreciated!

    David Baron

    At a minimum, I'd suggest making the change unconditionally in `ChildrenChanged()` rather than conditioning it on the boolean; I don't see the reason to make the `defaultValue` setter different from changing the child content. I think it's clear that it doesn't match WebKit but I think it's plausible (although I haven't really verified -- this is complicated) that it makes the behavior closer to Gecko's. (It's possible that the condition call to `SetLastChangeWasNotUserEdit` in `HTMLTextAreaElement::SetValueCommon` could be equivalent to what Gecko does -- but I didn't really check -- see below.)

    Some previous Chrome changes here were https://chromium.googlesource.com/chromium/src/+/21d9f6214b83322e0a741b77977556c735d0b189 and https://chromium.googlesource.com/chromium/src/+/e91b6459cf18e90f2766a68a2487701610213be4 and https://chromium.googlesource.com/chromium/src/+/90b048661a3949cd38ef690052d6930c230b4100 , but I didn't dig in to the details enough to really understand what's going on and whether something there made the behavior diverge from WebKit.

    The Gecko logic is that `HTMLTextAreaElement::ContentChanged` (similar to WebKit and Chromium `ChildrenChanged`) calls `HTMLTextAreaElement::Reset` which calls `HTMLTextAreaElement::SetValueInternal(..., ValueSetterOption::ByInternalAPI)` which calls `TextControlState::SetValue` which uses that option to set `changeKind` to `ValueChangeKind::Internal` which calls `HTMLTextAreaElement::OnValueChanged`, which, as a result of the `aChangeKind`, does not touch `mLastValueChangeWasInteractive`.

    Mason Freed

    Thanks for the suggestion. It turns out just unconditionally (other than the new feature flag) *not* setting `SetLastChangeWasNotUserEdit` in `ChildrenChanged()` does the trick and is quite a bit simpler.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Baron
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 3
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: David Baron <dba...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Apr 2024 21:56:40 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Baron (Gerrit)

    unread,
    Apr 26, 2024, 10:16:53 AMApr 26
    to Mason Freed, David Baron, AyeAye, Blink W3C Test Autoroller, Chromium LUCI CQ, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Mason Freed

    David Baron voted and added 1 comment

    Votes added by David Baron

    Code-Review+1
    Commit-Queue+2

    1 comment

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    David Baron . resolved

    LGTM. I'm still a little bit worried that the underlying mechanism here may differ from other browsers, but at this point I've gotten myself confused enough reading the code across three engines, and this does align us with other engines on the tests you've added (based on https://wpt.fyi/results/html/semantics/forms/constraints/form-validation-validity-textarea-defaultValue.html?label=pr_head&max-count=1&pr=45776 ).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mason Freed
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 3
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Attention: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Apr 2024 14:16:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 26, 2024, 10:21:14 AMApr 26
    to Mason Freed, David Baron, AyeAye, Blink W3C Test Autoroller, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    Make setting defaultValue from a trusted input event validate

    This adds a large-ish test of the validation behavior of the
    textarea element, which as far as I can tell is under-specified,
    or at least I could not find this behavior in the spec. I looked
    mainly here:

    https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#validity-states

    In particular, there are some interesting differences in the
    validity of initially-empty vs initially-non-empty textareas.

    This CL, though, also aligns the behavior of Chromium with both
    WebKit and Gecko in the specific case where the `input` event
    handler sets textarea.defaultValue. In that case, the textarea
    will be validated correctly. Previous to this CL, Chromium would
    not validate the textarea as a result of the change.
    Fixed: 333940413
    Change-Id: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Auto-Submit: Mason Freed <mas...@chromium.org>
    Reviewed-by: David Baron <dba...@chromium.org>
    Commit-Queue: David Baron <dba...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1293030}
    Files:
    • M third_party/blink/renderer/core/html/forms/html_text_area_element.cc
    • M third_party/blink/renderer/platform/runtime_enabled_features.json5
    • A third_party/blink/web_tests/external/wpt/html/semantics/forms/constraints/form-validation-validity-textarea-defaultValue.html
    Change size: M
    Delta: 3 files changed, 108 insertions(+), 1 deletion(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by David Baron
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 4
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    open
    diffy
    satisfied_requirement

    Blink W3C Test Autoroller (Gerrit)

    unread,
    Apr 26, 2024, 10:48:56 AMApr 26
    to Chromium LUCI CQ, Mason Freed, David Baron, AyeAye, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-rev...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

    Message from Blink W3C Test Autoroller

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

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    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: Iec38fb510296d34419b7ed3df8ab396d2d737d69
    Gerrit-Change-Number: 5463568
    Gerrit-PatchSet: 4
    Gerrit-Owner: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Apr 2024 14:48:48 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages