Wangsong, can you review this?
Helmut, can you please put this change behind a RuntimeEnabledFeature flag so we can disable it in the unlikely case that it causes regressions?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Wangsong, can you review this?
Helmut, can you please put this change behind a RuntimeEnabledFeature flag so we can disable it in the unlikely case that it causes regressions?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (style.HasMask() && !style.BackdropFilter().IsEmpty() &&Thanks for taking a look!
Is there a plan to fix the same loading issue for the regular mask image?
This change only updates the backdrop‑filter mask case, and I’m a bit concerned this may be confusing for developers since it’s not aligned with the regular mask behavior anymore (though it's not expected). And that's the reason I didn’t update this change in my original fix with FillLayer::AllImagesAreInvalid().
Ideally, we could fix both cases together, though I’m not sure about the effort required for the regular mask image. If it’s not a minor change, it might make sense to ship them separately. CC: @pdr
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Helmut JanuschkaWangsong, can you review this?
Helmut, can you please put this change behind a RuntimeEnabledFeature flag so we can disable it in the unlikely case that it causes regressions?
added killswitch!
Done
if (style.HasMask() && !style.BackdropFilter().IsEmpty() &&Thanks for taking a look!
Is there a plan to fix the same loading issue for the regular mask image?
This change only updates the backdrop‑filter mask case, and I’m a bit concerned this may be confusing for developers since it’s not aligned with the regular mask behavior anymore (though it's not expected). And that's the reason I didn’t update this change in my original fix with FillLayer::AllImagesAreInvalid().Ideally, we could fix both cases together, though I’m not sure about the effort required for the regular mask image. If it’s not a minor change, it might make sense to ship them separately. CC: @pdr
agree we should align regular mask loading behavior.
updated this CL to do that.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
style.MaskLayers().HasLoadedImage()) {I’m not entirely sure what happens when all mask images are still in the loading phase. From this condition, it appears that we don’t explicitly hide the content, but just tested it nothing is rendered. I think there're some logic elsewhere that handles regular case. The existing fix sets `state.opacity = 0.f` specifically for the backdrop-filter + invalid case; extending this approach to regular masks feels a bit hacky to me. But I’m not an expert on the mask pipeline, so I’d suggest having someone with deeper expertise in this area take a look.
}This mask loading change may not be appropriate for WPT, as I don’t see an explicit mention in the spec. But it may still be worth adding a few web tests to cover it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I’m not entirely sure what happens when all mask images are still in the loading phase. From this condition, it appears that we don’t explicitly hide the content, but just tested it nothing is rendered. I think there're some logic elsewhere that handles regular case. The existing fix sets `state.opacity = 0.f` specifically for the backdrop-filter + invalid case; extending this approach to regular masks feels a bit hacky to me. But I’m not an expert on the mask pipeline, so I’d suggest having someone with deeper expertise in this area take a look.
Thanks for the pushback. I narrowed this CL so opacity gating is only applied to the backdrop-filter + mask case (`style.HasMask() && !style.BackdropFilter().IsEmpty() && ...`) and removed the regular-mask test that encoded broader behavior.
This mask loading change may not be appropriate for WPT, as I don’t see an explicit mention in the spec. But it may still be worth adding a few web tests to cover it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
style.MaskLayers().HasLoadedImage()) {Helmut JanuschkaI’m not entirely sure what happens when all mask images are still in the loading phase. From this condition, it appears that we don’t explicitly hide the content, but just tested it nothing is rendered. I think there're some logic elsewhere that handles regular case. The existing fix sets `state.opacity = 0.f` specifically for the backdrop-filter + invalid case; extending this approach to regular masks feels a bit hacky to me. But I’m not an expert on the mask pipeline, so I’d suggest having someone with deeper expertise in this area take a look.
Thanks for the pushback. I narrowed this CL so opacity gating is only applied to the backdrop-filter + mask case (`style.HasMask() && !style.BackdropFilter().IsEmpty() && ...`) and removed the regular-mask test that encoded broader behavior.
To clarify, my earlier comment was about the case where all mask images are still in the pending state. Based on the HasUnloadedImage() && HasLoadedImage() logic, we don’t set the opacity to 0, which means the content should not be hidden.
For the backdrop‑filter mask case, the content is hidden because we additionally check AllImagesAreInvalid(). What surprised me is that the content also appears hidden for the regular mask case, which suggests there must be some other logic involved. If we could handle the regular mask through the same flow, that would be ideal. I’m not sure how much work that would be, though, and it’s possible that the current "hacky" solution ends up being the pragmatic choice.
The changes related to the backdrop‑filter mask image loading look good to me. The open question is whether we’re good to update the loading behavior only for the backdrop‑filter mask case. Honestly, I don’t have an answer to that. cc: @pdr for suggestions.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
TEST_P(CompositingSimTest, CanvasDrawElementLayersWithWillChange) {These shouldn't be removed
style.MaskLayers().HasLoadedImage()) {Helmut JanuschkaI’m not entirely sure what happens when all mask images are still in the loading phase. From this condition, it appears that we don’t explicitly hide the content, but just tested it nothing is rendered. I think there're some logic elsewhere that handles regular case. The existing fix sets `state.opacity = 0.f` specifically for the backdrop-filter + invalid case; extending this approach to regular masks feels a bit hacky to me. But I’m not an expert on the mask pipeline, so I’d suggest having someone with deeper expertise in this area take a look.
Wangsong JinThanks for the pushback. I narrowed this CL so opacity gating is only applied to the backdrop-filter + mask case (`style.HasMask() && !style.BackdropFilter().IsEmpty() && ...`) and removed the regular-mask test that encoded broader behavior.
To clarify, my earlier comment was about the case where all mask images are still in the pending state. Based on the HasUnloadedImage() && HasLoadedImage() logic, we don’t set the opacity to 0, which means the content should not be hidden.
For the backdrop‑filter mask case, the content is hidden because we additionally check AllImagesAreInvalid(). What surprised me is that the content also appears hidden for the regular mask case, which suggests there must be some other logic involved. If we could handle the regular mask through the same flow, that would be ideal. I’m not sure how much work that would be, though, and it’s possible that the current "hacky" solution ends up being the pragmatic choice.The changes related to the backdrop‑filter mask image loading look good to me. The open question is whether we’re good to update the loading behavior only for the backdrop‑filter mask case. Honestly, I don’t have an answer to that. cc: @pdr for suggestions.
The bug mentions 2 cases: multiple masks images and multiple mask images with backdrop filter. The bug is about switching to safari's behavior for both, but the bug is also not super clear (e.g., starts with "Consider...").
Maybe we could make a table of:
multiple loading masks:
chrome, firefox, safari, chrome-with-fix
and a table of:
multiple loading masks with backdrop-filter:
chrome, firefox, safari, chrome-with-fix
The tests in this patch have just one loading image, but I think multiple simultaneously loading images is the interesting case?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
TEST_P(CompositingSimTest, CanvasDrawElementLayersWithWillChange) {These shouldn't be removed
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |