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

Issue 11364186: Dartifying SVG library class names. (Closed)

Created:
8 years, 1 month ago by blois
Modified:
8 years, 1 month ago
Reviewers:
vsm, Anton Muhin, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Dartifying SVG library class names. This CL is based on my previous CL to split out the SVG library. Basically it renames most classes, but because of some name conflicts around Element and Document, I've skipped those. Renaming those classes will require some sizable changes to the generation code to emit library prefixes when referencing types across libs. BUG= Committed: https://code.google.com/p/dart/source/detail?r=15107

Patch Set 1 #

Patch Set 2 : Minor cleanup #

Patch Set 3 : Merging with latest. #

Patch Set 4 : Fixing svg_1_test typo. #

Total comments: 10

Patch Set 5 : Incorporated review feedback. #

Total comments: 2

Patch Set 6 : Incorporating review feedback. #

Total comments: 9

Patch Set 7 : Incorporating review feedback #

Total comments: 1

Patch Set 8 : Syncing to latest, updating for style guide. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3439 lines, -3497 lines) Patch
M sdk/lib/html/dart2js/html_dart2js.dart View 1 2 3 4 5 6 7 8 chunks +8 lines, -16 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/html/scripts/generator.py View 1 2 3 4 5 6 7 3 chunks +8 lines, -8 lines 0 comments Download
M sdk/lib/html/scripts/htmlrenamer.py View 1 2 3 4 5 6 7 5 chunks +40 lines, -5 lines 0 comments Download
M sdk/lib/html/scripts/systemhtml.py View 1 2 3 4 5 6 7 4 chunks +53 lines, -52 lines 0 comments Download
M sdk/lib/html/src/shared_SVGFactoryProviders.dart View 1 2 3 4 5 6 7 2 chunks +7 lines, -7 lines 0 comments Download
D sdk/lib/html/templates/html/impl/impl_SVGElement.darttemplate View 1 2 3 4 5 6 7 1 chunk +0 lines, -79 lines 0 comments Download
D sdk/lib/html/templates/html/impl/impl_SVGSVGElement.darttemplate View 1 chunk +0 lines, -11 lines 0 comments Download
A + sdk/lib/html/templates/html/impl/impl_SvgElement.darttemplate View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
A + sdk/lib/html/templates/html/impl/impl_SvgSvgElement.darttemplate View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/svg/dart2js/svg_dart2js.dart View 1 2 3 4 5 6 7 241 chunks +1480 lines, -1477 lines 0 comments Download
M sdk/lib/svg/dartium/svg_dartium.dart View 1 2 3 4 5 6 7 257 chunks +1664 lines, -1664 lines 0 comments Download
M tests/html/element_test.dart View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M tests/html/node_test.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/html/svg_1_test.dart View 1 2 3 3 chunks +5 lines, -5 lines 0 comments Download
M tests/html/svg_2_test.dart View 2 chunks +26 lines, -25 lines 0 comments Download
M tests/html/svg_3_test.dart View 7 chunks +36 lines, -36 lines 0 comments Download
M tests/html/svgelement_test.dart View 1 2 3 4 5 6 7 5 chunks +102 lines, -102 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
blois
8 years, 1 month ago (2012-11-12 19:46:59 UTC) #1
Anton Muhin
https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py#newcode286 sdk/lib/html/scripts/htmlrenamer.py:286: def RenameIDLName(self, name): why this indirection? https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py#newcode354 sdk/lib/html/scripts/htmlrenamer.py:354: return ...
8 years, 1 month ago (2012-11-13 11:37:19 UTC) #2
blois
https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py#newcode286 sdk/lib/html/scripts/htmlrenamer.py:286: def RenameIDLName(self, name): On 2012/11/13 11:37:19, Anton Muhin wrote: ...
8 years, 1 month ago (2012-11-14 17:21:50 UTC) #3
sra1
lgtm https://codereview.chromium.org/11364186/diff/9001/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/9001/sdk/lib/html/scripts/htmlrenamer.py#newcode348 sdk/lib/html/scripts/htmlrenamer.py:348: name = type_name[3:] Do you think there is ...
8 years, 1 month ago (2012-11-15 01:10:10 UTC) #4
blois
https://codereview.chromium.org/11364186/diff/9001/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/9001/sdk/lib/html/scripts/htmlrenamer.py#newcode348 sdk/lib/html/scripts/htmlrenamer.py:348: name = type_name[3:] On 2012/11/15 01:10:11, sra1 wrote: > ...
8 years, 1 month ago (2012-11-15 01:17:07 UTC) #5
Anton Muhin
https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/5001/sdk/lib/html/scripts/htmlrenamer.py#newcode286 sdk/lib/html/scripts/htmlrenamer.py:286: def RenameIDLName(self, name): On 2012/11/14 17:21:50, blois wrote: > ...
8 years, 1 month ago (2012-11-15 12:11:47 UTC) #6
blois
https://codereview.chromium.org/11364186/diff/7002/sdk/lib/html/scripts/htmlrenamer.py File sdk/lib/html/scripts/htmlrenamer.py (right): https://codereview.chromium.org/11364186/diff/7002/sdk/lib/html/scripts/htmlrenamer.py#newcode353 sdk/lib/html/scripts/htmlrenamer.py:353: # We're looking for a sequence of letters which ...
8 years, 1 month ago (2012-11-15 17:30:07 UTC) #7
Anton Muhin
8 years, 1 month ago (2012-11-15 17:49:23 UTC) #8
lgtm

https://codereview.chromium.org/11364186/diff/7002/sdk/lib/html/scripts/htmlr...
File sdk/lib/html/scripts/htmlrenamer.py (right):

https://codereview.chromium.org/11364186/diff/7002/sdk/lib/html/scripts/htmlr...
sdk/lib/html/scripts/htmlrenamer.py:362: return
re.sub(r"([A-Z]|[0-9])([A-Z]*)([A-Z]+|$)", toLower, name)
Up to you, Pete

On 2012/11/15 17:30:07, blois wrote:
> On 2012/11/15 12:11:47, Anton Muhin wrote:
> > I am not sure anyone will like it, but technically there is another option:
> > 
> > re.sub('(?<=[A-Z]|[0-9])[A-Z]*(?=[A-Z]|$)', lambda m: m.group(0).lower(),
> name)
> 
> That does work though I find it a bit less readable. Would prefer the expanded
> version.

https://codereview.chromium.org/11364186/diff/14001/sdk/lib/html/scripts/html...
File sdk/lib/html/scripts/htmlrenamer.py (right):

https://codereview.chromium.org/11364186/diff/14001/sdk/lib/html/scripts/html...
sdk/lib/html/scripts/htmlrenamer.py:350: #   XPathNSResolver:
X()Path(N)(S)(R)esolver
nit: you may want to put (X) and (P) to match three groups of the next match.

Powered by Google App Engine
This is Rietveld 408576698