Crash when using 'em' units to specify font-size inside animation keyframe.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jul 2014 03:51:31 +0000 (03:51 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jul 2014 03:51:31 +0000 (03:51 +0000)
commit0bab2a05e598dc9d6867146f0c36bb98cd60f13b
tree3d1ec10bd8b587a522895ed091d7cc4d6aafae87
parentdad751387b7d627e40f3127e076497ba3956f540
Crash when using 'em' units to specify font-size inside animation keyframe.
<https://webkit.org/b/135395>
<rdar://problem/17851910>

Source/WebCore:
We'd forgotten to initialize the "parent style" when resolving keyframe
styles, and this led to a crash in length conversion where the code
assumes a parent style will be present.

To keep this fix minimal, simply make the "parent style" a clone of the
base element style.

Reviewed by Simon Fraser.

Test: fast/animation/keyframe-with-font-size-in-em-units.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):

LayoutTests:
Add a reduced test case to cover this bug.

Reviewed by Simon Fraser.

* fast/animation/keyframe-with-font-size-in-em-units-expected.txt: Added.
* fast/animation/keyframe-with-font-size-in-em-units.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/animation/keyframe-with-font-size-in-em-units-expected.txt [new file with mode: 0644]
LayoutTests/fast/animation/keyframe-with-font-size-in-em-units.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp