Closed Bug 1577739 Opened 5 years ago Closed 2 years ago

CSS invert() function does not operate on root element of HTMLDocument

Categories

(Core :: Web Painting, defect, P3)

68 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1423746
Tracking Status
firefox69 --- affected
firefox70 --- affected
firefox71 --- affected

People

(Reporter: contact, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Steps to reproduce:

  1. Add :root{filter:invert(1)} to your CSS

Actual results:

The filter is not applied.

Expected results:

The entire document tree would be inverted. The behaviour should match that which any other element would present.

Chrome also has this bug, Safari does not. crbug.com/999491

Reproduced this on all latest Firefox versions on Windows 10 x64. Moving it over to component, thanks for the report!

Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

I think this is related to bug 1423746 and all the discussion in https://github.com/w3c/fxtf-drafts/issues/282.

I think we should fix bug 1423746 and this together by propagating the filters from the document element to the viewport, not the document element box.

Matt, do you agree? If so, what's the best way to propagate the filters to the viewport? I didn't see anything obvious for how we propagate the background for example...

Flags: needinfo?(matt.woodrow)
See Also: → 1423746
Component: CSS Parsing and Computation → Web Painting

I think that sounds reasonable, though mstange is probably the best person to decide.

Background propagating is implemented using nsCSSRendering::FindBackgroundFrame. The ViewportFrame doesn't create any background items, and nsCanvasFrame will find the frame/style context for the viewport frame when looking up which background to paint.

Flags: needinfo?(matt.woodrow) → needinfo?(mstange)
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(mstange.moz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: