| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+Mason for the style and html parts of this CL.
if (child_layer->GetLayoutObject().IsSVGForeignObject()) {I would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is hit tested? The stack will help us put correct comment here.
if (child->GetLayoutObject().IsSVGForeignObject()) {I would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is painted? The stack will help us put correct comment here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
third_party/blink/renderer/core/css/resolver/style_adjuster.cc and third_party/blink/renderer/core/html/media/html_video_element_test.cc
LGTM
element && element->FastHasAttribute(html_names::kControlsAttr);You shouldn't have to check `element` here, if `is_video_element` is true.
The difference between these elements and regular stacking contexts is thatnit: line wrapping
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
element && element->FastHasAttribute(html_names::kControlsAttr);You shouldn't have to check `element` here, if `is_video_element` is true.
Good catch, thanks!
Done
The difference between these elements and regular stacking contexts is thatjjnit: line wrapping
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (child_layer->GetLayoutObject().IsSVGForeignObject()) {I would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is hit tested? The stack will help us put correct comment here.
My understanding of the original conditions was that foreign objects had hit tests and painting handled elsewhere (with the hit tests applying some coordinate transformations) and the skip prevented them from being tested/painted twice. I narrowed it to just foreign objects, since video controls do not have any special handling for hit tests/painting.
I did a small test for this: https://gist.github.com/556a1a1e2845c11cc032493bb373a836
The normal iteration is skipped and instead hit tested by LayoutSVGForeignObject::NodeAtPointFromSVG. The other `if(...)` should be a similar situation, where the specific logic is handled instead by SVGForeignObjectPainter.
By the way, do you think it would be appropriate to killswitch this change too? The other changes were killswitched, and I think this could be breaking enough to warrant flagging as well.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
bool is_replaced_normal_flow_video =Please put it behind a killswitch (can be same flag as the previous CL).
if (child_layer->GetLayoutObject().IsSVGForeignObject()) {jjI would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is hit tested? The stack will help us put correct comment here.
My understanding of the original conditions was that foreign objects had hit tests and painting handled elsewhere (with the hit tests applying some coordinate transformations) and the skip prevented them from being tested/painted twice. I narrowed it to just foreign objects, since video controls do not have any special handling for hit tests/painting.
I did a small test for this: https://gist.github.com/556a1a1e2845c11cc032493bb373a836
The normal iteration is skipped and instead hit tested by LayoutSVGForeignObject::NodeAtPointFromSVG. The other `if(...)` should be a similar situation, where the specific logic is handled instead by SVGForeignObjectPainter.
Thanks for investigation. I would like a comment here like:
```
// Hit-testing of whole subtree of an SVG foreignObject, including
// stacked children, are handled by LayoutSVGForeignObject, so don't
// hit test stacked children here.
```
and a similar comment in paint_layer_painter.cc.
By the way, do you think it would be appropriate to killswitch this change too? The other changes were killswitched, and I think this could be breaking enough to warrant flagging as well.
Resolving.
Please put it behind a killswitch (can be same flag as the previous CL).
Done
if (child_layer->GetLayoutObject().IsSVGForeignObject()) {jjI would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is hit tested? The stack will help us put correct comment here.
Xianzhu WangMy understanding of the original conditions was that foreign objects had hit tests and painting handled elsewhere (with the hit tests applying some coordinate transformations) and the skip prevented them from being tested/painted twice. I narrowed it to just foreign objects, since video controls do not have any special handling for hit tests/painting.
I did a small test for this: https://gist.github.com/556a1a1e2845c11cc032493bb373a836
The normal iteration is skipped and instead hit tested by LayoutSVGForeignObject::NodeAtPointFromSVG. The other `if(...)` should be a similar situation, where the specific logic is handled instead by SVGForeignObjectPainter.
Thanks for investigation. I would like a comment here like:
```
// Hit-testing of whole subtree of an SVG foreignObject, including
// stacked children, are handled by LayoutSVGForeignObject, so don't
// hit test stacked children here.
```
and a similar comment in paint_layer_painter.cc.
Done
if (child->GetLayoutObject().IsSVGForeignObject()) {jjI would like a comment here. I'm not very sure how that works. Can you create a test case with a stacked child under an SVG foreign object, and check the stack when the stacked child is painted? The stack will help us put correct comment here.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/58304.
When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.
WPT Export docs:
https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
third_party/blink/renderer/core/css/resolver/style_adjuster.cc and third_party/blink/renderer/core/html/media/html_video_element_test.cc
still LGTM
Treat static video controls as replaced normal-flow stacking
Static video controls create stacked paint layers, which paint after
inline siblings, causing positioned elements (e.g. buttons) placed on
top of the video to be painted over by the controls.
Fix this by treating static <video controls> as a replaced normal-flow
stacking element.
The hit-test and paint child-skip in PaintLayer is narrowed from
IsReplacedNormalFlowStacking() to IsSVGForeignObject(), since the skip
logic relies on SVG-specific coordinate transforms that don't apply to
video.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/58304
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |