Looks good to me. I'm not a DOM expert, so the owners might have different feedback. I've left a few minor comments for now.
if (!evt.HasEventPath()) {
return false;
}Isn't HasEventPath() always true at this time? If so, can we use DCHECK instead of if-statement?
const EventPath& event_path = evt.GetEventPath();
for (wtf_size_t i = 0; i < event_path.size(); ++i) {
Node& node_in_path = event_path[i].GetNode();We could use `NodeEventContexts()` here as follows:
```
for (auto& context : evt.GetEventPath().NodeEventContexts()) {
Node& node = context.GetNode();
```
return false;I think this is unreachable. Is my understanding correct?
Then, can we add `NOTREACHED()` macro here?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
<!DOCTYPE html>I think this file name should be lowercase.
https://web-platform-tests.org/writing-tests/general-guidelines.html
Isn't HasEventPath() always true at this time? If so, can we use DCHECK instead of if-statement?
Done!
const EventPath& event_path = evt.GetEventPath();
for (wtf_size_t i = 0; i < event_path.size(); ++i) {
Node& node_in_path = event_path[i].GetNode();We could use `NodeEventContexts()` here as follows:
```
for (auto& context : evt.GetEventPath().NodeEventContexts()) {
Node& node = context.GetNode();
```
Oh, that looks like a better approach. Thank you!
I think this is unreachable. Is my understanding correct?
Then, can we add `NOTREACHED()` macro here?
You’re right. I’ve applied the changes!
I think this file name should be lowercase.
https://web-platform-tests.org/writing-tests/general-guidelines.html
Done!
Please remove unnecessary blank lines
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (&node == this) {nit: `node.IsSameNode(this);` is better for readability
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thank you for your review. I’ve applied your comment!
nit: `node.IsSameNode(this);` is better for readability
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Please take a look. Thank you!
for (auto& context : evt.GetEventPath().NodeEventContexts()) {Since the `EventPath` is captured at the start of event dispatch, it already reflects the original DOM structure, so no extra handling is needed to preserve the `IsInInteractiveContent()` value.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
bool IsInInteractiveContent(Node*) const;want to add a TODO to remove this when the flag is removed?
if (node.isSameNode(this)) {I didn't know this method exists, but want to just do `&node == this` instead?
<title>Label default action with interactive content</title>want to add
```
<link rel=help href="https://issues.chromium.org/issues/452084024">
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thank you for your review!
The votes were reset, so I’d really appreciate it if you could take another look.
want to add a TODO to remove this when the flag is removed?
Done!
I didn't know this method exists, but want to just do `&node == this` instead?
Done!
<title>Label default action with interactive content</title>want to add
```
<link rel=help href="https://issues.chromium.org/issues/452084024">
```
| 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. |
Please take a look. Thank you!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM, just two changes
if (!node || !IsShadowIncludingInclusiveAncestorOf(*node))Can you add this here, to remind us later:
`DCHECK(!RuntimeEnabledFeatures::LabelInteractiveContentCheckBeforeHandlerEnabled());`
DCHECK(evt.HasEventPath());...and same here without the `!`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thank you for your review!
It looks like the votes were reset due to the DCHECK change. Sorry for the trouble, but could you please take another look?
Thank you so much!
if (!node || !IsShadowIncludingInclusiveAncestorOf(*node))Can you add this here, to remind us later:
`DCHECK(!RuntimeEnabledFeatures::LabelInteractiveContentCheckBeforeHandlerEnabled());`
Done!
...and same here without the `!`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |