Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland "[anchor-position] Make anchor attribute work for non-popovers" #39114

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 21, 2023

This reverts commit 80faa9503f457b4a09fa31912eafc7eefd585568.

Reason for reland: Performance regression fixed. See diff with PS#1.

The original patch used an expensive condition to decide whether to
install an AnchorElementObserver, which caused performance issues. This
patch changed to installing observer only when the anchor attribute
(IDL or content) is modified.

Original change's description:

Revert "[anchor-position] Make anchor attribute work for non-popovers"

This reverts commit 4abd0d04120561b80ad2e6dd398651d7e909463f.

Reason for revert: Caused a lot of performance regressions.

Original change's description:

[anchor-position] Make anchor attribute work for non-popovers

This patch reimplements how we mark elements that are implicit anchors.
Previously it was only marked for popover element's implicit anchors,
and now it works for all implicit anchors. This is done by a new class
AnchorElementObserver that observes all possible changes in implicit
anchor and replaces the old PopoverAnchorObserver.

This patch also reveals two existing issues:

  1. Element::GetElementAttribute() may return non-null result even if
    the element is out of tree scope. As fixing the bug is out of the
    scope here, this patch just works around it. crbug.com/1425215 was
    filed.
  2. popover-anchor-idl-property.html has some bugs that made it pass
    previously. This patch fixes those bugs.

Fixed: 1417346
Change-Id: I798977ab1ed7df0c528b7eb98c64fc04476e6106
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4338487
Commit-Queue: Xiaocheng Hu <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1118933}

Bug: 1425610, 1425635, 1425650
Change-Id: I50a650f011e097c48c0efd110cf765d0df5835e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353985
Bot-Commit: Rubber Stamper <[email protected]>
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1119483}

Bug: 1425610, 1425635, 1425650
Change-Id: I222e0cc302e16f208314641b153ce1746ca814a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355591
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1121203}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

This reverts commit 80faa9503f457b4a09fa31912eafc7eefd585568.

Reason for reland: Performance regression fixed. See diff with PS#1.

The original patch used an expensive condition to decide whether to
install an AnchorElementObserver, which caused performance issues. This
patch changed to installing observer only when the `anchor` attribute
(IDL or content) is modified.

Original change's description:
> Revert "[anchor-position] Make `anchor` attribute work for non-popovers"
>
> This reverts commit 4abd0d04120561b80ad2e6dd398651d7e909463f.
>
> Reason for revert: Caused a lot of performance regressions.
>
> Original change's description:
> > [anchor-position] Make `anchor` attribute work for non-popovers
> >
> > This patch reimplements how we mark elements that are implicit anchors.
> > Previously it was only marked for popover element's implicit anchors,
> > and now it works for all implicit anchors. This is done by a new class
> > AnchorElementObserver that observes all possible changes in implicit
> > anchor and replaces the old PopoverAnchorObserver.
> >
> > This patch also reveals two existing issues:
> > 1. Element::GetElementAttribute() may return non-null result even if
> >    the element is out of tree scope. As fixing the bug is out of the
> >    scope here, this patch just works around it. crbug.com/1425215 was
> >    filed.
> > 2. popover-anchor-idl-property.html has some bugs that made it pass
> >    previously. This patch fixes those bugs.
> >
> >
> > Fixed: 1417346
> > Change-Id: I798977ab1ed7df0c528b7eb98c64fc04476e6106
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4338487
> > Commit-Queue: Xiaocheng Hu <[email protected]>
> > Reviewed-by: Mason Freed <[email protected]>
> > Cr-Commit-Position: refs/heads/main@{#1118933}
>
> Bug: 1425610, 1425635, 1425650
> Change-Id: I50a650f011e097c48c0efd110cf765d0df5835e4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353985
> Bot-Commit: Rubber Stamper <[email protected]>
> Reviewed-by: Mason Freed <[email protected]>
> Commit-Queue: Xiaocheng Hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1119483}

Bug: 1425610, 1425635, 1425650
Change-Id: I222e0cc302e16f208314641b153ce1746ca814a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355591
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1121203}
@sj0602 sj0602 merged commit fd7ffa7 into master Mar 23, 2023
@sj0602 sj0602 deleted the chromium-export-cl-4355591 branch March 23, 2023 18:06
marcoscaceres pushed a commit that referenced this pull request Mar 28, 2023
…rs" (#39114)

This reverts commit 80faa9503f457b4a09fa31912eafc7eefd585568.

Reason for reland: Performance regression fixed. See diff with PS#1.

The original patch used an expensive condition to decide whether to
install an AnchorElementObserver, which caused performance issues. This
patch changed to installing observer only when the `anchor` attribute
(IDL or content) is modified.

Original change's description:
> Revert "[anchor-position] Make `anchor` attribute work for non-popovers"
>
> This reverts commit 4abd0d04120561b80ad2e6dd398651d7e909463f.
>
> Reason for revert: Caused a lot of performance regressions.
>
> Original change's description:
> > [anchor-position] Make `anchor` attribute work for non-popovers
> >
> > This patch reimplements how we mark elements that are implicit anchors.
> > Previously it was only marked for popover element's implicit anchors,
> > and now it works for all implicit anchors. This is done by a new class
> > AnchorElementObserver that observes all possible changes in implicit
> > anchor and replaces the old PopoverAnchorObserver.
> >
> > This patch also reveals two existing issues:
> > 1. Element::GetElementAttribute() may return non-null result even if
> >    the element is out of tree scope. As fixing the bug is out of the
> >    scope here, this patch just works around it. crbug.com/1425215 was
> >    filed.
> > 2. popover-anchor-idl-property.html has some bugs that made it pass
> >    previously. This patch fixes those bugs.
> >
> >
> > Fixed: 1417346
> > Change-Id: I798977ab1ed7df0c528b7eb98c64fc04476e6106
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4338487
> > Commit-Queue: Xiaocheng Hu <[email protected]>
> > Reviewed-by: Mason Freed <[email protected]>
> > Cr-Commit-Position: refs/heads/main@{#1118933}
>
> Bug: 1425610, 1425635, 1425650
> Change-Id: I50a650f011e097c48c0efd110cf765d0df5835e4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353985
> Bot-Commit: Rubber Stamper <[email protected]>
> Reviewed-by: Mason Freed <[email protected]>
> Commit-Queue: Xiaocheng Hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1119483}

Bug: 1425610, 1425635, 1425650
Change-Id: I222e0cc302e16f208314641b153ce1746ca814a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355591
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1121203}

Co-authored-by: Xiaocheng Hu <[email protected]>
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Mar 29, 2023
…rs" (web-platform-tests#39114)

This reverts commit 80faa9503f457b4a09fa31912eafc7eefd585568.

Reason for reland: Performance regression fixed. See diff with PS#1.

The original patch used an expensive condition to decide whether to
install an AnchorElementObserver, which caused performance issues. This
patch changed to installing observer only when the `anchor` attribute
(IDL or content) is modified.

Original change's description:
> Revert "[anchor-position] Make `anchor` attribute work for non-popovers"
>
> This reverts commit 4abd0d04120561b80ad2e6dd398651d7e909463f.
>
> Reason for revert: Caused a lot of performance regressions.
>
> Original change's description:
> > [anchor-position] Make `anchor` attribute work for non-popovers
> >
> > This patch reimplements how we mark elements that are implicit anchors.
> > Previously it was only marked for popover element's implicit anchors,
> > and now it works for all implicit anchors. This is done by a new class
> > AnchorElementObserver that observes all possible changes in implicit
> > anchor and replaces the old PopoverAnchorObserver.
> >
> > This patch also reveals two existing issues:
> > 1. Element::GetElementAttribute() may return non-null result even if
> >    the element is out of tree scope. As fixing the bug is out of the
> >    scope here, this patch just works around it. crbug.com/1425215 was
> >    filed.
> > 2. popover-anchor-idl-property.html has some bugs that made it pass
> >    previously. This patch fixes those bugs.
> >
> >
> > Fixed: 1417346
> > Change-Id: I798977ab1ed7df0c528b7eb98c64fc04476e6106
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4338487
> > Commit-Queue: Xiaocheng Hu <[email protected]>
> > Reviewed-by: Mason Freed <[email protected]>
> > Cr-Commit-Position: refs/heads/main@{#1118933}
>
> Bug: 1425610, 1425635, 1425650
> Change-Id: I50a650f011e097c48c0efd110cf765d0df5835e4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353985
> Bot-Commit: Rubber Stamper <[email protected]>
> Reviewed-by: Mason Freed <[email protected]>
> Commit-Queue: Xiaocheng Hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1119483}

Bug: 1425610, 1425635, 1425650
Change-Id: I222e0cc302e16f208314641b153ce1746ca814a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355591
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1121203}

Co-authored-by: Xiaocheng Hu <[email protected]>
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Apr 8, 2023
…rs" (web-platform-tests#39114)

This reverts commit 80faa9503f457b4a09fa31912eafc7eefd585568.

Reason for reland: Performance regression fixed. See diff with PS#1.

The original patch used an expensive condition to decide whether to
install an AnchorElementObserver, which caused performance issues. This
patch changed to installing observer only when the `anchor` attribute
(IDL or content) is modified.

Original change's description:
> Revert "[anchor-position] Make `anchor` attribute work for non-popovers"
>
> This reverts commit 4abd0d04120561b80ad2e6dd398651d7e909463f.
>
> Reason for revert: Caused a lot of performance regressions.
>
> Original change's description:
> > [anchor-position] Make `anchor` attribute work for non-popovers
> >
> > This patch reimplements how we mark elements that are implicit anchors.
> > Previously it was only marked for popover element's implicit anchors,
> > and now it works for all implicit anchors. This is done by a new class
> > AnchorElementObserver that observes all possible changes in implicit
> > anchor and replaces the old PopoverAnchorObserver.
> >
> > This patch also reveals two existing issues:
> > 1. Element::GetElementAttribute() may return non-null result even if
> >    the element is out of tree scope. As fixing the bug is out of the
> >    scope here, this patch just works around it. crbug.com/1425215 was
> >    filed.
> > 2. popover-anchor-idl-property.html has some bugs that made it pass
> >    previously. This patch fixes those bugs.
> >
> >
> > Fixed: 1417346
> > Change-Id: I798977ab1ed7df0c528b7eb98c64fc04476e6106
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4338487
> > Commit-Queue: Xiaocheng Hu <[email protected]>
> > Reviewed-by: Mason Freed <[email protected]>
> > Cr-Commit-Position: refs/heads/main@{#1118933}
>
> Bug: 1425610, 1425635, 1425650
> Change-Id: I50a650f011e097c48c0efd110cf765d0df5835e4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353985
> Bot-Commit: Rubber Stamper <[email protected]>
> Reviewed-by: Mason Freed <[email protected]>
> Commit-Queue: Xiaocheng Hu <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1119483}

Bug: 1425610, 1425635, 1425650
Change-Id: I222e0cc302e16f208314641b153ce1746ca814a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355591
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1121203}

Co-authored-by: Xiaocheng Hu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants