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

[IntersectionObserver] Fix cross-origin check for honoring rootMargin #25573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

An issue on the IntersectionObserver spec repo raised the issue of
the precise limitation on rootMargin and rootBounds. The original spec
language refers to the "unit of related similar-origin browsing
contexts", which suggests that cross-origin same-site observations
could use rootMargin and rootBounds. That is incorrect; same-site
cross-origin observations should not be able to use rootMargin and
rootBounds.

Chromium already conforms to the more restrictive behavior; this CL
is just to add a test to enforce it.

w3c/IntersectionObserver#448

Separately, the existing cross-origin-iframe.sub.html test was disabled
due to flakiness; and then a subsequent code change broke the
cross-origin limitation for applying rootMargin, so the test has been
reliably failing. This patch fixes the cross-origin check and reenables
the test.

Change-Id: Ib864f9a9433b4d323ef73a3b2b5a8f645697c07c

Reviewed-on: https://chromium-review.googlesource.com/2411229
WPT-Export-Revision: b3687c029a506f75fc1c7e53c1f55b2783e5b2bc

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.

An issue on the IntersectionObserver spec repo raised the issue of
the precise limitation on rootMargin and rootBounds. The original spec
language refers to the "unit of related similar-origin browsing
contexts", which suggests that cross-origin same-site observations
could use rootMargin and rootBounds. That is incorrect; same-site
cross-origin observations should *not* be able to use rootMargin and
rootBounds.

Chromium already conforms to the more restrictive behavior; this CL
is just to add a test to enforce it.

w3c/IntersectionObserver#448

Separately, the existing cross-origin-iframe.sub.html test was disabled
due to flakiness; and then a subsequent code change broke the
cross-origin limitation for applying rootMargin, so the test has been
reliably failing. This patch fixes the cross-origin check and reenables
the test.

Change-Id: Ib864f9a9433b4d323ef73a3b2b5a8f645697c07c
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.

3 participants