DescriptionClear need for animation style for forced styleForElement.
When style recalc for an element is triggered by a StyleRecalcChange from
the ancestors, we need to clear the m_animationStyleChange flag on
ElementAnimations if set since the baseLayoutStyle cannot be used. This
is normally done from Element::recalcStyle just before recalcOwnStyle is
called.
Document::inheritHtmlAndBodyElementStyles does styleForElement outside of
the recalcStyle machinery and didn't clear this flag which caused an
assert for baseLayoutStyle comparison.
In particular, the case was that while an animation was running on body,
attempting to load an @font-face would trigger a version increase in the
font cache and a SubtreeStyleChange for the document, while we still tried
to use the baseLayoutStyle for the animating body because we ignored the
Force passed to inheritHtmlAndBodyElementStyles.
Comparing the baseLayoutStyle with the LayoutStyle created from scratch
would cause comparison to fail, due to a Font comparison fail because of
the increased font cache version number, which in turn caused the assert
to trigger.
R=esprehn@chromium.org,dstockwell@chromium.org
BUG=459661
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192241
Patch Set 1 #
Total comments: 12
Patch Set 2 : Fixed review issue #
Total comments: 1
Patch Set 3 : Review issue: removed constness #
Messages
Total messages: 14 (2 generated)
|