Open Bug 1683820 Opened 5 years ago Updated 2 years ago

The <dialog> is rendered on the wrong position when using The CSS "filter: brightness()".

Categories

(Core :: Layout, defect, P3)

Firefox 85
x86_64
Linux
defect

Tracking

()

People

(Reporter: prada960808, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

Attached file testcase1.html (obsolete) —

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36

Steps to reproduce:

I leverage metamorphic testing to find the rendering bug in Firefox.
I compare two rendered pages from the original DOM tree and deleted & restored DOM tree for metamorphic testing.

  1. open attached html file on Firefox 85.
  2. run following javascript code to change and restore the tagname of <dialog>.
    tag_change(4,'label');
    tag_change(4, 'dialog');

Actual results:

The position of <dialog> becomes wrong after executing the js code due to CSS "filter: brightness()".

Expected results:

The position of <dialog> should be same.

Attached image 85.0a1_before.png
Attached image 85.0a1_after.png
Comment on attachment 9194365 [details] testcase1.html ><html><head><style> > >#htmlvar00005 { filter: brightness(); } >body { overflow: hidden; > ></style> ><script> >function get_elements() { > return document.querySelectorAll('*[id]'); >} >function tag_change(idx, tag){ > var eles = get_elements(); > var len = eles.length; > > if (len < 1) return ; > > var orl = eles[idx % len]; > var rep = document.createElement(tag); > for(var i = 0, l = orl.attributes.length; i < l; ++i){ > var nName = orl.attributes.item(i).nodeName; > var nValue = orl.attributes.item(i).nodeValue; > rep.setAttribute(nName, nValue); > } > rep.innerHTML = orl.innerHTML; > orl.parentNode.replaceChild(rep, orl); >} ></script> > ></head><body><dl id="htmlvar00001"><dd id="htmlvar00002" solid="" wrap="hard">yUeV2ETwXjd0;_Ehw</dd></dl><button dir="RTL" id="htmlvar00004" onmousedown="eventhandler1()">"")&lt;%{@[</button><span id="htmlvar00005" width="0"><dialog id="htmlvar00006" mso-width-source:="" open="true" width="0">i7zqQ) 8</dialog></span></body></html>
Attached image repro.png
Attached file new_testcase.html

The "testcase1.html" is wrong.
Please test with "new_testcase.html".

Component: Untriaged → Layout
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Attachment #9194365 - Attachment is obsolete: true

This is a known bug with absolutely positioned kids of relatively-positioned ancestors (for this case, filter: brightness() behaves as position: relative on the span).

Severity: -- → S3
Status: UNCONFIRMED → NEW
Depends on: 255139
Ever confirmed: true
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: