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

Side by Side Diff: Source/build/scripts/media_feature_symbol.py

Issue 185533012: Auto generate MediaFeatureNames, its macros and MediaTypeNames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed comment from RuntimeEnabled Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5
6 def mediaFeatureSymbol(entry, suffix):
7 name = entry['name']
8 if name.startswith('-webkit-'):
9 name = name[8:]
10
11 foundDash = False
12 newName = ""
13 for chr in name:
14 if chr == '-':
15 foundDash = True
16 continue
17 if foundDash:
18 chr = chr.upper()
19 foundDash = False
20 newName = newName + chr
21 newName = newName + suffix
22 return newName
23
24
25 def getMediaFeatureSymbolWithSuffix(suffix):
26 def returnedFunction(entry):
27 return mediaFeatureSymbol(entry, suffix)
28 return returnedFunction
OLDNEW
« no previous file with comments | « Source/build/scripts/make_media_features.py ('k') | Source/build/scripts/templates/MediaFeatures.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698