Allow traversal of dirty v0 shadow for flat tree recalc.
We need to be able to walk the current flat tree ancestors without updating the distribution when marking the ancestor chain for style recalc. For Shadow DOM V1, we introduced a separate method for that since for V1 we update the slot assignment while traversing. For V0, we need to explicitly update distribution and DCHECK during traversal that we made sure it was up to date. Here we skip the DCHECK when FlatTreeStyleRecalc is enabled. We could have introduced some scoping mechanism that sets a flag from outside the traversal saying that we intentionally walk a dirty tree instead of always skipping the DCHECK for FlatTreeStyleRecalc. Since V0 is going away soon, I gathered we could skip the DCHECK. Multiple tests in the TEST lines below will trigger the DCHECK without this change and FlatTreeStyleRecalc enabled. TEST=fast/dom/shadow/ TEST=shadow-dom/ Bug: 972752 Change-Id: I8a850123b9b647a6575c3a2679e382d61c0ed8c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875258Reviewed-by:Mason Freed <masonfreed@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#710621}
Showing
Please register or sign in to comment