|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by meade_UTC10 Modified:
4 years, 2 months ago 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. |
DescriptionMake 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 #
Messages
Total messages: 43 (30 generated)
The CQ bit was checked by meade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
meade@chromium.org changed reviewers: + sashab@chromium.org
This widens the allowable values of property.id() in StylePropertySerializer::StylePropertySetForSerializer::StylePropertySetForSerializer and StylePropertySerializer::StylePropertySetForSerializer::shouldProcessPropertyAt, but I'm not sure if that's a problem here. Do you know? I'm also going to rename the function, this is experimental for now :)
On 2016/08/10 07:02:31, Eddy wrote: > This widens the allowable values of property.id() in > StylePropertySerializer::StylePropertySetForSerializer::StylePropertySetForSerializer > and > StylePropertySerializer::StylePropertySetForSerializer::shouldProcessPropertyAt, > but I'm not sure if that's a problem here. Do you know? > > I'm also going to rename the function, this is experimental for now :) Scratch that, it doesn't do that. Sooo wdyt other than the function name?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Totally lost track of this sorry!! Yes this definitely looks great :) How about isPropertyWithName()? So we can have isPropertyValid(), isPropertyWithName(), isInheritedProperty(), etc Also sorry for the lateness on this!! Only saw this because of the dashboard haha :) Next time ping me if I'm so late to review! :) https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_css_property_names.py:56: DCHECK_LE(value, lastCSSProperty); Maybe DCHECK(propertyHasName() || property == CSSPropertyInvalid)? https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp:118: DCHECK_NE(property, CSSPropertyInvalid); Maybe this could use propertyHasName() too? Should we have a isValidPropertyId() method? https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp:525: DCHECK_NE(id, CSSPropertyInvalid); Same comment as above
Are you still working on this eddy? I think its a great patch :)
Oh, thanks Sasha :) https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_css_property_names.py:56: DCHECK_LE(value, lastCSSProperty); On 2016/08/15 07:23:13, sashab wrote: > Maybe DCHECK(propertyHasName() || property == CSSPropertyInvalid)? Done. https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp:118: DCHECK_NE(property, CSSPropertyInvalid); On 2016/08/15 07:23:13, sashab wrote: > Maybe this could use propertyHasName() too? Should we have a isValidPropertyId() > method? Done. https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp:525: DCHECK_NE(id, CSSPropertyInvalid); On 2016/08/15 07:23:13, sashab wrote: > Same comment as above Done.
The CQ bit was checked by meade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by meade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [EXPERIMENTAL] Make a function to encapsulate whether you can make a name out of a CSSPropertyID BUG= ========== to ========== Make a function to encapsulate whether you can make a name out of a CSSPropertyID ==========
Description was changed from ========== Make a function to encapsulate whether you can make a name out of a CSSPropertyID ========== to ========== Make a function to encapsulate whether you can make a name out of a CSSPropertyID This just tidies up and clarifies what is being checked for in a bunch of DCHECKs. ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
lgtm Maybe reword the patch description to be a bit clearer, and put the regex/whatever you used to find these occurrences :) Other than that this looks awesome.
Description was changed from ========== Make a function to encapsulate whether you can make a name out of a CSSPropertyID This just tidies up and clarifies what is being checked for in a bunch of DCHECKs. ========== to ========== Make a function to query whether you can make a name out of a CSSPropertyID 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)); ==========
Description was changed from ========== Make a function to query whether you can make a name out of a CSSPropertyID 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)); ========== to ========== Make a function to query whether you can make a name out of a CSSPropertyID 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)); ==========
Description was changed from ========== Make a function to query whether you can make a name out of a CSSPropertyID 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)); ========== to ========== 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)); ==========
The CQ bit was checked by meade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Updated the CL description. Unfortunately it was not so fancy as to have regexes :p https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_css_property_names.py:56: DCHECK_LE(value, lastCSSProperty); On 2016/09/29 07:39:56, Eddy wrote: > On 2016/08/15 07:23:13, sashab wrote: > > Maybe DCHECK(propertyHasName() || property == CSSPropertyInvalid)? > > Done. Actually that doesn't work - lastCSSProperty != lastUnresolvedCSSProperty :) I reverted my change for this comment.
meade@chromium.org changed reviewers: + rune@opera.com
+rune for OWNERS PTAL, thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm with naming nit. https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/build/scripts/make_css_property_names.py:47: inline bool isPropertyIDWithName(int id) Should the name here also include "CSS"? isCSSPropertyIDWithName?
The CQ bit was checked by meade@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sashab@chromium.org Link to the patchset: https://codereview.chromium.org/2228313002/#ps160001 (title: "Revert incorrect changes")
The CQ bit was unchecked by meade@chromium.org
https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/build/scripts/make_css_property_names.py (right): https://codereview.chromium.org/2228313002/diff/160001/third_party/WebKit/Sou... 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: > Should the name here also include "CSS"? isCSSPropertyIDWithName? Done.
The CQ bit was checked by meade@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by meade@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from sashab@chromium.org, rune@opera.com Link to the patchset: https://codereview.chromium.org/2228313002/#ps200001 (title: "Revert spurious change")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== 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)); ========== to ========== 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)); ==========
Message was sent while issue was closed.
Committed patchset #11 (id:200001)
Message was sent while issue was closed.
Description was changed from ========== 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)); ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 11 (id:??) landed as https://crrev.com/c833755c1ac3b1e409fc1b5bbb3c40ad76d5f5ee Cr-Commit-Position: refs/heads/master@{#423451} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
