SupportsFocus() should return true for all scrollers [chromium/src : main]

10 views
Skip to first unread message

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 12:38:14 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #5 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
4 files changed, 26 insertions(+), 21 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 5
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 12:57:06 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #6 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.


Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
4 files changed, 26 insertions(+), 21 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 6

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 1:17:48 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #7 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
4 files changed, 28 insertions(+), 23 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 7

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 1:18:54 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Mason Freed, chromium...@chromium.org

Attention is currently required from: Mason Freed.

View Change

3 comments:

  • Commit Message:

  • File third_party/blink/renderer/core/dom/element.cc:

    • Patch Set #3, Line 6027: SupportsScrollerFocus

      I like that this is shorter name - the long one below is awful. (And I can say that - I chose it.) […]

      Done

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • Patch Set #3, Line 501: inline bool IsNonKeyboardFocusableShadowHost(const Element& element) {

      I'm having a hard time following the logic here. […]

      Honestly, that is my understanding as well (shadow host means there should be a shadow root). Let me change to this logic and see if that causes any test to fail.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 7
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Mon, 06 Nov 2023 18:18:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Mason Freed (Gerrit)

unread,
Nov 6, 2023, 6:37:05 PM11/6/23
to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang.

View Change

5 comments:

  • File third_party/blink/renderer/core/dom/element.h:

    • Patch Set #7, Line 1681: CanBeKeyboardFocusableScroller

      It would be good to add a comment about what this does also. And that it might update layout, right?

    • Patch Set #7, Line 1680:


      bool CanBeKeyboardFocusableScroller() const;
      // This checks whether the element is a scrollable container that should be
      // made keyboard focusable. Note that this is slow, because it must do a tree
      // walk to look for descendant focusable nodes.
      bool IsKeyboardFocusableScroller()

      It's always a good idea to put function declarations *above* the variables. So `element_data` above should be last, and these should be before that.

  • File third_party/blink/renderer/core/dom/element.cc:

    • Patch Set #7, Line 6074: // Note that IsKeyboardFocusableScroller is slow.

      I don't think you need this comment any more.

    • Patch Set #7, Line 6076: CanBeKeyboardFocusableScroller

      This will get called more often with this code. Previously, the call to IsScrollableContainerThatShould... method was last. Now, this will get hit for any element that doesn't have a `tabindex` attribute, which means we'll now be calling IsScrollableNode() more often, which (I think!) means we might be updating layout more often.

      Is that right? Are you worried?

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • Patch Set #7, Line 506:

      !(element.IsKeyboardFocusable() ||
      element.GetIntegralAttribute(html_names::kTabindexAttr, 0) < 0);

      Can you add a comment explaining this? On its face it doesn't make sense. It says we're a non-keyboard focusable shadow host if the element isn't keyboard focusable AND it has a >=0 tabindex. But tabindex>=0 makes it keyboard focusable.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 7
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Mon, 06 Nov 2023 23:36:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 8:32:10 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #8 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
4 files changed, 33 insertions(+), 23 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 8

Di Zhang (Gerrit)

unread,
Nov 6, 2023, 8:33:15 PM11/6/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org

Attention is currently required from: Mason Freed.

View Change

5 comments:

  • File third_party/blink/renderer/core/dom/element.h:

    • It would be good to add a comment about what this does also. […]

      Done

    • Patch Set #7, Line 1680:


      bool CanBeKeyboardFocusableScroller() const;
      // This checks whether the element is a scrollable container that should be
      // made keyboard focusable. Note that this is slow, because it must do a tree
      // walk to look for descendant focusable nodes.
      bool IsKeyboardFocusableScroller()

    • It's always a good idea to put function declarations *above* the variables. […]

      Done

  • File third_party/blink/renderer/core/dom/element.cc:

    • Until I fix the caching, IsKeyboardFocusableScroller() is still traversing the children to determine if the scroller can be focusable..

    • This will get called more often with this code. […]

      Logically, this order makes sense so I am not _that_ worried.
      During SupportsFocus/IsFocusable, we check if element is a scroller.
      During IsKeyboardFocusable, we check if element is a scroller again if tabindex is not set. But when we reached this point, I would expect the layout to be up to date.

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • Patch Set #7, Line 506:

      !(element.IsKeyboardFocusable() ||
      element.GetIntegralAttribute(html_names::kTabindexAttr, 0) < 0);

    • Can you add a comment explaining this? On its face it doesn't make sense. […]

      Done

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 8
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Tue, 07 Nov 2023 01:33:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Mason Freed (Gerrit)

unread,
Nov 8, 2023, 8:39:14 PM11/8/23
to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang.

View Change

3 comments:

  • File third_party/blink/renderer/core/dom/element.cc:

    • Patch Set #1, Line 6078: SupportsFocus

      If we call IsScrollableContainerThatShouldBeKeyboardFocusable() in IsFocusable, then there is no nee […]

      I think this comment has been addressed, correct?

  • File third_party/blink/renderer/core/dom/element.cc:

    • Until I fix the caching, IsKeyboardFocusableScroller() is still traversing the children to determine […]

      Yeah, I just meant that the original comment was pointing out that it gets called **twice**. Now that it's not being called by SupportsFocus any longer, it's probably not necessary to point out that it is slow.

    • Logically, this order makes sense so I am not _that_ worried. […]

      Ok, sounds good! We should just watch for performance regressions after this lands.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 8
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Nov 2023 01:39:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>
Comment-In-Reply-To: Mason Freed <mason...@google.com>
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Di Zhang (Gerrit)

unread,
Nov 9, 2023, 7:10:44 PM11/9/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #9 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js

M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
5 files changed, 35 insertions(+), 19 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 9

Di Zhang (Gerrit)

unread,
Nov 9, 2023, 8:09:41 PM11/9/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #10 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
5 files changed, 34 insertions(+), 18 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 10

Di Zhang (Gerrit)

unread,
Nov 9, 2023, 8:10:03 PM11/9/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org

Attention is currently required from: Mason Freed.

Patch set 10:Commit-Queue +1

View Change

3 comments:

  • File chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js:

    • Patch Set #9, Line 426: .call(doCmd('nextObject'))

      With the mismatch between "IsFocussable" and "IsKeyboardFocusable" now, this needs an extra tab to get to the next speech item (to pass the focus on scroller with child).
      This is because chromevox uses ax_object.cc code, which uses ComputeCanSetFocusAttribute() (return elem->SupportsFocus())

  • File third_party/blink/renderer/core/dom/element.cc:

    • Patch Set #1, Line 6078: SupportsFocus

      If we call IsScrollableContainerThatShouldBeKeyboardFocusable() in IsFocusable, then there is no nee […]

    • Acknowledged

  • File third_party/blink/renderer/core/dom/element.cc:

    • Yeah, I just meant that the original comment was pointing out that it gets called **twice**. […]

      Acknowledged

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 10
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Nov 2023 01:09:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Mason Freed (Gerrit)

unread,
Nov 10, 2023, 5:13:34 PM11/10/23
to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang.

View Change

4 comments:

  • Patchset:

    • Patch Set #10:

      Only one real question, about the tabindex thing. I don't understand that.

  • File chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js:

    • With the mismatch between "IsFocussable" and "IsKeyboardFocusable" now, this needs an extra tab to g […]

      Interesting. Is it that this test actually contains a scroller that is now keyboard focusable (because it has no descendent focusable elements)? Or is it that the test (perhaps incorrectly) uses SupportsFocus() when it should use IsKeyboardFocusable()?

      (I'm ok with this change, it's more for whomever will review this file.)

  • File third_party/blink/renderer/core/dom/element.h:

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • Patch Set #10, Line 510: tabindex is set to negative

      This part I really still do not understand. If its tabindex is negative, then it **isn't** keyboard focusable.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 10
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Nov 2023 22:13:25 +0000

Di Zhang (Gerrit)

unread,
Nov 10, 2023, 6:33:06 PM11/10/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org

Attention is currently required from: Di Zhang.

Di Zhang uploaded patch set #11 to this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
5 files changed, 38 insertions(+), 18 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11

Di Zhang (Gerrit)

unread,
Nov 10, 2023, 6:34:41 PM11/10/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, Mason Freed, chromium...@chromium.org

Attention is currently required from: Mason Freed.

Patch set 11:Commit-Queue +1

View Change

3 comments:

  • File chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js:

    • Rephrased (?)

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • This part I really still do not understand. […]

      Rewrote this to explain better. I agree with your statement, this condition is meant to check for when KF is false. In that case, tabindex could be negative, but isn't always the case (i.e. scroller with focusable children).

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Fri, 10 Nov 2023 23:34:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Mason Freed (Gerrit)

unread,
Nov 13, 2023, 3:05:14 PM11/13/23
to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang.

Patch set 11:Code-Review +1

View Change

4 comments:

  • Patchset:

  • File chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js:

    • It seems that this test contains a scroller is not keyboard focusable, but do support focus (so _has […]

      Ok, if the person who wrote the test is ok, then I guess ok.

  • File third_party/blink/renderer/core/dom/element.h:

    • Rephrased (?)

      👍

  • File third_party/blink/renderer/core/page/focus_controller.cc:

    • Rewrote this to explain better. […]

      Yes, thanks. That helps.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Mon, 13 Nov 2023 20:05:04 +0000

Di Zhang (Gerrit)

unread,
Nov 13, 2023, 3:10:28 PM11/13/23
to Akihiro Ota, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Mason Freed

Attention is currently required from: Akihiro Ota.

Di Zhang would like Akihiro Ota to review this change.

View Change

SupportsFocus() should return true for all scrollers

For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
traverse through the scroller's children to find focusable child.

This isn't necessary to check if an element should support focus as
all scrollers should be focusable. Instead, we call IsScrollableNode().

We also rename function
IsScrollableContainerThatShouldBeKeyboardFocusable to
IsKeyboardFocusableScroller.

Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Bug: 1499038
---
M chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/dom/element.h
M third_party/blink/renderer/core/page/focus_controller.cc
M third_party/blink/renderer/platform/runtime_enabled_features.json5
5 files changed, 38 insertions(+), 18 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Akihiro Ota <akihi...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Akihiro Ota <akihi...@chromium.org>

Di Zhang (Gerrit)

unread,
Nov 13, 2023, 3:10:37 PM11/13/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Akihiro Ota, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Akihiro Ota.

Patch set 11:Commit-Queue +1

View Change

2 comments:

  • Patchset:

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Akihiro Ota <akihi...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Akihiro Ota <akihi...@chromium.org>
Gerrit-Comment-Date: Mon, 13 Nov 2023 20:10:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Akihiro Ota (Gerrit)

unread,
Nov 13, 2023, 3:22:07 PM11/13/23
to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang.

Patch set 11:Code-Review +1

View Change

1 comment:

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
Gerrit-Change-Number: 5001904
Gerrit-PatchSet: 11
Gerrit-Owner: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Akihiro Ota <akihi...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Mon, 13 Nov 2023 20:21:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Di Zhang (Gerrit)

unread,
Nov 13, 2023, 4:31:16 PM11/13/23
to blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Patch set 11:Commit-Queue +2

View Change

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

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
    Gerrit-Change-Number: 5001904
    Gerrit-PatchSet: 11
    Gerrit-Owner: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Akihiro Ota <akihi...@chromium.org>
    Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Comment-Date: Mon, 13 Nov 2023 21:31:04 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes

    Chromium LUCI CQ (Gerrit)

    unread,
    Nov 13, 2023, 4:35:44 PM11/13/23
    to Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Akihiro Ota, Mason Freed, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change

    Approvals: Mason Freed: Looks good to me Akihiro Ota: Looks good to me Di Zhang: Commit
    SupportsFocus() should return true for all scrollers

    For feature KeyboardFocusableScrollers, SupportsFocus() call IsScrollableContainerThatShouldBeKeyboardFocusable which can potentially
    traverse through the scroller's children to find focusable child.

    This isn't necessary to check if an element should support focus as
    all scrollers should be focusable. Instead, we call IsScrollableNode().

    We also rename function
    IsScrollableContainerThatShouldBeKeyboardFocusable to
    IsKeyboardFocusableScroller.

    Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
    Bug: 1499038
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5001904
    Reviewed-by: Mason Freed <mas...@chromium.org>
    Commit-Queue: Di Zhang <dizh...@chromium.org>
    Reviewed-by: Akihiro Ota <akihi...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1223868}

    ---
    M chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js
    M third_party/blink/renderer/core/dom/element.cc
    M third_party/blink/renderer/core/dom/element.h
    M third_party/blink/renderer/core/page/focus_controller.cc
    M third_party/blink/renderer/platform/runtime_enabled_features.json5
    5 files changed, 38 insertions(+), 18 deletions(-)


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

    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Iaa6b4fc754a5b15978c3ebfa4d006b5a491b3e7d
    Gerrit-Change-Number: 5001904
    Gerrit-PatchSet: 12
    Gerrit-Owner: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Akihiro Ota <akihi...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>

    Darren Shen (Gerrit)

    unread,
    Nov 13, 2023, 8:44:03 PM11/13/23
    to Chromium LUCI CQ, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, Mason Freed, chromium...@chromium.org

    Darren Shen has created a revert of this change.

    View Change

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

    Gerrit-MessageType: revert
    Reply all
    Reply to author
    Forward
    0 new messages