[views-ax] Introducing setters for kExpanded and kCollapsed state [chromium/src : main]

0 views
Skip to first unread message

Benjamin Beaudry (Gerrit)

unread,
Jun 24, 2024, 1:59:27 PMJun 24
to Divyansh Mangal, AyeAye, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Divyansh Mangal

Benjamin Beaudry added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Benjamin Beaudry . unresolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
Gerrit-Change-Number: 5643912
Gerrit-PatchSet: 7
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Mon, 24 Jun 2024 17:59:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Jun 24, 2024, 2:09:57 PMJun 24
to AyeAye, Benjamin Beaudry, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Benjamin Beaudry

Divyansh Mangal added 1 comment

Patchset-level comments
Benjamin Beaudry . unresolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Divyansh Mangal

I did thought about that but i thought having separate functions also made sense.
I can make use of the existing SetIsCollapse but will it be alright if i make single setter? something like SetIsExpandedOrCollaped state?

Open in Gerrit

Related details

Attention is currently required from:
  • Benjamin Beaudry
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
Gerrit-Change-Number: 5643912
Gerrit-PatchSet: 7
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Comment-Date: Mon, 24 Jun 2024 18:09:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Benjamin Beaudry <benjamin...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Benjamin Beaudry (Gerrit)

unread,
Jun 24, 2024, 2:24:42 PMJun 24
to Divyansh Mangal, AyeAye, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Divyansh Mangal

Benjamin Beaudry added 1 comment

Patchset-level comments
Benjamin Beaudry . unresolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Divyansh Mangal

I did thought about that but i thought having separate functions also made sense.
I can make use of the existing SetIsCollapse but will it be alright if i make single setter? something like SetIsExpandedOrCollaped state?

Benjamin Beaudry

That sounds good, yes. With a bool param named `is_expanded`?

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
Gerrit-Change-Number: 5643912
Gerrit-PatchSet: 7
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Comment-Date: Mon, 24 Jun 2024 18:24:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Divyansh Mangal <dma...@microsoft.com>
Comment-In-Reply-To: Benjamin Beaudry <benjamin...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Benjamin Beaudry (Gerrit)

unread,
Jun 24, 2024, 2:35:07 PMJun 24
to Divyansh Mangal, AyeAye, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Divyansh Mangal

Benjamin Beaudry added 1 comment

Patchset-level comments
Benjamin Beaudry . unresolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Divyansh Mangal

I did thought about that but i thought having separate functions also made sense.
I can make use of the existing SetIsCollapse but will it be alright if i make single setter? something like SetIsExpandedOrCollaped state?

Benjamin Beaudry

That sounds good, yes. With a bool param named `is_expanded`?

Benjamin Beaudry

Javier and I just discussed this and decided that, from a Views author's perspective, it's easier to think about it if they have two separate functions, SetIsCollapsed and SetIsExpanded, but both functions enforce that the other state is set to false when it changes (ie. back to my original comment).

Let's keep two functions, and just enforce it in there. Wdyt?

Gerrit-Comment-Date: Mon, 24 Jun 2024 18:34:56 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Jun 24, 2024, 2:45:35 PMJun 24
to AyeAye, Benjamin Beaudry, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Benjamin Beaudry

Divyansh Mangal added 1 comment

Patchset-level comments
Benjamin Beaudry . unresolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Divyansh Mangal

I did thought about that but i thought having separate functions also made sense.
I can make use of the existing SetIsCollapse but will it be alright if i make single setter? something like SetIsExpandedOrCollaped state?

Benjamin Beaudry

That sounds good, yes. With a bool param named `is_expanded`?

Benjamin Beaudry

Javier and I just discussed this and decided that, from a Views author's perspective, it's easier to think about it if they have two separate functions, SetIsCollapsed and SetIsExpanded, but both functions enforce that the other state is set to false when it changes (ie. back to my original comment).

Let's keep two functions, and just enforce it in there. Wdyt?

Divyansh Mangal

Indeed from the views author perspective it makes sense to have separate functions.
and if we make the change in both of the functions (the mutual exclusion functionality) itself authors can simply call one single function(either SetIsCollapsed or SetIsExpanded) and that would still albeit indirectly just a single function call as well.
I am comfortable with having two separate functions as well and I will change the CLs accordingly

Open in Gerrit

Related details

Attention is currently required from:
  • Benjamin Beaudry
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
Gerrit-Change-Number: 5643912
Gerrit-PatchSet: 7
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Comment-Date: Mon, 24 Jun 2024 18:45:25 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Divyansh Mangal (Gerrit)

unread,
Jun 25, 2024, 7:40:40 AMJun 25
to AyeAye, Benjamin Beaudry, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Benjamin Beaudry

Divyansh Mangal added 1 comment

Patchset-level comments
File-level comment, Patchset 7:
Benjamin Beaudry . resolved

I'm onboard with this interface of (ie. individual SetIsExpanded or SetIsCollapsed) functions, but one thing that is important to understand is that these two states are mutually exclusive. Can we enforce this requirement in the implementation of both functions so that we can when SetIsExpanded is called, we automatically set the collapsed state to the opposite of the boolean parameter? And ditto for SetIsCollapsed.

Thanks!

Divyansh Mangal

I did thought about that but i thought having separate functions also made sense.
I can make use of the existing SetIsCollapse but will it be alright if i make single setter? something like SetIsExpandedOrCollaped state?

Benjamin Beaudry

That sounds good, yes. With a bool param named `is_expanded`?

Benjamin Beaudry

Javier and I just discussed this and decided that, from a Views author's perspective, it's easier to think about it if they have two separate functions, SetIsCollapsed and SetIsExpanded, but both functions enforce that the other state is set to false when it changes (ie. back to my original comment).

Let's keep two functions, and just enforce it in there. Wdyt?

Divyansh Mangal

Indeed from the views author perspective it makes sense to have separate functions.
and if we make the change in both of the functions (the mutual exclusion functionality) itself authors can simply call one single function(either SetIsCollapsed or SetIsExpanded) and that would still albeit indirectly just a single function call as well.
I am comfortable with having two separate functions as well and I will change the CLs accordingly

Divyansh Mangal

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Benjamin Beaudry
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
Gerrit-Change-Number: 5643912
Gerrit-PatchSet: 8
Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
Gerrit-Comment-Date: Tue, 25 Jun 2024 11:40:26 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Benjamin Beaudry (Gerrit)

unread,
Jun 27, 2024, 12:47:01 PMJun 27
to Divyansh Mangal, AyeAye, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
Attention needed from Divyansh Mangal

Benjamin Beaudry added 2 comments

File ui/views/accessibility/view_accessibility.h
Line 257, Patchset 11 (Latest): bool GetIsExpanded() const;
Benjamin Beaudry . unresolved

I don't think the getters are necessary. Are they? I don't see them being used in production code. The only callers I see are in view_accessibility.cc, where we can instead directly ask the cache whether we have the state or not.

