CSS invert() function does not operate on root element of HTMLDocument
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
People
(Reporter: contact, Unassigned)
References
Details
Attachments
(1 file)
311 bytes,
text/html
|
Details |
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:
- 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
Comment 1•5 years ago
|
||
Reproduced this on all latest Firefox versions on Windows 10 x64. Moving it over to component, thanks for the report!
Comment 2•5 years ago
|
||
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...
Updated•5 years ago
|
Comment 3•5 years ago
|
||
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.
Updated•5 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•