New issue
Advanced search Search tips

Issue 641027 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 578344



Sign in to add a comment

rewrite_to_chrome_style: |m_3dRenderingContext| shouldn't be renamed to |3d_rendering_context_|

Project Member Reported by lukasza@chromium.org, Aug 25 2016

Issue description

Example where this is happening: third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

AFAICT |3d_rendering_context_| is not a valid C++ identifier (because it begins with a digit).
 

Comment 1 by dcheng@chromium.org, Aug 25 2016

FWIW, I think this is one of those times we should just manually rename the thing in question ahead of time, there's not going to be very many of these and a human can probably do a better job of picking a name that the rewriter will be able to handle gracefully.

Comment 2 by danakj@chromium.org, Aug 25 2016

Yeah, and '\bm_[0-9]' should find them all. We can just put the 3d at the end of the name for that one.
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82c4e80517dfaef9422cb124df9f1add28b28029

commit 82c4e80517dfaef9422cb124df9f1add28b28029
Author: lukasza <lukasza@chromium.org>
Date: Tue Aug 30 16:47:46 2016

Manually rename \<m_[0-9]... fields to help rewrite_to_chrome_style tool.

rewrite_to_chrome_style tool has trouble renaming \<m_[0-9]... fields,
because |m_3dRenderingContext| shouldn't be renamed to
|3d_rendering_context_| (the latter is not a valid C++ identifier).
Therefore, this CL manually renames all \<m_[0-9]... fields under
third_party/WebKit/Source, so that a digit will not appear as the first
character of the name.

A few extra fields have been renamed in core/paint/PaintLayer.h/.cpp
for consistency between ...StatusDirty and is...Dirty.

A few extra changes have been made to follow recent style changes
(e.g. to prefer DCHECK over ASSERT in new code).

BUG= 641027 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2291723002
Cr-Commit-Position: refs/heads/master@{#415320}

[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/core/paint/PaintLayer.cpp
[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/core/paint/PaintLayer.h
[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
[modify] https://crrev.com/82c4e80517dfaef9422cb124df9f1add28b28029/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

Status: Fixed (was: Untriaged)

Sign in to add a comment