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

Issue 2228313002: Make a function to query whether a CSSPropertyID is valid and whether it has a name. (Closed)

Created:
4 years, 4 months ago by meade_UTC10
Modified:
4 years, 2 months ago
Reviewers:
sashab, rune
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@asan
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make a function to query whether a CSSPropertyID is valid and whether it has a name. This just tidies up and clarifies what is being checked for in a bunch of DCHECKs. I manually looked for asserts, DCHECKs or if statements containing one of id >= firstCSSProperty && id <= lastUnresolvedCSSProperty or id < firstCSSProperty || id > lastCSSProperty and replaced them with a new method isPropertyIDWithName Also manually replaced things like DCHECK_NE(property, CSSPropertyInvalid) with DCHECK(isValidCSSPropertyID(property)); Committed: https://crrev.com/c833755c1ac3b1e409fc1b5bbb3c40ad76d5f5ee Cr-Commit-Position: refs/heads/master@{#423451}

Patch Set 1 #

Patch Set 2 : Change DCHECK types #

Patch Set 3 : Make some adjustments #

Patch Set 4 : Adjust animation dchecks #

Total comments: 7

Patch Set 5 : rebase #

Patch Set 6 : rename methods, fix variable names #

Patch Set 7 : Fix missed rename #

Patch Set 8 : Remove random test #

Patch Set 9 : Revert incorrect changes #

Total comments: 2

Patch Set 10 : Replace isPropertyIDWithName with isCSSPropertyIDWithName #

Patch Set 11 : Revert spurious change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -23 lines) Patch
M third_party/WebKit/Source/build/scripts/make_css_property_names.py View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/StylePropertySerializer.cpp View 1 2 3 4 5 6 7 8 9 9 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/frame/Deprecation.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 43 (30 generated)
meade_UTC10
This widens the allowable values of property.id() in StylePropertySerializer::StylePropertySetForSerializer::StylePropertySetForSerializer and StylePropertySerializer::StylePropertySetForSerializer::shouldProcessPropertyAt, but I'm not sure ...
4 years, 4 months ago (2016-08-10 07:02:31 UTC) #4
meade_UTC10
On 2016/08/10 07:02:31, Eddy wrote: > This widens the allowable values of property.id() in > ...
4 years, 4 months ago (2016-08-10 07:04:15 UTC) #5
sashab
Totally lost track of this sorry!! Yes this definitely looks great :) How about isPropertyWithName()? ...
4 years, 4 months ago (2016-08-15 07:23:13 UTC) #8
sashab
Are you still working on this eddy? I think its a great patch :)
4 years, 2 months ago (2016-09-23 03:02:01 UTC) #9
meade_UTC10
Oh, thanks Sasha :) https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Source/build/scripts/make_css_property_names.py File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Source/build/scripts/make_css_property_names.py#newcode56 third_party/WebKit/Source/build/scripts/make_css_property_names.py:56: DCHECK_LE(value, lastCSSProperty); On 2016/08/15 07:23:13, ...
4 years, 2 months ago (2016-09-29 07:39:56 UTC) #10
sashab
lgtm Maybe reword the patch description to be a bit clearer, and put the regex/whatever ...
4 years, 2 months ago (2016-09-30 02:58:23 UTC) #19
meade_UTC10
Updated the CL description. Unfortunately it was not so fancy as to have regexes :p ...
4 years, 2 months ago (2016-09-30 06:17:37 UTC) #25
meade_UTC10
+rune for OWNERS PTAL, thanks!
4 years, 2 months ago (2016-09-30 06:18:31 UTC) #27
rune
lgtm with naming nit. https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_names.py File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_names.py#newcode47 third_party/WebKit/Source/build/scripts/make_css_property_names.py:47: inline bool isPropertyIDWithName(int id) Should ...
4 years, 2 months ago (2016-09-30 09:48:33 UTC) #30
meade_UTC10
https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_names.py File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Source/build/scripts/make_css_property_names.py#newcode47 third_party/WebKit/Source/build/scripts/make_css_property_names.py:47: inline bool isPropertyIDWithName(int id) On 2016/09/30 09:48:33, rune wrote: ...
4 years, 2 months ago (2016-10-06 04:42:05 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2228313002/200001
4 years, 2 months ago (2016-10-06 05:05:06 UTC) #39
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 2 months ago (2016-10-06 06:26:34 UTC) #41
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 06:28:27 UTC) #43
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c833755c1ac3b1e409fc1b5bbb3c40ad76d5f5ee
Cr-Commit-Position: refs/heads/master@{#423451}

Powered by Google App Engine
This is Rietveld 408576698