File ui/views/accessibility/view_accessibility.cc
Line 974, Patchset 11 (Latest):void ViewAccessibility::SetIsExpanded(bool is_expanded) {
Benjamin Beaudry . unresolved

Can we simplify the implementation to:

```
if (data_.HasState(ax::mojom::State::kExpanded) == is_expanded) {
CHECK(data_.HasState(ax::mojom::State::kCollapsed) != is_expanded) << "The expanded and collapsed state must be mutually exclusive.";
return;
}

SetState(ax::mojom::State::kExpanded, is_expanded);
SetState(ax::mojom::State::kCollapsed, !is_expanded); NotifyAccessibilityEvent(ax::mojom::Event::kExpandedChanged, true);

```

and the equivalent for the `SetIsCollapsed` function?

Open in Gerrit

Related details

Attention is currently required from:
  • Divyansh Mangal
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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
    Gerrit-Change-Number: 5643912
    Gerrit-PatchSet: 11
    Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Comment-Date: Thu, 27 Jun 2024 16:46:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Benjamin Beaudry (Gerrit)

    unread,
    Jun 27, 2024, 1:08:58 PMJun 27
    to Divyansh Mangal, AyeAye, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
    Attention needed from Divyansh Mangal

    Benjamin Beaudry added 1 comment

    File ui/views/accessibility/view_accessibility.h
    Line 256, Patchset 11 (Latest): void SetIsExpanded(bool is_expanded);
    Benjamin Beaudry . unresolved

    I just thought of something even better: What if SetIsExpanded and SetIsCollapsed don't take any parameters, and Views call SetIsExpanded when they want to expand it and they call SetIsCollapsed when they want it to be collapsed?

    I think this would be an even better interface! Wdyt?

    Gerrit-Comment-Date: Thu, 27 Jun 2024 17:08:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Divyansh Mangal (Gerrit)

    unread,
    Jun 28, 2024, 12:56:15 AMJun 28
    to AyeAye, Benjamin Beaudry, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
    Attention needed from Benjamin Beaudry

    Divyansh Mangal added 1 comment

    File ui/views/accessibility/view_accessibility.h
    Line 256, Patchset 11 (Latest): void SetIsExpanded(bool is_expanded);
    Benjamin Beaudry . unresolved

    I just thought of something even better: What if SetIsExpanded and SetIsCollapsed don't take any parameters, and Views call SetIsExpanded when they want to expand it and they call SetIsCollapsed when they want it to be collapsed?

    I think this would be an even better interface! Wdyt?

    Divyansh Mangal

    Thats a good suggestion, that will also help to remove the extra function that we are doing in the other CLs. We can simply call either SetIsExpanded or SetIsCollapsed to get the desired results.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benjamin Beaudry
    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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
    Gerrit-Change-Number: 5643912
    Gerrit-PatchSet: 11
    Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Comment-Date: Fri, 28 Jun 2024 04:56:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Benjamin Beaudry <benjamin...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Divyansh Mangal (Gerrit)

    unread,
    Jun 28, 2024, 2:34:02 AMJun 28
    to AyeAye, Benjamin Beaudry, Javier Contreras, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
    Attention needed from Benjamin Beaudry

    Divyansh Mangal added 3 comments

    File ui/views/accessibility/view_accessibility.h
    Line 257, Patchset 11: bool GetIsExpanded() const;
    Benjamin Beaudry . resolved

    I don't think the getters are necessary. Are they? I don't see them being used in production code. The only callers I see are in view_accessibility.cc, where we can instead directly ask the cache whether we have the state or not.

    Divyansh Mangal

    With the new implementation getters are no longer needed and hence removed the getters altogether.

    Line 256, Patchset 11: void SetIsExpanded(bool is_expanded);
    Benjamin Beaudry . resolved

    I just thought of something even better: What if SetIsExpanded and SetIsCollapsed don't take any parameters, and Views call SetIsExpanded when they want to expand it and they call SetIsCollapsed when they want it to be collapsed?

    I think this would be an even better interface! Wdyt?

    Divyansh Mangal

    Thats a good suggestion, that will also help to remove the extra function that we are doing in the other CLs. We can simply call either SetIsExpanded or SetIsCollapsed to get the desired results.

    Divyansh Mangal

    Implemented the new approach

    File ui/views/accessibility/view_accessibility.cc
    Line 974, Patchset 11:void ViewAccessibility::SetIsExpanded(bool is_expanded) {
    Benjamin Beaudry . resolved

    Can we simplify the implementation to:

    ```
    if (data_.HasState(ax::mojom::State::kExpanded) == is_expanded) {
    CHECK(data_.HasState(ax::mojom::State::kCollapsed) != is_expanded) << "The expanded and collapsed state must be mutually exclusive.";
    return;
    }

    SetState(ax::mojom::State::kExpanded, is_expanded);
    SetState(ax::mojom::State::kCollapsed, !is_expanded); NotifyAccessibilityEvent(ax::mojom::Event::kExpandedChanged, true);

    ```

    and the equivalent for the `SetIsCollapsed` function?

    Divyansh Mangal

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benjamin Beaudry
    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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
    Gerrit-Change-Number: 5643912
    Gerrit-PatchSet: 12
    Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Comment-Date: Fri, 28 Jun 2024 05:12:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Javier Contreras (Gerrit)

    unread,
    Jul 1, 2024, 12:47:20 PMJul 1
    to Divyansh Mangal, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
    Attention needed from Benjamin Beaudry, Divyansh Mangal and Jacques Newman

    Javier Contreras voted and added 1 comment

    Votes added by Javier Contreras

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 13 (Latest):
    Javier Contreras . resolved

    LGTM

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benjamin Beaudry
    • Divyansh Mangal
    • Jacques Newman
    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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
    Gerrit-Change-Number: 5643912
    Gerrit-PatchSet: 13
    Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
    Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
    Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
    Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
    Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
    Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
    Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
    Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
    Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
    Gerrit-Comment-Date: Mon, 01 Jul 2024 16:47:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Javier Contreras (Gerrit)

    unread,
    Jul 1, 2024, 3:13:40 PMJul 1
    to Divyansh Mangal, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
    Attention needed from Benjamin Beaudry, Divyansh Mangal and Jacques Newman

    Javier Contreras voted and added 1 comment

    Votes added by Javier Contreras

    Code-Review+0

    1 comment

    File ui/views/accessibility/view_accessibility.cc
    Line 985, Patchset 13 (Latest): NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
    Javier Contreras . unresolved

    After talking with Jacques about a concern that was raised about a scenario where we don't yet want to fire the event. For instance, when the setter is called from the constructor of a view then we don't want to send the event because the state hasn't changed from one to the other.

    I'm going to be implementing a solution for this in the general case, but while I do that could you add a temporary solution here?

    it could look like the following:

    // TODO(accessibility): Remove this workaround when the general case solution 
    // is implemented.
    // If we don't already have the opposite state in the cache, then this is
    // the initial state and we shouldn't be firing an event.
    bool is_initial_state = !data_.HasState(ax::mojom::State::kCollapsed);
    SetState(ax::mojom::State::kExpanded, true);
    SetState(ax::mojom::State::kCollapsed, false);
    if (!is_initial_state) {
    NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
    }

    And then have similar code (including the comment) in `SetIsCollapsed`.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Benjamin Beaudry
    • Divyansh Mangal
    • Jacques Newman
    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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 13
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Attention: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Comment-Date: Mon, 01 Jul 2024 19:13:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Javier Contreras (Gerrit)

      unread,
      Jul 1, 2024, 7:26:18 PMJul 1
      to Divyansh Mangal, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Benjamin Beaudry, Divyansh Mangal and Jacques Newman

      Javier Contreras added 1 comment

      File ui/views/accessibility/view_accessibility.cc
      Line 985, Patchset 13 (Latest): NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      Javier Contreras . unresolved

      After talking with Jacques about a concern that was raised about a scenario where we don't yet want to fire the event. For instance, when the setter is called from the constructor of a view then we don't want to send the event because the state hasn't changed from one to the other.

      I'm going to be implementing a solution for this in the general case, but while I do that could you add a temporary solution here?

      it could look like the following:

      // TODO(accessibility): Remove this workaround when the general case solution 
      // is implemented.
      // If we don't already have the opposite state in the cache, then this is
      // the initial state and we shouldn't be firing an event.
      bool is_initial_state = !data_.HasState(ax::mojom::State::kCollapsed);
      SetState(ax::mojom::State::kExpanded, true);
      SetState(ax::mojom::State::kCollapsed, false);
      if (!is_initial_state) {
      NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      }

      And then have similar code (including the comment) in `SetIsCollapsed`.

      Javier Contreras

      Ignore the part about the TODO that after looking at the notification header view CL we will still need this check.

      Gerrit-Comment-Date: Mon, 01 Jul 2024 23:26:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jacques Newman (Gerrit)

      unread,
      Jul 1, 2024, 10:52:52 PMJul 1
      to Divyansh Mangal, Javier Contreras, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Divyansh Mangal

      Jacques Newman added 1 comment

      Patchset-level comments
      Jacques Newman . resolved

      I'll take another look once Javier's comments are addressed.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Divyansh Mangal
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 02:52:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Divyansh Mangal (Gerrit)

      unread,
      Jul 2, 2024, 4:11:43 AMJul 2
      to Javier Contreras, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Javier Contreras

      Divyansh Mangal added 1 comment

      File ui/views/accessibility/view_accessibility.cc
      Line 985, Patchset 13 (Latest): NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      Javier Contreras . unresolved

      After talking with Jacques about a concern that was raised about a scenario where we don't yet want to fire the event. For instance, when the setter is called from the constructor of a view then we don't want to send the event because the state hasn't changed from one to the other.

      I'm going to be implementing a solution for this in the general case, but while I do that could you add a temporary solution here?

      it could look like the following:

      // TODO(accessibility): Remove this workaround when the general case solution 
      // is implemented.
      // If we don't already have the opposite state in the cache, then this is
      // the initial state and we shouldn't be firing an event.
      bool is_initial_state = !data_.HasState(ax::mojom::State::kCollapsed);
      SetState(ax::mojom::State::kExpanded, true);
      SetState(ax::mojom::State::kCollapsed, false);
      if (!is_initial_state) {
      NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      }

      And then have similar code (including the comment) in `SetIsCollapsed`.

      Javier Contreras

      Ignore the part about the TODO that after looking at the notification header view CL we will still need this check.

      Divyansh Mangal

      Just to clarify, should i go ahead and add this work around or wait for your solution to get merged??

      If I am correct we won't need this change once we have your solution

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Javier Contreras
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 08:11:30 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Divyansh Mangal (Gerrit)

      unread,
      Jul 2, 2024, 7:03:48 AMJul 2
      to Javier Contreras, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Javier Contreras

      Divyansh Mangal added 1 comment

      File ui/views/accessibility/view_accessibility.cc
      Line 985, Patchset 13: NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      Javier Contreras . unresolved

      After talking with Jacques about a concern that was raised about a scenario where we don't yet want to fire the event. For instance, when the setter is called from the constructor of a view then we don't want to send the event because the state hasn't changed from one to the other.

      I'm going to be implementing a solution for this in the general case, but while I do that could you add a temporary solution here?

      it could look like the following:

      // TODO(accessibility): Remove this workaround when the general case solution 
      // is implemented.
      // If we don't already have the opposite state in the cache, then this is
      // the initial state and we shouldn't be firing an event.
      bool is_initial_state = !data_.HasState(ax::mojom::State::kCollapsed);
      SetState(ax::mojom::State::kExpanded, true);
      SetState(ax::mojom::State::kCollapsed, false);
      if (!is_initial_state) {
      NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      }

      And then have similar code (including the comment) in `SetIsCollapsed`.

      Javier Contreras

      Ignore the part about the TODO that after looking at the notification header view CL we will still need this check.

      Divyansh Mangal

      Just to clarify, should i go ahead and add this work around or wait for your solution to get merged??

      If I am correct we won't need this change once we have your solution

      Divyansh Mangal

      ohh i see, after seeing the notification header view CL comments I get what u mean. We will require this change.
      I will corporate this in my new patchset

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Javier Contreras
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 14
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 11:03:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Divyansh Mangal <dma...@microsoft.com>
      Comment-In-Reply-To: Javier Contreras <javi...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Divyansh Mangal (Gerrit)

      unread,
      Jul 2, 2024, 7:26:39 AMJul 2
      to Javier Contreras, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      File ui/views/accessibility/view_accessibility.cc
      Divyansh Mangal

      Also Javier, the not operator (!) was a little confusing in your solution so i removed it in my solution. It should still work 😊

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Javier Contreras
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 15
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 11:26:22 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Javier Contreras (Gerrit)

      unread,
      Jul 2, 2024, 12:49:36 PMJul 2
      to Divyansh Mangal, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Divyansh Mangal

      Javier Contreras added 3 comments

      File ui/views/accessibility/view_accessibility.cc
      Line 975, Patchset 15 (Latest): // check to see if the expanded state is already set, if already set no need
      Javier Contreras . unresolved

      nit: Check

      Javier Contreras

      Your approach without `!` is fine but then we should change the variable name.

      With the `!` it used to flow fine because the if statement would be read "if its not initial state then notify", and now it reads "if its initial state notify" which is incorrect, we only need to notify if we are not in intial state.

      You can keep your approach and remove the ! but change the var name to maybe "should_notify" and add a comment of why we want to check for this. (If we go from no state to a state we shouldnt notify).

      Line 992, Patchset 15 (Latest): // check to see if the collapsed state is already set, if already set no need
      Javier Contreras . unresolved

      ditto

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Divyansh Mangal
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 16:49:25 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Divyansh Mangal (Gerrit)

      unread,
      Jul 2, 2024, 1:08:38 PMJul 2
      to Javier Contreras, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Javier Contreras

      Divyansh Mangal added 3 comments

      File ui/views/accessibility/view_accessibility.cc
      Line 975, Patchset 15: // check to see if the expanded state is already set, if already set no need
      Javier Contreras . resolved

      nit: Check

      Divyansh Mangal

      Done

      Line 985, Patchset 13: NotifyEvent(ax::mojom::Event::kExpandedChanged, true);
      Javier Contreras . resolved
      Divyansh Mangal

      Done

      Line 992, Patchset 15: // check to see if the collapsed state is already set, if already set no need
      Javier Contreras . resolved

      ditto

      Divyansh Mangal

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Javier Contreras
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 16
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Javier Contreras <javi...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 17:08:24 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Javier Contreras (Gerrit)

      unread,
      Jul 2, 2024, 1:45:24 PMJul 2
      to Divyansh Mangal, Jacques Newman, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Divyansh Mangal and Jacques Newman

      Javier Contreras voted and added 1 comment

      Votes added by Javier Contreras

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 16 (Latest):
      Javier Contreras . resolved

      Great job!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Divyansh Mangal
      • Jacques Newman
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 16
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 17:45:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jacques Newman (Gerrit)

      unread,
      Jul 2, 2024, 6:44:56 PMJul 2
      to Divyansh Mangal, Javier Contreras, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org
      Attention needed from Divyansh Mangal

      Jacques Newman voted and added 1 comment

      Votes added by Jacques Newman

      Code-Review+1

      1 comment

      Patchset-level comments
      Jacques Newman . resolved

      lgtm!!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Divyansh Mangal
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 16
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Attention: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Comment-Date: Tue, 02 Jul 2024 22:44:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Divyansh Mangal (Gerrit)

      unread,
      Jul 3, 2024, 1:19:17 AMJul 3
      to Jacques Newman, Javier Contreras, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Chromium LUCI CQ, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org

      Divyansh Mangal voted Commit-Queue+2

      Commit-Queue+2
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 16
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      Gerrit-CC: Kevin Babbitt <kbab...@microsoft.com>
      Gerrit-CC: Ragvesh Sharma <rags...@microsoft.com>
      Gerrit-CC: Vinay Singh <vinay...@microsoft.com>
      Gerrit-Comment-Date: Wed, 03 Jul 2024 05:18:58 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jul 3, 2024, 1:47:27 AMJul 3
      to Divyansh Mangal, Jacques Newman, Javier Contreras, AyeAye, Benjamin Beaudry, Ragvesh Sharma, Vinay Singh, Akihiro Ota, chromium...@chromium.org, (Julie)Jeongeun Kim, Kevin Babbitt, ios-rev...@chromium.org, telemetr...@chromium.org, blink-...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, ios-r...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org, abigailbk...@google.com, dtseng...@chromium.org, francisjp...@google.com, hirokisa...@chromium.org, josiah...@chromium.org, kyungjunle...@google.com, nektar...@chromium.org, roblia...@chromium.org, sky+...@chromium.org, yuzo+...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [views-ax] Introducing setters for kExpanded and kCollapsed state

      Follow-up CL makes use of these.

      This CL is part of the ViewsAX project:
      https://docs.google.com/document/d/1Ku7HOyDsiZem1yaV6ccZ-tz3lO2XR2NEcm8HjR6d-VY/edit#heading=h.ke1u3utej413
      Bug: 325137417
      Change-Id: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Reviewed-by: Jacques Newman <jane...@microsoft.com>
      Reviewed-by: Javier Contreras <javi...@microsoft.com>
      Commit-Queue: Divyansh Mangal <dma...@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#1322588}
      Files:
      • M ui/views/accessibility/view_accessibility.cc
      • M ui/views/accessibility/view_accessibility.h
      Change size: M
      Delta: 2 files changed, 63 insertions(+), 0 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Javier Contreras, +1 by Jacques Newman
      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: If5c2b2163b90ddba29eab80ef3d2d280f59ac98a
      Gerrit-Change-Number: 5643912
      Gerrit-PatchSet: 17
      Gerrit-Owner: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Benjamin Beaudry <benjamin...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Divyansh Mangal <dma...@microsoft.com>
      Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
      Gerrit-Reviewer: Javier Contreras <javi...@microsoft.com>
      Gerrit-CC: (Julie)Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Akihiro Ota <akihi...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages