Fix dcheck failure in Document.cpp and don't fire a11y events for children changed on leaf or leaf descendant [chromium/src : master]

0 views
Skip to first unread message

Aaron Leventhal (Gerrit)

unread,
Aug 17, 2017, 2:08:43 PM8/17/17
to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

This change is ready for review.

View Change

2 comments:

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

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
Gerrit-Change-Number: 619367
Gerrit-PatchSet: 5
Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
Gerrit-CC: Alice Boxhall <abox...@chromium.org>
Gerrit-CC: Commit Bot <commi...@chromium.org>
Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
Gerrit-CC: Rob Buis <rob....@samsung.com>
Gerrit-Comment-Date: Thu, 17 Aug 2017 18:08:37 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No

Aaron Leventhal (Gerrit)

unread,
Aug 17, 2017, 2:29:11 PM8/17/17
to Hayato Ito, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Dominic Mazzoni

Aaron Leventhal would like Hayato Ito to review this change.

View Change

Fix dcheck failure in Document.cpp and don't fire a11y events for children changed on leaf or leaf descendant

CL #1 intentionally doesn't pass the test. I noticed that we trigger a dcheck failure and wanted to suggest a fix.
CL #2 passes by ensuring that the pseudo backdrop is never converted to a dialog element in Document.cpp
CL #3 is more efficient and avoids the extra work of recomputing tons of a11y attributes for each ChildrenChanged() call -- after all we just want to know if the ancestors were leaf nodes the last time this object could have descended from them.

Bug: None
Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
---
M third_party/WebKit/Source/core/dom/Document.cpp
M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 526e910..f09367e 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -6233,7 +6233,8 @@
}

HTMLDialogElement* Document::ActiveModalDialog() const {
- if (top_layer_elements_.IsEmpty())
+ if (top_layer_elements_.IsEmpty() ||
+ !isHTMLDialogElement(top_layer_elements_.back()))
return 0;
return toHTMLDialogElement(top_layer_elements_.back().Get());
}
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index b5fc4e6..bce32fa 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -2582,10 +2582,15 @@
if (!GetNode() && !GetLayoutObject())
return;

- // If this is not part of the accessibility tree because an ancestor
- // has only presentational children, invalidate this object's children but
- // skip sending a notification and skip walking up the ancestors.
- if (AncestorForWhichThisIsAPresentationalChild()) {
+ // If this is not part of the accessibility then invalidate this object's
+ // children but skip sending a notification and skip walking up the ancestors.
+ // Cases where this happens:
+ // - an ancestor has only presentational children, or
+ // - this or an ancestor is a leaf node
+ // Uses |cached_is_descendant_of_leaf_node_| to avoid updating cached
+ // attributes for eachc change via | UpdateCachedAttributeValuesIfNeeded()|.
+ if (AncestorForWhichThisIsAPresentationalChild() || !CanHaveChildren() ||
+ cached_is_descendant_of_leaf_node_) {
SetNeedsToUpdateChildren();
return;
}

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

Gerrit-Project: chromium/src
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
Gerrit-Change-Number: 619367
Gerrit-PatchSet: 5
Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>

Aaron Leventhal (Gerrit)

unread,
Aug 17, 2017, 2:29:12 PM8/17/17
to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

+foolip, I see you had some code that would have fixed this in the following CL:
https://codereview.chromium.org/2107233002/

View Change

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

    Gerrit-Project: chromium/src
    Gerrit-Branch: master
    Gerrit-MessageType: comment
    Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
    Gerrit-Change-Number: 619367
    Gerrit-PatchSet: 5
    Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
    Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
    Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
    Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
    Gerrit-CC: Alice Boxhall <abox...@chromium.org>
    Gerrit-CC: Commit Bot <commi...@chromium.org>
    Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
    Gerrit-CC: Rob Buis <rob....@samsung.com>
    Gerrit-Comment-Date: Thu, 17 Aug 2017 18:29:05 +0000
    Gerrit-HasComments: No
    Gerrit-HasLabels: No

    Aaron Leventhal (Gerrit)

    unread,
    Aug 17, 2017, 2:55:47 PM8/17/17
    to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Hayato Ito, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

    +foolip can you look at the Document.cpp changes? It's basically what you had in the reverted CL I mentioned.

    View Change

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

      Gerrit-Project: chromium/src
      Gerrit-Branch: master
      Gerrit-MessageType: comment
      Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
      Gerrit-Change-Number: 619367
      Gerrit-PatchSet: 5
      Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
      Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
      Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
      Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
      Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
      Gerrit-CC: Alice Boxhall <abox...@chromium.org>
      Gerrit-CC: Commit Bot <commi...@chromium.org>
      Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
      Gerrit-CC: Rob Buis <rob....@samsung.com>
      Gerrit-Comment-Date: Thu, 17 Aug 2017 18:55:41 +0000
      Gerrit-HasComments: No
      Gerrit-HasLabels: No

      Aaron Leventhal (Gerrit)

      unread,
      Aug 17, 2017, 3:35:13 PM8/17/17
      to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Hayato Ito, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

      hayato, foolip - I believe this fixes some real crashes.

      View Change

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

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: comment
        Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
        Gerrit-Change-Number: 619367
        Gerrit-PatchSet: 6
        Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
        Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
        Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
        Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
        Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
        Gerrit-CC: Alice Boxhall <abox...@chromium.org>
        Gerrit-CC: Commit Bot <commi...@chromium.org>
        Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
        Gerrit-CC: Rob Buis <rob....@samsung.com>
        Gerrit-Comment-Date: Thu, 17 Aug 2017 19:35:08 +0000
        Gerrit-HasComments: No
        Gerrit-HasLabels: No

        Aaron Leventhal (Gerrit)

        unread,
        Aug 17, 2017, 4:19:59 PM8/17/17
        to Philip Jägenstedt, Dominic Mazzoni, Hayato Ito, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Alice Boxhall, chromium...@chromium.org, Rob Buis, Jeongeun Kim, Commit Bot, Kentaro Hara, Nektarios Paisios

        Aaron Leventhal uploaded patch set #7 to this change.

        View Change

        Fix dcheck failure in Document.cpp and don't fire a11y events for children changed on leaf or leaf descendant

        Bug: None
        Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
        ---
        M third_party/WebKit/Source/core/dom/Document.cpp
        M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
        2 files changed, 16 insertions(+), 7 deletions(-)

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

        Gerrit-Project: chromium/src
        Gerrit-Branch: master
        Gerrit-MessageType: newpatchset
        Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
        Gerrit-Change-Number: 619367
        Gerrit-PatchSet: 7
        Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
        Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
        Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
        Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
        Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>

        Aaron Leventhal (Gerrit)

        unread,
        Aug 17, 2017, 4:20:08 PM8/17/17
        to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Hayato Ito, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

        CL #1 intentionally doesn't pass the test. I noticed that we trigger a dcheck failure and wanted to suggest a fix.
        CL #2 passes by ensuring that the pseudo backdrop is never converted to a dialog element in Document.cpp
        CL #3 is more efficient and avoids the extra work of recomputing tons of a11y attributes for each ChildrenChanged() call -- after all we just want to know if the ancestors were leaf nodes the last time this object could have descended from them.

        View Change

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

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
          Gerrit-Change-Number: 619367
          Gerrit-PatchSet: 7
          Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
          Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
          Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
          Gerrit-CC: Alice Boxhall <abox...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-CC: Rob Buis <rob....@samsung.com>
          Gerrit-Comment-Date: Thu, 17 Aug 2017 20:20:04 +0000
          Gerrit-HasComments: No
          Gerrit-HasLabels: No

          Dominic Mazzoni (Gerrit)

          unread,
          Aug 17, 2017, 4:37:48 PM8/17/17
          to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Hayato Ito, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

          Patch set 7:Code-Review +1

          View Change

          1 comment:

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

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
          Gerrit-Change-Number: 619367
          Gerrit-PatchSet: 7
          Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
          Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
          Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
          Gerrit-CC: Alice Boxhall <abox...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-CC: Rob Buis <rob....@samsung.com>
          Gerrit-Comment-Date: Thu, 17 Aug 2017 20:37:44 +0000
          Gerrit-HasComments: Yes
          Gerrit-HasLabels: Yes

          Philip Jägenstedt (Gerrit)

          unread,
          Aug 18, 2017, 8:58:41 AM8/18/17
          to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Dominic Mazzoni, Hayato Ito, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

          Patch set 7:Code-Review +1

          View Change

          1 comment:

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

          Gerrit-Project: chromium/src
          Gerrit-Branch: master
          Gerrit-MessageType: comment
          Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
          Gerrit-Change-Number: 619367
          Gerrit-PatchSet: 7
          Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
          Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
          Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
          Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
          Gerrit-CC: Alice Boxhall <abox...@chromium.org>
          Gerrit-CC: Commit Bot <commi...@chromium.org>
          Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
          Gerrit-CC: Rob Buis <rob....@samsung.com>
          Gerrit-Comment-Date: Fri, 18 Aug 2017 12:58:37 +0000
          Gerrit-HasComments: Yes
          Gerrit-HasLabels: Yes

          Hayato Ito (Gerrit)

          unread,
          Aug 20, 2017, 10:15:45 PM8/20/17
          to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

          Is there any bug id or a test? It might be better to have it to understand the context.

          View Change

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

            Gerrit-Project: chromium/src
            Gerrit-Branch: master
            Gerrit-MessageType: comment
            Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
            Gerrit-Change-Number: 619367
            Gerrit-PatchSet: 7
            Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
            Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
            Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
            Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
            Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
            Gerrit-CC: Alice Boxhall <abox...@chromium.org>
            Gerrit-CC: Commit Bot <commi...@chromium.org>
            Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
            Gerrit-CC: Rob Buis <rob....@samsung.com>
            Gerrit-Comment-Date: Mon, 21 Aug 2017 02:15:37 +0000
            Gerrit-HasComments: No
            Gerrit-HasLabels: No

            Aaron Leventhal (Gerrit)

            unread,
            Aug 21, 2017, 10:41:21 AM8/21/17
            to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

            Patch Set 7:

            Is there any bug id or a test? It might be better to have it to understand the context.

            @hayato, here is some context:

            • The first patch set in this CL causes the crash consistently, as can be seen in the test failures
            • I have filed https://bugs.chromium.org/p/chromium/issues/detail?id=757451 -- in it you can see which line in Element.cpp adds a different type of element (a pseudo backdrop element) to top_layer_elements_ . However, Document::ActiveModalDialog() assumes that all the elements in that list are HTML dialog elements.

            View Change

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

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: comment
              Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
              Gerrit-Change-Number: 619367
              Gerrit-PatchSet: 7
              Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
              Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
              Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
              Gerrit-CC: Alice Boxhall <abox...@chromium.org>
              Gerrit-CC: Commit Bot <commi...@chromium.org>
              Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
              Gerrit-CC: Kentaro Hara <har...@chromium.org>
              Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
              Gerrit-CC: Rob Buis <rob....@samsung.com>
              Gerrit-Comment-Date: Mon, 21 Aug 2017 14:41:16 +0000
              Gerrit-HasComments: No
              Gerrit-HasLabels: No

              Aaron Leventhal (Gerrit)

              unread,
              Aug 21, 2017, 10:41:33 AM8/21/17
              to Philip Jägenstedt, Dominic Mazzoni, Hayato Ito, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Alice Boxhall, chromium...@chromium.org, Rob Buis, Jeongeun Kim, Commit Bot, Kentaro Hara, Nektarios Paisios

              Aaron Leventhal uploaded patch set #8 to this change.

              View Change

              Fix dcheck failure in Document.cpp and don't fire a11y events for children changed on leaf or leaf descendant

              Bug: 757451

              Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
              ---
              M third_party/WebKit/Source/core/dom/Document.cpp
              M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
              2 files changed, 16 insertions(+), 7 deletions(-)

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

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: newpatchset
              Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
              Gerrit-Change-Number: 619367
              Gerrit-PatchSet: 8
              Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
              Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
              Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>

              Alice Boxhall (Gerrit)

              unread,
              Aug 21, 2017, 8:21:39 PM8/21/17
              to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

              View Change

              1 comment:

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

              Gerrit-Project: chromium/src
              Gerrit-Branch: master
              Gerrit-MessageType: comment
              Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
              Gerrit-Change-Number: 619367
              Gerrit-PatchSet: 8
              Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
              Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
              Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
              Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
              Gerrit-CC: Alice Boxhall <abox...@chromium.org>
              Gerrit-CC: Commit Bot <commi...@chromium.org>
              Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
              Gerrit-CC: Kentaro Hara <har...@chromium.org>
              Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
              Gerrit-CC: Rob Buis <rob....@samsung.com>
              Gerrit-Comment-Date: Tue, 22 Aug 2017 00:21:33 +0000
              Gerrit-HasComments: Yes
              Gerrit-HasLabels: No

              Hayato Ito (Gerrit)

              unread,
              Aug 21, 2017, 10:19:08 PM8/21/17
              to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

              Thanks. I still might miss something, but is there any relationship between two changes, Document.cpp and AxNodeObject.cpp? I don't see any relationship between these from the description. It might be better to make it clear.

              View Change

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

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: comment
                Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                Gerrit-Change-Number: 619367
                Gerrit-PatchSet: 8
                Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                Gerrit-CC: Commit Bot <commi...@chromium.org>
                Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                Gerrit-CC: Rob Buis <rob....@samsung.com>
                Gerrit-Comment-Date: Tue, 22 Aug 2017 02:19:00 +0000
                Gerrit-HasComments: No
                Gerrit-HasLabels: No

                Aaron Leventhal (Gerrit)

                unread,
                Aug 22, 2017, 8:21:55 AM8/22/17
                to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                View Change

                1 comment:

                  • Slightly misleading: it's more like "if this node's children are not a part of the accessibility tre […]

                    Right. Will fix.

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

                Gerrit-Project: chromium/src
                Gerrit-Branch: master
                Gerrit-MessageType: comment
                Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                Gerrit-Change-Number: 619367
                Gerrit-PatchSet: 8
                Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                Gerrit-CC: Commit Bot <commi...@chromium.org>
                Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                Gerrit-CC: Kentaro Hara <har...@chromium.org>
                Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                Gerrit-CC: Rob Buis <rob....@samsung.com>
                Gerrit-Comment-Date: Tue, 22 Aug 2017 12:21:52 +0000
                Gerrit-HasComments: Yes
                Gerrit-HasLabels: No

                Hayato Ito (Gerrit)

                unread,
                Aug 22, 2017, 11:14:57 PM8/22/17
                to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                LGTM

                It would be still difficult to see why the change of AXNodeObject::ChildrenChanged() would trigger DCHECK in Document.cpp.

                How the change of AXNodeObject::ChildrenChanged() and Document's _top_layer_elements are related?

                It would be better to record how the change of AXNodeObject::ChildrenChanged()
                would be a trigger to insert an unexpected thing in _top_layer_elements, AXNodeObject::ChildrenChanged(), if you know more context.

                If these two things are not directly related, it would be better to make it clear in the CL's description.

                Patch set 10:Code-Review +1

                View Change

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

                  Gerrit-Project: chromium/src
                  Gerrit-Branch: master
                  Gerrit-MessageType: comment
                  Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                  Gerrit-Change-Number: 619367
                  Gerrit-PatchSet: 10
                  Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                  Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                  Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                  Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                  Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                  Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                  Gerrit-CC: Commit Bot <commi...@chromium.org>
                  Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                  Gerrit-CC: Kentaro Hara <har...@chromium.org>
                  Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                  Gerrit-CC: Rob Buis <rob....@samsung.com>
                  Gerrit-Comment-Date: Wed, 23 Aug 2017 03:14:50 +0000
                  Gerrit-HasComments: No
                  Gerrit-HasLabels: Yes

                  Aaron Leventhal (Gerrit)

                  unread,
                  Aug 23, 2017, 9:03:18 AM8/23/17
                  to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                  Patch Set 10: Code-Review+1

                  LGTM

                  It would be still difficult to see why the change of AXNodeObject::ChildrenChanged() would trigger DCHECK in Document.cpp.

                  How the change of AXNodeObject::ChildrenChanged() and Document's _top_layer_elements are related?

                  It would be better to record how the change of AXNodeObject::ChildrenChanged()
                  would be a trigger to insert an unexpected thing in _top_layer_elements, AXNodeObject::ChildrenChanged(), if you know more context.

                  If these two things are not directly related, it would be better to make it clear in the CL's description.

                  They are related in that it changes the timing of when Document::ActiveModalDialog() is called. I didn't look into it more deeply because it's clear programming error. The list of elements is not guaranteed to be dialog elements, and the code in ActiveModalDialog() assumes it is. Yet we clearly see the pseudo backdrop elements elsewhere in code.

                  So although I don't understand 100% why it worked before, it's clear we were getting lucky. Although really, we weren't getting lucky, because go/crash shows that we do crash there.

                  To me this patch is as simple as a logical implementation of type safety -- not using a variable in two different ways.

                  View Change

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

                    Gerrit-Project: chromium/src
                    Gerrit-Branch: master
                    Gerrit-MessageType: comment
                    Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                    Gerrit-Change-Number: 619367
                    Gerrit-PatchSet: 10
                    Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                    Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                    Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                    Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                    Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                    Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                    Gerrit-CC: Commit Bot <commi...@chromium.org>
                    Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                    Gerrit-CC: Kentaro Hara <har...@chromium.org>
                    Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                    Gerrit-CC: Rob Buis <rob....@samsung.com>
                    Gerrit-Comment-Date: Wed, 23 Aug 2017 13:03:12 +0000
                    Gerrit-HasComments: No
                    Gerrit-HasLabels: No

                    Aaron Leventhal (Gerrit)

                    unread,
                    Aug 23, 2017, 9:03:34 AM8/23/17
                    to aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Commit Bot, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                    Patch set 10:Commit-Queue +2

                    View Change

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

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-MessageType: comment
                      Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                      Gerrit-Change-Number: 619367
                      Gerrit-PatchSet: 10
                      Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                      Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                      Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                      Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                      Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                      Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                      Gerrit-CC: Commit Bot <commi...@chromium.org>
                      Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                      Gerrit-CC: Kentaro Hara <har...@chromium.org>
                      Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                      Gerrit-CC: Rob Buis <rob....@samsung.com>
                      Gerrit-Comment-Date: Wed, 23 Aug 2017 13:03:30 +0000
                      Gerrit-HasComments: No
                      Gerrit-HasLabels: Yes

                      Commit Bot (Gerrit)

                      unread,
                      Aug 23, 2017, 10:50:17 AM8/23/17
                      to Aaron Leventhal, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                      Commit Bot merged this change.

                      View Change

                      Approvals: Dominic Mazzoni: Looks good to me Hayato Ito: Looks good to me Philip Jägenstedt: Looks good to me Aaron Leventhal: Commit
                      Fix dcheck failure in Document.cpp and don't fire a11y events for children changed on leaf or leaf descendant

                      Bug: 757451
                      Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                      Reviewed-on: https://chromium-review.googlesource.com/619367
                      Reviewed-by: Hayato Ito <hay...@chromium.org>
                      Reviewed-by: Dominic Mazzoni <dmaz...@chromium.org>
                      Reviewed-by: Philip Jägenstedt <foo...@chromium.org>
                      Commit-Queue: Aaron Leventhal <aleve...@chromium.org>
                      Cr-Commit-Position: refs/heads/master@{#496685}

                      ---
                      M third_party/WebKit/Source/core/dom/Document.cpp
                      M third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
                      2 files changed, 14 insertions(+), 8 deletions(-)

                      diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
                      index fa0bb41..aa54c64 100644
                      --- a/third_party/WebKit/Source/core/dom/Document.cpp
                      +++ b/third_party/WebKit/Source/core/dom/Document.cpp
                      @@ -6251,9 +6251,13 @@

                      }

                      HTMLDialogElement* Document::ActiveModalDialog() const {
                      - if (top_layer_elements_.IsEmpty())
                      -    return 0;
                      - return toHTMLDialogElement(top_layer_elements_.back().Get());
                      + for (auto it = top_layer_elements_.rbegin(); it != top_layer_elements_.rend();
                      + ++it) {
                      + if (isHTMLDialogElement(*it))
                      + return toHTMLDialogElement((*it).Get());
                      + }
                      +
                      + return nullptr;
                      }

                      void Document::exitPointerLock() {
                      diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
                      index 59b493f..af5e1c4 100644
                      --- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
                      +++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
                      @@ -2624,11 +2624,13 @@

                      if (!GetNode() && !GetLayoutObject())
                      return;

                      -  // If this is not part of the accessibility tree then invalidate this object's
                      - // children but skip sending a notification and skip walking up the ancestors.
                      - // This occurs when the ancestor is a leaf node.
                      - // Uses |cached_is_descendant_of_leaf_node_| to avoid expense of updating
                      - // cached attribs for each change via |UpdateCachedAttributeValuesIfNeeded()|.
                      + // If this node's children are not part of the accessibility tree then
                      + // invalidate the children but skip notification and walking up the ancestors.

                      + // Cases where this happens:
                      + // - an ancestor has only presentational children, or
                      + // - this or an ancestor is a leaf node
                      + // Uses |cached_is_descendant_of_leaf_node_| to avoid updating cached
                      + // attributes for eachc change via | UpdateCachedAttributeValuesIfNeeded()|.
                         if (!CanHaveChildren() || cached_is_descendant_of_leaf_node_) {
                      SetNeedsToUpdateChildren();
                      return;

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

                      Gerrit-Project: chromium/src
                      Gerrit-Branch: master
                      Gerrit-MessageType: merged
                      Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                      Gerrit-Change-Number: 619367
                      Gerrit-PatchSet: 11
                      Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                      Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                      Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                      Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                      Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                      Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                      Gerrit-CC: Alice Boxhall <abox...@chromium.org>

                      Hayato Ito (Gerrit)

                      unread,
                      Aug 23, 2017, 10:06:07 PM8/23/17
                      to Aaron Leventhal, Commit Bot, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                      Patch Set 10:

                      Patch Set 10: Code-Review+1

                      LGTM

                      It would be still difficult to see why the change of AXNodeObject::ChildrenChanged() would trigger DCHECK in Document.cpp.

                      How the change of AXNodeObject::ChildrenChanged() and Document's _top_layer_elements are related?

                      It would be better to record how the change of AXNodeObject::ChildrenChanged()
                      would be a trigger to insert an unexpected thing in _top_layer_elements, AXNodeObject::ChildrenChanged(), if you know more context.

                      If these two things are not directly related, it would be better to make it clear in the CL's description.

                      They are related in that it changes the timing of when Document::ActiveModalDialog() is called. I didn't look into it more deeply because it's clear programming error. The list of elements is not guaranteed to be dialog elements, and the code in ActiveModalDialog() assumes it is. Yet we clearly see the pseudo backdrop elements elsewhere in code.

                      So although I don't understand 100% why it worked before, it's clear we were getting lucky. Although really, we weren't getting lucky, because go/crash shows that we do crash there.

                      To me this patch is as simple as a logical implementation of type safety -- not using a variable in two different ways.

                      Thank you. Yeah, I agree you didn't have to look deeper. If I were you, I didn't look deeper. :)

                      It's sometimes helpful to record that two things are not directly related in the description or in the code reviews when we do git-blame around these change in the future. That will prevent us from having a wrong assumption.

                      View Change

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

                        Gerrit-Project: chromium/src
                        Gerrit-Branch: master
                        Gerrit-MessageType: comment
                        Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                        Gerrit-Change-Number: 619367
                        Gerrit-PatchSet: 11
                        Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                        Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                        Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                        Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                        Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                        Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                        Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                        Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                        Gerrit-CC: Kentaro Hara <har...@chromium.org>
                        Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                        Gerrit-CC: Rob Buis <rob....@samsung.com>
                        Gerrit-Comment-Date: Thu, 24 Aug 2017 02:06:02 +0000
                        Gerrit-HasComments: No
                        Gerrit-HasLabels: No

                        Aaron Leventhal (Gerrit)

                        unread,
                        Aug 24, 2017, 9:11:19 AM8/24/17
                        to Commit Bot, aboxhal...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dglazko...@chromium.org, dmazzon...@chromium.org, dougt...@chromium.org, dtseng...@chromium.org, eae+bli...@chromium.org, nektar...@chromium.org, yuzo+...@chromium.org, Hayato Ito, Philip Jägenstedt, Dominic Mazzoni, Rob Buis, Alice Boxhall, chromium...@chromium.org, Kentaro Hara, Jeongeun Kim, Nektarios Paisios

                        Patch Set 11:

                        Patch Set 10:

                        Patch Set 10: Code-Review+1

                        LGTM

                        It would be still difficult to see why the change of AXNodeObject::ChildrenChanged() would trigger DCHECK in Document.cpp.

                        How the change of AXNodeObject::ChildrenChanged() and Document's _top_layer_elements are related?

                        It would be better to record how the change of AXNodeObject::ChildrenChanged()
                        would be a trigger to insert an unexpected thing in _top_layer_elements, AXNodeObject::ChildrenChanged(), if you know more context.

                        If these two things are not directly related, it would be better to make it clear in the CL's description.

                        They are related in that it changes the timing of when Document::ActiveModalDialog() is called. I didn't look into it more deeply because it's clear programming error. The list of elements is not guaranteed to be dialog elements, and the code in ActiveModalDialog() assumes it is. Yet we clearly see the pseudo backdrop elements elsewhere in code.

                        So although I don't understand 100% why it worked before, it's clear we were getting lucky. Although really, we weren't getting lucky, because go/crash shows that we do crash there.

                        To me this patch is as simple as a logical implementation of type safety -- not using a variable in two different ways.

                        Thank you. Yeah, I agree you didn't have to look deeper. If I were you, I didn't look deeper. :)

                        It's sometimes helpful to record that two things are not directly related in the description or in the code reviews when we do git-blame around these change in the future. That will prevent us from having a wrong assumption.

                        I see, makes sense!

                        View Change

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

                          Gerrit-Project: chromium/src
                          Gerrit-Branch: master
                          Gerrit-MessageType: comment
                          Gerrit-Change-Id: I3275e6cb0dff8f2a308521d97cbd99d2efb8a217
                          Gerrit-Change-Number: 619367
                          Gerrit-PatchSet: 11
                          Gerrit-Owner: Aaron Leventhal <aleve...@chromium.org>
                          Gerrit-Reviewer: Aaron Leventhal <aleve...@chromium.org>
                          Gerrit-Reviewer: Commit Bot <commi...@chromium.org>
                          Gerrit-Reviewer: Dominic Mazzoni <dmaz...@chromium.org>
                          Gerrit-Reviewer: Hayato Ito <hay...@chromium.org>
                          Gerrit-Reviewer: Philip Jägenstedt <foo...@chromium.org>
                          Gerrit-CC: Alice Boxhall <abox...@chromium.org>
                          Gerrit-CC: Jeongeun Kim <je_jul...@chromium.org>
                          Gerrit-CC: Kentaro Hara <har...@chromium.org>
                          Gerrit-CC: Nektarios Paisios <nek...@chromium.org>
                          Gerrit-CC: Rob Buis <rob....@samsung.com>
                          Gerrit-Comment-Date: Thu, 24 Aug 2017 13:11:14 +0000
                          Gerrit-HasComments: No
                          Gerrit-HasLabels: No
                          Reply all
                          Reply to author
                          Forward
                          0 new messages