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

Issue 2922483004: Generate enum/getters/setters/mappings for image-rendering. (Closed)

Created:
3 years, 6 months ago by shend
Modified:
3 years, 6 months ago
Reviewers:
meade_UTC10, nainar
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Generate enum/getters/setters/mappings for image-rendering. Currently, the image-rendering property is a 'storage_only' field, so it has no generated public getters/setters. This patch changes it to a 'keyword' field so that its getters/setters can be generated as well. We also generate the ImageRendering enum and use the generated CSSValueID <-> ImageRendering mappings. We also rename ImageRendering::kOptimizeContrast to kWebkitOptimizeContrast to match the keywords. Diff of generated files: https://gist.github.com/51d00263e744ea52b3b8cc419f54314f/revisions BUG=628043 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2922483004 Cr-Commit-Position: refs/heads/master@{#476585} Committed: https://chromium.googlesource.com/chromium/src/+/359a15605f7907df8909b75dfac49dfd5d98f6ae

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -68 lines) Patch
M third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h View 1 chunk +0 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.json5 View 1 chunk +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ImageQualityController.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/HTMLCanvasPainter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyleConstants.h View 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 22 (12 generated)
shend
Hi Naina, PTAL
3 years, 6 months ago (2017-06-02 03:12:31 UTC) #6
nainar
lgtm
3 years, 6 months ago (2017-06-02 03:21:36 UTC) #7
shend
Hi Eddy, PTAL
3 years, 6 months ago (2017-06-02 03:45:58 UTC) #9
meade_UTC10
lgtm
3 years, 6 months ago (2017-06-02 04:06:51 UTC) #10
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/2922483004/1
3 years, 6 months ago (2017-06-02 05:39:27 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/359a15605f7907df8909b75dfac49dfd5d98f6ae
3 years, 6 months ago (2017-06-02 05:44:22 UTC) #18
eae
Where are all of these auto generated enums defined now? Grepping through the code base ...
3 years, 6 months ago (2017-06-14 21:37:21 UTC) #19
shend
On 2017/06/14 at 21:37:21, eae wrote: > Where are all of these auto generated enums ...
3 years, 6 months ago (2017-06-14 22:20:42 UTC) #20
shend
On 2017/06/14 at 22:20:42, shend wrote: > On 2017/06/14 at 21:37:21, eae wrote: > > ...
3 years, 6 months ago (2017-06-14 22:22:35 UTC) #21
nainar
3 years, 6 months ago (2017-06-14 23:10:56 UTC) #22
Message was sent while issue was closed.
On 2017/06/14 at 22:22:35, shend wrote:
> On 2017/06/14 at 22:20:42, shend wrote:
> > On 2017/06/14 at 21:37:21, eae wrote:
> > > Where are all of these auto generated enums defined now? Grepping through
the code base yields nothing and code search can't find them either.
> > > It would be great if we could have the generated file be somewhere
discoverable.
> > > 
> > > Until then, what's the magic header one needs to include to get the
definition of enums like EImageRendering?
> > 
> > They should be in out/Debug/gen/blink/core/ComputedStyleBaseConstants.h. It
shows up on code search for me (when I search EImageRendering).
> > 
> > To include that file, you just need to #include
"core/ComputedStyleBaseConstants.h".
> 
> Actually, it's better to #include "core/style/ComputedStyleConstants.h", which
has both handwritten and generated enums.

Hi eae@, 

You are right pushing the code into out/Debug/gen/blink/core/ does reduce its
discoverability. Specifically if you are grepping in Source/core. We can't push
the generated files into Source/core because gn specifically prohibits it.
shend@ is reaching out to the gn folks to see if there is a workaround. In the
meanwhile, we will add a comment to all the handwritten files specifying where
you can find the corresponding generated code. This doesn't solve the grepping
problem, but hopefully makes is that 10% easier to find what you are looking
for.

Powered by Google App Engine
This is Rietveld 408576698