| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Can you add a scenario where an entire subtree is moved from the canvas to the body, and make sure all the `canvas_subtree_id()` values get cleared?
auto* nested_child_layer = CcLayerByDOMElementId("nested_child");Can you test `nested_canvas` as well?
if (canvas && element->IsInCanvasSubtree() && canvas->layoutSubtree()) {`IsInCanvasSubtree()` is redundant/unnecessary here.
If you want to optimize, this might be best since `IsInCanvasSubtree()` is fast and will fail for most content:
```
auto* element = DynamicTo<Element>(object.GetNode());
if (element && element->IsInCanvasSubtree()) [[unlikely]] {
auto* canvas = DynamicTo<HTMLCanvasElement>(element->parentElement());
if (canvas && canvas->layoutSubtree()) {
// ...
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
Can you add a scenario where an entire subtree is moved from the canvas to the body, and make sure all the `canvas_subtree_id()` values get cleared?
Done. I went with removing the layoutsubtree attribute.
auto* nested_child_layer = CcLayerByDOMElementId("nested_child");Can you test `nested_canvas` as well?
Done
if (canvas && element->IsInCanvasSubtree() && canvas->layoutSubtree()) {`IsInCanvasSubtree()` is redundant/unnecessary here.
If you want to optimize, this might be best since `IsInCanvasSubtree()` is fast and will fail for most content:
```
auto* element = DynamicTo<Element>(object.GetNode());
if (element && element->IsInCanvasSubtree()) [[unlikely]] {
auto* canvas = DynamicTo<HTMLCanvasElement>(element->parentElement());
if (canvas && canvas->layoutSubtree()) {
// ...
}
}
```
| 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. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
auto* nested_child_layer = CcLayerByDOMElementId("nested_child");Philip RogersCan you test `nested_canvas` as well?
Done
Update: it is complex to get canvas to create a cc layer for itself (see: third_party/blink/renderer/core/paint/html_canvas_painter_test.cc). I'd like to not test that for now.
| 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. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[html-in-canvas] Give canvas subtree layers ids and display items
This patch has three changes:
1. Set canvas_subtree_id on cc::Layer. This is done by adding a canvas
subtree id scope in PaintLayerPainter, and plumbing this through paint
and onto the cc::Layer.
2. Set cc::Layer draws_content to false if a layer has a canvas subtree
id. This causes the layers to not paint, even if they have display
items.
3. Ensure cc::Layers have display items. Now that #2 hides layers with
display items, this patch removes the effectively invisible logic added
in https://crrev.com/1572581 which prevented cc::Layers from having
display items.
| 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. |