Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Issue 1000413003: Clear need for animation style for forced styleForElement. (Closed)

Created:
5 years, 9 months ago by rune
Modified:
5 years, 9 months ago
Reviewers:
dstockwell, esprehn
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, dstockwell, eae+blinkwatch, Eric Willigers, Mike Lawther (Google), rjwright, rwlbuis, shans, sof, Steve Block, Timothy Loh
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Clear 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -2 lines) Patch
A LayoutTests/animations/base-render-style-body-crash.html View 1 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/animations/base-render-style-body-crash-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 1 chunk +10 lines, -2 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
rune
5 years, 9 months ago (2015-03-13 11:00:52 UTC) #1
rune
PTAL
5 years, 9 months ago (2015-03-17 08:50:17 UTC) #2
dstockwell
lgtm https://codereview.chromium.org/1000413003/diff/1/LayoutTests/animations/base-render-style-body-crash.html File LayoutTests/animations/base-render-style-body-crash.html (right): https://codereview.chromium.org/1000413003/diff/1/LayoutTests/animations/base-render-style-body-crash.html#newcode3 LayoutTests/animations/base-render-style-body-crash.html:3: body { -webkit-transition: background-color 1s } just 'transition' ...
5 years, 9 months ago (2015-03-18 11:05:54 UTC) #3
esprehn
https://codereview.chromium.org/1000413003/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1000413003/diff/1/Source/core/dom/Document.cpp#newcode1606 Source/core/dom/Document.cpp:1606: documentElement()->clearAnimationStyleChange(); This seems okay as a short term hack, ...
5 years, 9 months ago (2015-03-18 11:41:01 UTC) #4
esprehn
https://codereview.chromium.org/1000413003/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1000413003/diff/1/Source/core/dom/Document.cpp#newcode1623 Source/core/dom/Document.cpp:1623: if (!bodyStyle || body->needsStyleRecalc() || didRecalcDocumentElement) On 2015/03/18 11:41:01, ...
5 years, 9 months ago (2015-03-18 11:41:38 UTC) #5
rune
https://codereview.chromium.org/1000413003/diff/1/LayoutTests/animations/base-render-style-body-crash.html File LayoutTests/animations/base-render-style-body-crash.html (right): https://codereview.chromium.org/1000413003/diff/1/LayoutTests/animations/base-render-style-body-crash.html#newcode3 LayoutTests/animations/base-render-style-body-crash.html:3: body { -webkit-transition: background-color 1s } On 2015/03/18 11:05:54, ...
5 years, 9 months ago (2015-03-18 14:53:03 UTC) #6
rune
esprehn@ wdyt?
5 years, 9 months ago (2015-03-19 08:10:15 UTC) #7
esprehn
Lgtm w/ not fixed. https://codereview.chromium.org/1000413003/diff/20001/Source/core/dom/Element.h File Source/core/dom/Element.h (right): https://codereview.chromium.org/1000413003/diff/20001/Source/core/dom/Element.h#newcode316 Source/core/dom/Element.h:316: void setAnimationStyleChange(bool) const; Setters should ...
5 years, 9 months ago (2015-03-19 10:40:58 UTC) #8
rune
On 2015/03/19 10:40:58, esprehn wrote: > Lgtm w/ not fixed. > > https://codereview.chromium.org/1000413003/diff/20001/Source/core/dom/Element.h > File ...
5 years, 9 months ago (2015-03-19 10:48:10 UTC) #9
esprehn
Nit* To unsubscribe from this group and stop receiving emails from it, send an email ...
5 years, 9 months ago (2015-03-19 10:52:14 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1000413003/40001
5 years, 9 months ago (2015-03-20 09:19:37 UTC) #13
commit-bot: I haz the power
5 years, 9 months ago (2015-03-20 10:55:55 UTC) #14
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192241

Powered by Google App Engine
This is Rietveld 408576698