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

Issue 24020008: Introduce CSS_VALUE_TYPE_CASTS macro to cast CSSValue (Closed)

Created:
7 years, 3 months ago by gyuyoung-inactive
Modified:
7 years, 3 months ago
Reviewers:
tkent
CC:
blink-reviews, eae+blinkwatch, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Introduce CSS_VALUE_TYPE_CASTS macro to cast CSSValue As SVG and HTML have type cast function, CSSValue also can have it. This cl introduces CSS_VALUE_TYPE_CASTS macro to make type cast function easily. This type cast macros will help to detect bad-cast bugs as well as improve a code readibility. This patch adds the following methods, - CSSFooValue* toCSSFooValue(CSSValue*) - const CSSFooValue* toCSSFooValue(const CSSValue*) This cl applies the macro to CSSReflectValue and CSSImageSetValue first. Besides this cl adds these functions to detect unnecessary type casting. - void toFooValue(const CSS*Value*) - void toFooValue(const CSS*Value&) This will let us know where does unnecessary type casting happen in compilation time. BUG=N/A Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158254

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -9 lines) Patch
M Source/core/css/CSSCursorImageValue.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSImageSetValue.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSReflectValue.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSValue.h View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/css/CSSValue.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/ElementStyleResources.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/rendering/style/StylePendingImage.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
gyuyoung-inactive
Add tkent to reviewer.
7 years, 3 months ago (2013-09-23 06:14:20 UTC) #1
tkent
We need to update Tools/Scripts/webkitpy/style/checkers/cpp.py so that it shows an appropriate error message. See http://src.chromium.org/viewvc/blink?view=revision&revision=158059 ...
7 years, 3 months ago (2013-09-24 00:08:34 UTC) #2
gyuyoung-inactive
On 2013/09/24 00:08:34, tkent wrote: > We need to update Tools/Scripts/webkitpy/style/checkers/cpp.py so that it shows ...
7 years, 3 months ago (2013-09-24 03:38:53 UTC) #3
tkent
Please use 'reply' feature of the code review tool if possible. On 2013/09/24 03:38:53, gyuyoung ...
7 years, 3 months ago (2013-09-24 04:35:26 UTC) #4
tkent
> It's not cool though no one don't see it. :-) no one see it ...
7 years, 3 months ago (2013-09-24 04:36:07 UTC) #5
gyuyoung-inactive
On 2013/09/24 04:35:26, tkent wrote: > Please use 'reply' feature of the code review tool ...
7 years, 3 months ago (2013-09-24 05:08:25 UTC) #6
gyuyoung-inactive
Patch is updated.
7 years, 3 months ago (2013-09-24 05:30:58 UTC) #7
tkent
https://codereview.chromium.org/24020008/diff/11001/Source/core/css/CSSValue.h File Source/core/css/CSSValue.h (right): https://codereview.chromium.org/24020008/diff/11001/Source/core/css/CSSValue.h#newcode251 Source/core/css/CSSValue.h:251: void toCSS##ValueTypeName(const CSS##ValueTypeName*) { } \ Why did you ...
7 years, 3 months ago (2013-09-24 05:41:50 UTC) #8
gyuyoung-inactive
On 2013/09/24 05:41:50, tkent wrote: > https://codereview.chromium.org/24020008/diff/11001/Source/core/css/CSSValue.h > File Source/core/css/CSSValue.h (right): > > https://codereview.chromium.org/24020008/diff/11001/Source/core/css/CSSValue.h#newcode251 > ...
7 years, 3 months ago (2013-09-24 05:51:53 UTC) #9
tkent
lgtm
7 years, 3 months ago (2013-09-24 05:53:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gyuyoung.kim@samsung.com/24020008/16001
7 years, 3 months ago (2013-09-24 05:53:54 UTC) #11
commit-bot: I haz the power
Change committed as 158254
7 years, 3 months ago (2013-09-24 07:56:44 UTC) #12
gyuyoung-inactive
On 2013/09/24 00:08:34, tkent wrote: > We need to update Tools/Scripts/webkitpy/style/checkers/cpp.py so that it shows ...
7 years, 3 months ago (2013-09-24 12:05:09 UTC) #13
tkent
7 years, 3 months ago (2013-09-24 22:59:24 UTC) #14
Message was sent while issue was closed.
On 2013/09/24 12:05:09, gyuyoung wrote:
> On 2013/09/24 00:08:34, tkent wrote:
> > We need to update Tools/Scripts/webkitpy/style/checkers/cpp.py so that it
> shows
> > an appropriate error message.  See
> > http://src.chromium.org/viewvc/blink?view=revision&revision=158059
> 
> Kent, the style check patch was reverted by dpranke. It looks the patch needs
to
> be reviewed further. I will update it after re-landing it.
> https://src.chromium.org/viewvc/blink?revision=158138&view=revision

Ok, we don't need further work for style checker.

Powered by Google App Engine
This is Rietveld 408576698