Commit 935eeca9 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

PseudoElement is always created before style resolution.

This changed in [1]. However, there are pseudo elements which do not
have corresponding PseudoElements. Change DCHECK documentation
accordingly.

[1] https://crrev.com/90351b8f23ad3c9195d54e741747a85d95755987

Change-Id: Ib88155e8a846d790367704207f7bc796863bce77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640638
Auto-Submit: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665574}
parent 163eb802
......@@ -1132,9 +1132,10 @@ bool StyleResolver::ApplyAnimatedStandardProperties(
Element* element = state.GetElement();
DCHECK(element);
// The animating element may be this element, or its pseudo element. It is
// null when calculating the style for a potential pseudo element that has
// yet to be created.
// The animating element may be this element, the pseudo element we are
// resolving style for, or null if we are resolving style for a pseudo
// element which is not represented by a PseudoElement like scrollbar pseudo
// elements.
DCHECK(animating_element == element || !animating_element ||
animating_element->ParentOrShadowHostElement() == element);
......
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