[html] fix: combine backdrop filter to child container to fix rendering issue on Chromium #43392
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi from Dora AI team, which powers by
Flutter Web
to boost devs to build their 3D websites in just few seconds. We've encountered thebackdrop-filter
problem when running in HTML mode.This PR combines the
backdrop-filter
with the interior one, which fixes flutter/flutter#129896.The reason may be the different behavior when treating
backdrop-filter
properties by Chromium, and Safari. Only Chrome seems to follow the W3C draft, mentioned by Kawalo here (https://stackoverflow.com/a/76207141/11069997), which causes the inconsistent result with canvaskit or other browsers running on HTML mode.I've tested the main problem on Chrome is that the backdrop filter should not be a leaf on the DOM node, and should be directly applied to its children. If we apply it on its children, the backdrop filter works great and has no issues with the nested backdrop filter.
This bug is reported a year ago, but it seems they do not have a schedule to fix this issue. So this workaround is
necessary now to be applied to the Flutter engine to fix the rendering problem that happens on Chromium-based browsers when running in HTML mode.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.