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

[cssom-view] HTMLElement.prototype.offsetParent leaks a node inside a shadow tree #159

Closed
hayatoito opened this issue Jun 1, 2016 · 42 comments · Fixed by #169 or #252
Closed

[cssom-view] HTMLElement.prototype.offsetParent leaks a node inside a shadow tree #159

hayatoito opened this issue Jun 1, 2016 · 42 comments · Fixed by #169 or #252

Comments

@hayatoito
Copy link
Member

See the context: WICG/webcomponents#497

@rniwa, do you have any preference to this issue? I do not have a strong opinion yet.

@tabatkins
Copy link
Member

I support @rniwa's answer - walking up until you find a valid (non-leaky) offsetParent, then making sure that offsetLeft and offsetTop are both relative to that, should work great.

This will still leave us with cases where an element is in a shadow tree and the only possible offset parents are outside the shadow. That leaks in the opposite way - info leaking into the shadow. Is that ok? I know this happens with CSS inheritance and such, but I dunno how strict we are about element refs leaking in.

@rniwa
Copy link

rniwa commented Jun 6, 2016

I think it's okay for shadow tree to access to elements outside the shadow tree since that's already possible via ShadowRoot.prototype.host as well as HTMLSlotElement.prototype.assignedNodes().

@tabatkins
Copy link
Member

In that case, 👍 to the idea.

@hayatoito
Copy link
Member Author

hayatoito commented Jun 7, 2016

Okay. We can fix this by using "unclosed node" (https://dom.spec.whatwg.org/#concept-unclosed-node)

https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetparent

Return the nearest ancestor element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found:

A quick fix can be:

Return the nearest ancestor unclosed element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found:

Let me send a PR.

@platosha
Copy link

Now with the fix merged, what offsetParent would return for a node that has a container block with position: fixed inside a closed shadow root?

Considering the following code, what would be in the log output? Is it still possible for the node C to discover that it is inside a fixed container?

var A = document.createElement('node-a');
document.body.appendChild(A);

var shadowRoot = A.attachShadow({mode: 'closed'});

var B = document.createElement('node-b');
shadowRoot.appendChild(B);
B.style.position = 'fixed';

var slot = document.createElement('slot');
B.appendChild(slot);

var C = document.createElement('node-c');
A.appendChild(C);

console.log(C.offsetParent.localName);

@rniwa
Copy link

rniwa commented Jun 15, 2016

Node C's offsetParent will be offsetParent of B.

@platosha
Copy link

@rniwa then it looks like it's now completely impossible to discover for the node C that it's inside a fixed container.

We have a component that should behave differently inside a fixed container. So we use a fixed container detection. Previously, it was safe to walk through .offsetParents chain and check their computed styles. Now the detection is broken.

Aside from that, offsetParent has another use case: for an absolutely positioned node it points to the containing block. This is also broken here. In my example, if I assign position: absolute to the node C, its containing block will be the node B, but offsetParent will be null.

@rniwa
Copy link

rniwa commented Jun 15, 2016

No, offsetParent would point to B's containing block instead and offsetLeft and offsetTop would be adjusted accordingly.

@platosha
Copy link

platosha commented Jun 16, 2016

@rniwa node B’s containing block is the viewport, since it is fixed. I assume, that in case when the node’s containing block is the viewport, offsetParent is null. So, according to your answer, it will be null. Though to my understanding of the spec, it should be document.body.

Anyways, it doesn't really matter for this case if offsetParent of C is document.body or null. Neither of these variants allow to find out that C's positioning is actually affected by B. Neither of these variants allow to find out that the C is inside a fixed container.

@platosha
Copy link

platosha commented Jun 21, 2016

I feel like the proper solution would be to disallow shadow containing blocks, excluding them from containing block chains. So that when a shadow node has non-static position, it does not affect the positioning of the absolute descendants outside shadow.

This should make offsetParent usable for walking through containing block chains again, as it was before the shadow DOM era.

@hayatoito
Copy link
Member Author

hayatoito commented Jun 22, 2016

@platosha
My intention is : C.offsetParent == document.body.

Return the nearest ancestor unclosed element of the element for which at least one of the following is true and terminate this algorithm if such an ancestor is found: [DOM]

Ancestor in this context should be interpreted as an ancestor in a flat tree. https://drafts.csswg.org/css-scoping/#flattening

Ancestor chain in this case is:
C => (slot) => (B) => (A) => body

(slot), (B) (its position is fixed, but it is not unclosed) or (A) should be skipped because it does not meet the condition.

@hayatoito
Copy link
Member Author

hayatoito commented Jun 22, 2016

Anyways, it doesn't really matter for this case if offsetParent of C is document.body or null. Neither of these variants allow to find out that C's positioning is actually affected by B. Neither of these variants allow to find out that the C is inside a fixed container.

It sounds that users of a closed shadow tree should be aware of this limitation.
We do not have an answer for that, except for using an open shadow tree, I guess.

@TakayoshiKochi
Copy link
Member

TakayoshiKochi commented Jun 28, 2016

If a user agent naively implements the new behavior, it would just recursively apply the original offsetParent like:

target = element.offsetParent
while target is not unclosed node of element:
    target = target.offsetParent 

and C's .offsetParent would be B, and then B's .offsetParent would be null and thus null is returned, as @niwa #159 (comment) -ed.

But if a user agent implements "the nearest ancestor unclosed node", as @hayatoito #159 (comment), document.body would be returned because B is unclosed. I guess it does not make sense either, as probably .offfsetTop or .offsetLeft for the C would be useless.

So in this case, returning null sounds somewhat better than returning 'document.body' to me, as C is somehow not relative to any unclosed parents, but I'm still unsure.

BTW, I don't understand @platosha 's comment:

I feel like the proper solution would be to disallow shadow containing blocks, excluding them from containing block chains. So that when a shadow node has non-static position, it does not affect the positioning of the absolute descendants outside shadow.

What do "blocks" / "block chains" mean here? If this is implemented, what the A/B/C example above will be styled/rendered, and what is the expected C.offsetParent?

@TakayoshiKochi
Copy link
Member

Hmm, I may be wrong. In the CSSOM spec, "ancestor" does not mean DOM tree's ancestor, but box-tree based one. So it will return null even if the spec is unchanged?

@zcorpan
Copy link
Member

zcorpan commented Jun 28, 2016

I think the spec tries to operate on the DOM tree here. I'm not entirely sure if that matches what is implemented though.

@hayatoito
Copy link
Member Author

hayatoito commented Jun 29, 2016

We should clarify that it operates on a flat tree (or layout block tree based on a flat tree?). See https://drafts.csswg.org/css-scoping/#flattening
It matches the implementation, as least in Blink.

I thought that unless otherwise mentioned, it is based on a flat tree. However, explicit might be better than implicit here.

@TakayoshiKochi
Copy link
Member

During the code review conversation with @hayatoito,
we concluded that for @platosha 's case, returning null for C.offsetParent would be better.
(See https://codereview.chromium.org/2051703002/ )

I'll send a PR shortly for changing the spec.

@hayatoito
Copy link
Member Author

hayatoito commented Jun 29, 2016

Yeah.

@platosha I am sorry. I did not understand the problem deeply.
See https://codereview.chromium.org/2051703002/#msg63.
Now I understand the problem, hopefully.

@zcorpan zcorpan reopened this Jun 29, 2016
zcorpan pushed a commit that referenced this issue Aug 11, 2016
The previous attempt to update offsetParent was incomplete:
when the real offsetParent in the closed shadow tree has
'position:fixed', offsetParent should return null, instead
of continue searching for unclosed ancestor.

PR: #252
Fixes #159.
@emilio emilio changed the title HTMLElement.prototype.offsetParent leaks a node inside a shadow tree [cssom-view] HTMLElement.prototype.offsetParent leaks a node inside a shadow tree Jan 8, 2019
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 8, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
gecko-commit: e0a5cb126f2f084e5f7f3d5f0be0222a7fd67479
gecko-integration-branch: autoland
gecko-reviewers: smaug
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jan 8, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

--HG--
extra : moz-landing-system : lando
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Jan 9, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 9, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
gecko-commit: e0a5cb126f2f084e5f7f3d5f0be0222a7fd67479
gecko-integration-branch: autoland
gecko-reviewers: smaug
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

UltraBlame original commit: e0a5cb126f2f084e5f7f3d5f0be0222a7fd67479
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

UltraBlame original commit: e0a5cb126f2f084e5f7f3d5f0be0222a7fd67479
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
Per w3c/csswg-drafts#159.

The test is imported from WebKit, who has already implemented this, with a few
fixes to avoid duplicate test names and non-undefined return values from
add_cleanup.

See the diff attached to the bug.

Differential Revision: https://phabricator.services.mozilla.com/D15938

UltraBlame original commit: e0a5cb126f2f084e5f7f3d5f0be0222a7fd67479
@rniwa
Copy link

rniwa commented Nov 25, 2019

Hm... looks like Blink still hasn't implemented this behavior?

@rakina, @tkent-google: Can someone from Blink side follow up on this? We're getting bug reports like https://bugs.webkit.org/show_bug.cgi?id=204195

@tkent-google
Copy link
Contributor

@rniwa I contacted the current owner of Shadow DOM in Chromium project about this issue.

Here is a tracking issue: https://bugs.chromium.org/p/chromium/issues/detail?id=920069

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 24, 2021
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 31, 2021
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Apr 14, 2021
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Apr 15, 2021
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2775208
Reviewed-by: Mason Freed <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#872658}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Apr 15, 2021
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2775208
Reviewed-by: Mason Freed <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#872658}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Apr 24, 2021
…rees, a=testonly

Automatic update from web-platform-tests
Update offsetParent behavior in shadow trees

New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2775208
Reviewed-by: Mason Freed <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#872658}

--

wpt-commits: 8d8b8c4e2e42d07398fd5e98b541ee239e1d35a4
wpt-pr: 28201
josepharhar added a commit to josepharhar/paper-tooltip that referenced this issue Jul 28, 2021
The spec for offsetParent was changed here:
w3c/csswg-drafts#159

This change was implemented in Safari and Firefox, but hasn't been
implemented in Chrome, until now:
https://chromium-review.googlesource.com/c/chromium/src/+/2775208

When I made this change in chrome, it broke some chrome:// internal
pages which use paper-tooltip:
https://bugs.chromium.org/p/chromium/issues/detail?id=1200750
https://bugs.chromium.org/p/chromium/issues/detail?id=1202105

This patch fixes paper-tooltip to use the new offsetParent behavior by
adding a polyfill for the old offsetParent behavior. The issues reported
in the above bugs would also occur in Firefox and Safari, but nobody
ever found out because those chrome:// pages were obviously never tested
in Firefox or Safari.
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
New behavior for offsetParent in shadow trees was discussed in [1] and
[2]. This lead to a chromium patch [3] which changed the behavior. After
[3] landed, the desired behavior in the discussions in [1] and [2]
seemed to have changed. Unfortunately, the author of [3] was no longer
working on chromium. This new behavior was then added to the spec and
landed in webkit [4] and firefox [5], and a WPT was added for it [6].

This patch implements the new behavior to follow suit with webkit and
firefox based on the WPT in [6]. Unfortunately, there are several tests
which are either internal to chromium or are only passing in chromium
which appear to oppose this new behavior and will have to be updated or
removed:
- external/wpt/css/css-contain/content-visibility/content-visibility-035.html
- external/wpt/css/css-contain/content-visibility/content-visibility-044.html
- fast/dom/shadow/offset-parent-does-not-leak-ua-shadow.html
- shadow-dom/offsetParent.html
For shadow-dom/offsetParent.html, I verified that firefox and safari
both currently fail the same tests which this patch does.

[1] WICG/webcomponents#497
[2] w3c/csswg-drafts#159
[3] https://chromium.googlesource.com/chromium/src/+/18d455ee833f6a30dcbe2755380861eb75cd9f6f
[4] https://trac.webkit.org/changeset/239313/webkit
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1514074
[6] https://wpt.fyi/results/shadow-dom/offsetParent-across-shadow-boundaries.html

Fixed: 920069
Change-Id: I168edc5ad0e4fcb92d0c4a440623f2424b14a988
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2775208
Reviewed-by: Mason Freed <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Ian Kilpatrick <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/master@{#872658}
GitOrigin-RevId: a48d953625d82035201c12d8e92ad0f39bf85258
jcfranco added a commit to Esri/calcite-design-system that referenced this issue Feb 28, 2023
**Related Issue:** #6300 

## Summary

This addresses positioning issues in Chrome 109+. Version 109 updated
offsetParent behavior to follow the latest spec changes from
w3c/csswg-drafts#159.
@mfreed7
Copy link
Contributor

mfreed7 commented Apr 20, 2023

The Chromium bug has been fixed. Seems like this issue can be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment