Commit dd30130c authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

RecalcDescendantStyles for inactive insertion points.

For shadow dom V0, <content> elements which are not inside shadow trees
are not active insertion points and do not take part in shadow
distributions. They are part of the flat tree and otherwise behave as
any other elements. Call RecalcDescendantStyles to compute styles for
its descendants.

TEST=accessibility/table-row-role-crash.html
TEST=fast/dom/shadow/content-element-outside-shadow.html
TEST=fast/dom/shadow/shadow-dom-event-dispatching-child-of-inactive-content.html
TEST=fast/dom/shadow/shadow-insertion-point-rendering.html

Bug: 972752
Change-Id: I0037f5c3a1dc6d0f7746aa7e0eb9b118212e2047
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846431Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703618}
parent 7179fc9f
......@@ -2944,8 +2944,9 @@ void Element::RecalcStyle(const StyleRecalcChange change) {
}
} else if (auto* slot = ToHTMLSlotElementIfSupportsAssignmentOrNull(this)) {
slot->RecalcStyleForSlotChildren(child_change);
} else if (auto* insertion_point = DynamicTo<V0InsertionPoint>(this)) {
insertion_point->RecalcStyleForInsertionPointChildren(child_change);
} else if (IsActiveV0InsertionPoint(*this)) {
To<V0InsertionPoint>(this)->RecalcStyleForInsertionPointChildren(
child_change);
} else {
RecalcDescendantStyles(child_change);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment