Closed Bug 1826481 Opened 2 years ago Closed 2 years ago

Incorect positioning of absolute elements with backdrop-filter

Categories

(Core :: Layout: Positioned, defect)

Firefox 111
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: joshua, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Attached file test page.

User Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1474.0

Steps to reproduce:

Use the test page bellow and compare the divs with backdrop filter to the ones without

Safari: Pass
Firefox: Fail
Chrome: Fail

Actual results:

the elements were positioned relative to the parrents.

Expected results:

Like the one without any backdrop-filter it should have appeared in the corner.

Attached image Safari passing test
Attached image Firefox Failing test
Attached image Chrome Failing test

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Blocks: 1816630

Unless I'm missing something, per spec it seems like Firefox and Chrome are correct here. From https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty

"A computed value of other than none results in the creation of both a stacking context [CSS21] and a Containing Block for absolute and fixed position descendants, unless the element it applies to is a document root element in the current browsing context."

Component: Graphics: WebRender → Layout: Positioned

Is there something I missed that makes the Safari rendering the correct one? Thanks.

Flags: needinfo?(joshua)

@Tim(In reply to Timothy Nikkel (:tnikkel) from comment #6)

Is there something I missed that makes the Safari rendering the correct one? Thanks.

Are you saying that webkit is wrong? Also I am not an expert in specs for web. it just seems weird cause its not mentioned in MDM. Also, somehow though, the behaviour is reversed with will-change: tranform :/

Flags: needinfo?(joshua)

My reading of the spec suggests that webkit is incorrect here, but I am open to new information or corrections if I've missed something. I was wondering if you had additional information or reasoning that lead you to conclude that Safari was correct.

Yeah, MDN could be improved by mentioning that, I agree.

What do you mean the behaviour is reversed with will-change: transform? Can you provide a testcase to demonstrate what you are talking about?

Flags: needinfo?(joshua)
Attached image Will change transform
Flags: needinfo?(joshua)

(In reply to Timothy Nikkel (:tnikkel) from comment #8)

My reading of the spec suggests that webkit is incorrect here, but I am open to new information or corrections if I've missed something. I was wondering if you had additional information or reasoning that lead you to conclude that Safari was correct.

Yeah, MDN could be improved by mentioning that, I agree.

What do you mean the behaviour is reversed with will-change: transform? Can you provide a testcase to demonstrate what you are talking about?

I meant will-change: transform; creates the same behavior (intended)

That seems expected as well. Transform creates a containing block, and will-change transform also needs to create a containing block as if the element did have a transform.

I'm going to resolve this as invalid as it seems like Firefox is following the spec. If there is something I've missed please reopen.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID

(In reply to Timothy Nikkel (:tnikkel) from comment #11)

That seems expected as well. Transform creates a containing block, and will-change transform also needs to create a containing block as if the element did have a transform.

I'm going to resolve this as invalid as it seems like Firefox is following the spec. If there is something I've missed please reopen.

Does that mean that the problem is webkit not creating a stacking context?

(In reply to Josh from comment #12)

(In reply to Timothy Nikkel (:tnikkel) from comment #11)

That seems expected as well. Transform creates a containing block, and will-change transform also needs to create a containing block as if the element did have a transform.

I'm going to resolve this as invalid as it seems like Firefox is following the spec. If there is something I've missed please reopen.

Does that mean that the problem is webkit not creating a stacking context?

That is my understanding, yes.

No longer blocks: 1816630
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: