Closed Bug 1566699 Opened 5 years ago Closed 5 years ago

Filter causes image to move up half of a screen

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox70 --- affected

People

(Reporter: violet.bugreport, Unassigned)

References

Details

Attachments

(2 files)

STR:

  1. Open any .png image. (e.g. go to this http://www.brendangregg.com/blog/images/2019/bpf_performance_tools_book.png)

  2. Open DevTools, execute: document.body.style.filter = "invert(1)"

Expected:

Image should be in the same place.

Actually:

Image moves up half of the screen, making half of the image invisible.

This behavior will happen for every filter, even no-op filter like invert(0).

Is this a regression? Can you reproduce the problem in regular webcontent? i.e. not the image viewer?

Flags: needinfo?(violet.bugreport)
Priority: -- → P3
Attached file A reduced test case

Loading this in Chrome vs Firefox shows the difference

Component: Graphics → Layout
Flags: needinfo?(violet.bugreport)
Priority: P3 → --
Attachment #9078715 - Attachment mime type: text/plain → text/html

This is invalid. filter makes the element a containing block. The body is zero-height, it so happens that in Chrome and only in Quirks Mode the <body> takes the whole viewport. That's tracked in bug 1259924.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
See Also: → 1259924
Resolution: FIXED → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: