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

Issue 19037003: Re-use CSSParser logic to parse keyframe keys (Closed)

Created:
7 years, 5 months ago by Steve Block
Modified:
7 years, 3 months ago
Reviewers:
apavlov
CC:
blink-reviews, apavlov+blink_chromium.org, dglazkov+blink, eae+blinkwatch, darktears, shalamov
Visibility:
Public.

Description

Re-use CSSParser logic to parse keyframe keys This allows the CSSParser logic to be shared between ... - Creating the keyframe from CSS - Setting the keyText as a string from JavaScript Also update StyleKeyframe to cache the string and vector representations of the keys. This is purely an optimisation. No change in behavior. R=apavlov Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157426

Patch Set 1 : Clear cached vector when setting key string #

Patch Set 2 : Re-use parsing logic from CSSParser #

Patch Set 3 : Rebased #

Total comments: 4

Patch Set 4 : Rebased due to removal of memory instrumentation, change to CSSParser-in.cpp syntax and new StyleRe… #

Patch Set 5 : Rebased after https://codereview.chromium.org/22389003 to use doubles for keyframe offsets #

Patch Set 6 : Moved createKeyframeKeyList() to StyleKeyframe::createKeyList() #

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -64 lines) Patch
M Source/core/css/CSSGrammar.y.in View 1 2 3 4 5 6 3 chunks +8 lines, -0 lines 0 comments Download
M Source/core/css/CSSKeyframeRule.h View 1 2 3 4 5 6 3 chunks +14 lines, -12 lines 0 comments Download
M Source/core/css/CSSKeyframeRule.cpp View 1 2 3 4 5 4 chunks +69 lines, -29 lines 0 comments Download
M Source/core/css/CSSParser.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/CSSParser-in.cpp View 1 2 3 4 5 6 4 chunks +16 lines, -19 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Steve Block
7 years, 5 months ago (2013-07-11 02:22:41 UTC) #1
apavlov
https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h File Source/core/css/CSSKeyframeRule.h (right): https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h#newcode49 Source/core/css/CSSKeyframeRule.h:49: void setKeyText(const String& s) { m_keyText = s; } ...
7 years, 5 months ago (2013-07-11 07:05:11 UTC) #2
Steve Block
https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h File Source/core/css/CSSKeyframeRule.h (right): https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h#newcode49 Source/core/css/CSSKeyframeRule.h:49: void setKeyText(const String& s) { m_keyText = s; } ...
7 years, 5 months ago (2013-07-11 07:33:25 UTC) #3
apavlov
On 2013/07/11 07:33:25, Steve Block wrote: > https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h > File Source/core/css/CSSKeyframeRule.h (right): > > https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h#newcode49 ...
7 years, 5 months ago (2013-07-11 07:53:03 UTC) #4
apavlov
On 2013/07/11 07:33:25, Steve Block wrote: > https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h > File Source/core/css/CSSKeyframeRule.h (right): > > https://codereview.chromium.org/19037003/diff/1/Source/core/css/CSSKeyframeRule.h#newcode49 ...
7 years, 5 months ago (2013-07-11 08:31:43 UTC) #5
Steve Block
> Found it. CSSKeyframeRule::setKeyText() is called from V8WebKitCSSKeyframeRule, > static void keyTextAttrSetter(). You're right, I ...
7 years, 5 months ago (2013-07-11 12:24:23 UTC) #6
apavlov
On 2013/07/11 12:24:23, Steve Block wrote: > > Found it. CSSKeyframeRule::setKeyText() is called from > ...
7 years, 5 months ago (2013-07-11 12:32:21 UTC) #7
Steve Block
Updated to share parsing logic from CSSParser Note that this depends on https://codereview.chromium.org/18864008
7 years, 5 months ago (2013-07-12 03:59:49 UTC) #8
Steve Block
I'm on vacation for the next few weeks, so feel free to land/modify/take-over this patch ...
7 years, 5 months ago (2013-07-12 07:56:49 UTC) #9
apavlov
https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSKeyframeRule.cpp File Source/core/css/CSSKeyframeRule.cpp (right): https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSKeyframeRule.cpp#newcode72 Source/core/css/CSSKeyframeRule.cpp:72: if (!m_keys) { The braces are optional here https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSParser-in.cpp ...
7 years, 5 months ago (2013-07-15 11:54:37 UTC) #10
Steve Block
https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSKeyframeRule.cpp File Source/core/css/CSSKeyframeRule.cpp (right): https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSKeyframeRule.cpp#newcode72 Source/core/css/CSSKeyframeRule.cpp:72: if (!m_keys) { No longer relevant https://codereview.chromium.org/19037003/diff/22001/Source/core/css/CSSParser-in.cpp File Source/core/css/CSSParser-in.cpp ...
7 years, 4 months ago (2013-08-14 00:44:04 UTC) #11
apavlov
Back to work! LGTM
7 years, 3 months ago (2013-09-07 09:01:11 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/steveblock@chromium.org/19037003/68001
7 years, 3 months ago (2013-09-09 00:39:15 UTC) #13
commit-bot: I haz the power
7 years, 3 months ago (2013-09-09 01:42:28 UTC) #14
Message was sent while issue was closed.
Change committed as 157426

Powered by Google App Engine
This is Rietveld 408576698