Deflake focus tests that relied on stale layout information [chromium/src : main]

0 views
Skip to first unread message

Di Zhang (Gerrit)

unread,
Sep 15, 2023, 2:29:33 PM9/15/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Philip Rogers.

Di Zhang uploaded patch set #2 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

KeyboardFocusableScrollers is enabled for tests and allows focus for
scrollable elements. The logic for whether an object is scrollable
depends on layout size, but `IsScrollableNode` was called without
updating layout. This patch adds a CHECK that layout is up to date, and
updates layout in `Element::Focus`.

Bug: 1444332
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/page/spatial_navigation.cc
2 files changed, 7 insertions(+), 0 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 2
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>

Di Zhang (Gerrit)

unread,
Sep 15, 2023, 5:47:26 PM9/15/23
to Mason Freed, blink-re...@chromium.org, blink-...@chromium.org, Philip Rogers

Attention is currently required from: Mason Freed, Philip Rogers.

Di Zhang would like Mason Freed to review this change authored by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

KeyboardFocusableScrollers is enabled for tests and allows focus for
scrollable elements. The logic for whether an object is scrollable
depends on layout size, but `IsScrollableNode` was called without
updating layout. This patch adds a CHECK that layout is up to date, and
updates layout in `Element::Focus`.

Bug: 1444332
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/page/spatial_navigation.cc
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
index 2bad349f..1bfac14 100644
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -5224,6 +5224,12 @@
GetDocument().UpdateStyleAndLayoutTreeForNode(this,
DocumentUpdateReason::kFocus);

+ // `IsScrollableNode` is used by keyboard focusable scrollers (see:
+ // `Element::IsKeyboardFocusable`) and requires up-to-date layout.
+ if (RuntimeEnabledFeatures::KeyboardFocusableScrollersEnabled()) {
+ GetDocument().UpdateStyleAndLayout(DocumentUpdateReason::kFocus);
+ }
+
// https://html.spec.whatwg.org/C/#focusing-steps
//
// 1. If new focus target is not a focusable area, ...
diff --git a/third_party/blink/renderer/core/page/spatial_navigation.cc b/third_party/blink/renderer/core/page/spatial_navigation.cc
index 79869f51..b5e40d83 100644
--- a/third_party/blink/renderer/core/page/spatial_navigation.cc
+++ b/third_party/blink/renderer/core/page/spatial_navigation.cc
@@ -336,6 +336,7 @@
return true;

if (auto* box = DynamicTo<LayoutBox>(node->GetLayoutObject())) {
+ CHECK(!box->NeedsLayout());
return box->IsUserScrollable();
}
return false;

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

Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 2
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>

Di Zhang (Gerrit)

unread,
Sep 15, 2023, 5:47:33 PM9/15/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mason Freed, Philip Rogers.

View Change

1 comment:

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

    • Patch Set #2, Line 339: CHECK(!box->NeedsLayout());

      This check is failing because the check for SupportsFocus() (which will call IsScrollableNode) is often used independent from whether Focus() gets called.

      Do you think the call GetDocument().UpdateStyleAndLayout() should be in SupportsFocus() instead? Although that would really increase the number of update style calls since not all elements that can support focus will get focused.

      What about calling it in Element::IsScrollableContainerThatShouldBeKeyboardFocusable()?

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 2
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Fri, 15 Sep 2023 21:47:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Mason Freed (Gerrit)

unread,
Sep 18, 2023, 4:34:33 PM9/18/23
to Philip Rogers, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

View Change

1 comment:

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

    • This check is failing because the check for SupportsFocus() (which will call IsScrollableNode) is of […]

      So I think it'd be a bad idea to call `UpdateStyleAndLayout()` in SupportsFocus, for performance reasons. But we could call something like `UpdateStyleAndLayoutIfNeeded` if there was such a thing on `Document` (there isn't currently). I think it's perfectly reasonable to update style and layout to check on focusability, if style/layout are dirty. And yes, I think `IsScrollableContainerThatShouldBeKeyboardFocusable()` is probably the right place to put that call, since that comes after a bunch of faster checks.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 2
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Mon, 18 Sep 2023 20:34:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>

Di Zhang (Gerrit)

unread,
Sep 19, 2023, 6:52:38 PM9/19/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

Di Zhang uploaded patch set #3 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

KeyboardFocusableScrollers is enabled for tests and allows focus for
scrollable elements. The logic for whether an object is scrollable
depends on layout size, but `IsScrollableNode` was called without
updating layout. This patch adds a CHECK that layout is up to date, and
updates layout in `Element::Focus`.

Bug: 1444332
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
M third_party/blink/renderer/core/dom/element.cc
M third_party/blink/renderer/core/page/spatial_navigation.cc
2 files changed, 4 insertions(+), 4 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 3

Di Zhang (Gerrit)

unread,
Sep 19, 2023, 7:07:33 PM9/19/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Philip Rogers.

View Change

2 comments:

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

    • Patch Set #3, Line 5515: // FIXME: supportsFocus() can be called when layout is not up to date.

      This FIXME is outdated, the function layoutObjectIsFocusable doesn't exist anymore.
      Further, the checks below (outside the scroller check) don't need an updated layout.

    • Patch Set #3, Line 5518: DocumentLifecycle::DisallowTransitionScope scope(GetDocument().Lifecycle());

      I wonder if having this line will block the UpdateStyleAndLayout() call.
      masonf@, why is this line necessary?

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 3
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Comment-Date: Tue, 19 Sep 2023 23:07:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Mason Freed (Gerrit)

unread,
Sep 20, 2023, 4:15:40 PM9/20/23
to Philip Rogers, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

View Change

1 comment:

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

    • Patch Set #3, Line 5518: DocumentLifecycle::DisallowTransitionScope scope(GetDocument().Lifecycle());

      I wonder if having this line will block the UpdateStyleAndLayout() call. […]

      Yes, this will cause a CHECK failure if you call UpdateStyleAndLayout, so this would need to be removed. This was here before to "prove" that SupportsFocus did not update style or layout. This CL changes that, so you'll need to make sure to update the comment above SupportsFocus in element.h accordingly. But this line can/should be removed.

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 3
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Wed, 20 Sep 2023 20:15:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Di Zhang <dizh...@chromium.org>

Di Zhang (Gerrit)

unread,
Sep 20, 2023, 4:35:11 PM9/20/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

Di Zhang uploaded patch set #4 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

KeyboardFocusableScrollers is enabled for tests and allows focus for
scrollable elements. The logic for whether an object is scrollable
depends on layout size, but `IsScrollableNode` was called without
updating layout. This patch adds a CHECK that layout is up to date, and
updates layout in `Element::Focus`.

Bug: 1444332
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
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/spatial_navigation.cc
3 files changed, 7 insertions(+), 7 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 4

Di Zhang (Gerrit)

unread,
Sep 20, 2023, 4:59:40 PM9/20/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

Di Zhang uploaded patch set #5 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

KeyboardFocusableScrollers is enabled for tests and allows focus for
scrollable elements. The logic for whether an object is scrollable
depends on layout size, but `IsScrollableNode` was called without
updating layout. This patch adds a CHECK that layout is up to date, and
updates layout in `Element::Focus`.

Bug: 1444332
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
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/spatial_navigation.cc
3 files changed, 6 insertions(+), 6 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 5

Di Zhang (Gerrit)

unread,
Sep 20, 2023, 5:26:21 PM9/20/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Philip Rogers.

Di Zhang uploaded patch set #6 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

The logic for whether an object is scrollable depends on layout size,
but `IsScrollableNode` was called without updating layout. This patch
updates layout if needed before checking if element is a scrollable
node.

Fixed: 1445159

Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
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/spatial_navigation.cc
3 files changed, 6 insertions(+), 6 deletions(-)

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

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

Di Zhang (Gerrit)

unread,
Sep 20, 2023, 7:35:42 PM9/20/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Philip Rogers.

Di Zhang uploaded patch set #7 to the change originally created by Philip Rogers.

View Change

Deflake focus tests that relied on stale layout information

The logic for whether an object is scrollable depends on layout size,
but `IsScrollableNode` was called without updating layout. This patch
updates layout if needed before checking if element is a scrollable
node.

Fixed: 1445159
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
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/spatial_navigation.cc
A third_party/blink/web_tests/shadow-dom/focus-navigation/focus-scroller-layout-update.html
4 files changed, 34 insertions(+), 6 deletions(-)

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

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

Di Zhang (Gerrit)

unread,
Sep 20, 2023, 7:36:34 PM9/20/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mason Freed, Philip Rogers.

Patch set 7:Commit-Queue +1

View Change

2 comments:

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

    • Yes, this will cause a CHECK failure if you call UpdateStyleAndLayout, so this would need to be remo […]

      Done

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

    • So I think it'd be a bad idea to call `UpdateStyleAndLayout()` in SupportsFocus, for performance rea […]

      Done

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 7
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Wed, 20 Sep 2023 23:36:23 +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,
Sep 26, 2023, 7:30:45 PM9/26/23
to Philip Rogers, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

Patch set 7:Code-Review +1

View Change

5 comments:

  • Patchset:

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

    • Patch Set #7, Line 1265:

      and
      // it might update layout itself to check a condition (for example to see if
      // an element's up-to-date layout is a scroller).

      nit:

      `but in some cases it might run a style/layout lifecycle update on the document.`

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

    • Patch Set #3, Line 5515: // FIXME: supportsFocus() can be called when layout is not up to date.

      This FIXME is outdated, the function layoutObjectIsFocusable doesn't exist anymore. […]

      Done

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

    • Patch Set #7, Line 331: IsScrollableNode

      You should update the comment above this function in the .h file to include that it might trigger a style/layout lifecycle update.

  • File third_party/blink/web_tests/shadow-dom/focus-navigation/focus-scroller-layout-update.html:

    • Patch Set #7:

      Nice test. Did you make sure it fails before this patch?

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 7
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Tue, 26 Sep 2023 23:30:33 +0000

Di Zhang (Gerrit)

unread,
Sep 27, 2023, 4:25:19 PM9/27/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org

Attention is currently required from: Di Zhang, Mason Freed, Philip Rogers.

Di Zhang uploaded patch set #8 to the change originally created by Philip Rogers.

View Change

The following approvals got outdated and were removed: Code-Review+1 by Mason Freed

The change is no longer submittable: Code-Owners and Code-Review are unsatisfied now.

Deflake focus tests that relied on stale layout information

The logic for whether an object is scrollable depends on layout size,
but `IsScrollableNode` was called without updating layout. This patch
updates layout if needed before checking if element is a scrollable
node.

Fixed: 1445159
Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
---
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/spatial_navigation.cc
M third_party/blink/renderer/core/page/spatial_navigation.h
A third_party/blink/web_tests/shadow-dom/focus-navigation/focus-scroller-layout-update.html
5 files changed, 37 insertions(+), 9 deletions(-)

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

Gerrit-MessageType: newpatchset
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 8
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>

Di Zhang (Gerrit)

unread,
Sep 27, 2023, 4:26:42 PM9/27/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Mason Freed, Philip Rogers.

Patch set 8:Commit-Queue +2

View Change

4 comments:

  • Patchset:

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

    • Patch Set #7, Line 1265:

      and
      // it might update layout itself to check a condition (for example to see if
      // an element's up-to-date layout is a scroller).

    • nit: […]

      Done

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

    • You should update the comment above this function in the . […]

      Done

  • File third_party/blink/web_tests/shadow-dom/focus-navigation/focus-scroller-layout-update.html:

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 8
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Wed, 27 Sep 2023 20:26:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>

Mason Freed (Gerrit)

unread,
Sep 27, 2023, 5:15:57 PM9/27/23
to Philip Rogers, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Di Zhang, Philip Rogers.

Patch set 8:Code-Review +1

View Change

1 comment:

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

Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
Gerrit-Change-Number: 4527136
Gerrit-PatchSet: 8
Gerrit-Owner: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Di Zhang <dizh...@chromium.org>
Gerrit-Comment-Date: Wed, 27 Sep 2023 21:15:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Di Zhang (Gerrit)

unread,
Sep 28, 2023, 1:00:48 PM9/28/23
to Philip Rogers, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Philip Rogers.

Patch set 8:Commit-Queue +2

View Change

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

    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
    Gerrit-Change-Number: 4527136
    Gerrit-PatchSet: 8
    Gerrit-Owner: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Di Zhang <dizh...@chromium.org>
    Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Attention: Philip Rogers <p...@chromium.org>
    Gerrit-Comment-Date: Thu, 28 Sep 2023 17:00:34 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes

    Chromium LUCI CQ (Gerrit)

    unread,
    Sep 28, 2023, 1:08:01 PM9/28/23
    to Philip Rogers, Di Zhang, blink-re...@chromium.org, blink-...@chromium.org, Mason Freed, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change

    Approvals: Di Zhang: Commit Mason Freed: Looks good to me
    Deflake focus tests that relied on stale layout information

    The logic for whether an object is scrollable depends on layout size,
    but `IsScrollableNode` was called without updating layout. This patch
    updates layout if needed before checking if element is a scrollable
    node.

    Fixed: 1445159
    Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4527136
    Commit-Queue: Di Zhang <dizh...@chromium.org>
    Reviewed-by: Mason Freed <mas...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1202725}

    ---
    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/spatial_navigation.cc
    M third_party/blink/renderer/core/page/spatial_navigation.h
    A third_party/blink/web_tests/shadow-dom/focus-navigation/focus-scroller-layout-update.html
    5 files changed, 37 insertions(+), 9 deletions(-)


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

    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I647df39bb5709dea8f0ba285b184247556d8361e
    Gerrit-Change-Number: 4527136
    Gerrit-PatchSet: 9
    Gerrit-Owner: Philip Rogers <p...@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>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Reply all
    Reply to author
    Forward
    0 new messages