Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -82457,16 +82457,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
popover</span> given <var>newPopover</var>'s parent node within the <span>flat
tree</span>.</p></li>

<li>
<p>For each <span data-x="concept-button">button</span> <var>invoker</var> that is a
<span>descendant</span> of <var>newPopover</var>'s <span>root</span>, in <span>tree
order</span>:</p>

<ol>
<li><p>If <var>invoker</var>'s <span>popover target element</span> is <var>newPopover</var>,
then run <var>checkAncestor</var> given <var>invoker</var>.</p></li>
</ol>
</li>
<li><p>Run <var>checkAncestor</var> given <var>newPopover</var>'s <span>popover
invoker</span>.</p></li>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an assert here that newPopover is showing? As per a3b356e.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding this assert in chromium either at the beginning or end of "find topmost popover ancestor" and it got hit in several tests.
Why should it be showing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because only when it's showing do we know that it's set correctly. We don't clear it at a particularly deterministic time at the moment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think the issue is that during showPopover, newPopover won't be showing yet. See showPopover. Step 2 should reset the invoker to null (so we're ok), step 8.2 runs "topmost popover ancestor" (this algo), and step 13 sets it to showing. So a) we're ok, and b) you can't assert that it's showing here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!


<li><p>return <var>topmostPopoverAncestor</var>.</p></li>
</ol>
Expand Down