EXPECT_EQ(form1->ListedElements(/*include_shadow_trees=*/true),
ListedElement::List{});
This is tested separately for Shadow DOM in tests below.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
This change meets the code coverage requirements.
Code-Coverage | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Code-Review | +1 |
// Autofill only considers top level forms - forms that have form
// ancestors are ignored. We therefore include all form control
// descendants of the form for which we collect the listed
// elements. Note that `elements` does not have this problem because it
I find that hard to understand for two reasons:
- "forms that have form ancestors are ignored"
* Autofill ignores them, but the sentence sounds like the code below ignores them.
* I'd remove this part.
- "We include all form control descendants of the form"
* Include in what?
* I think it should be made explicit this includes descendants that have another form in between.
- Bonus bullet point: "for which we collect the listed elements" --> "whose listed elements we collect"?
ContainerNode* starting_node = insertion_point.ParentOrShadowHostNode();
for (ContainerNode* parent = starting_node; parent;
parent = parent->ParentOrShadowHostNode()) {
if (HTMLFormElement* form = DynamicTo<HTMLFormElement>(parent)) {
form->InvalidateListedElementsIncludingShadowTrees();
}
}
I refrain from leaving a comment that
```
ContainerNode* parent = &insertion_point;
while ((parent = parent->ParentOrShadowHostNode()) != nullptr) {
...
}
```
is much better because we both know it.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Commit-Queue | +0 |
// Autofill only considers top level forms - forms that have form
// ancestors are ignored. We therefore include all form control
// descendants of the form for which we collect the listed
// elements. Note that `elements` does not have this problem because it
I find that hard to understand for two reasons:
- "forms that have form ancestors are ignored"
* Autofill ignores them, but the sentence sounds like the code below ignores them.
* I'd remove this part.
- "We include all form control descendants of the form"
* Include in what?
* I think it should be made explicit this includes descendants that have another form in between.
- Bonus bullet point: "for which we collect the listed elements" --> "whose listed elements we collect"?
Done
ContainerNode* starting_node = insertion_point.ParentOrShadowHostNode();
for (ContainerNode* parent = starting_node; parent;
parent = parent->ParentOrShadowHostNode()) {
if (HTMLFormElement* form = DynamicTo<HTMLFormElement>(parent)) {
form->InvalidateListedElementsIncludingShadowTrees();
}
}
I refrain from leaving a comment that
```
ContainerNode* parent = &insertion_point;
while ((parent = parent->ParentOrShadowHostNode()) != nullptr) {
...
}
```
is much better because we both know it.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Hi Joey,
Here is another clean-up - would you PTAL?
Thanks,
Jan
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
This change meets the code coverage requirements.
Code-Coverage | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Code-Review | +1 |
EXPECT_EQ(form1->ListedElements(/*include_shadow_trees=*/true),
ListedElement::List{});
This is tested separately for Shadow DOM in tests below.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Commit-Queue | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Clean up kAutofillIncludeFormElementsInShadowDom.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |