Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / build / scripts / media_feature_symbol.py
blob0077ccbf900bdb1ad99ee92c7cebc5080692625d
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.
6 def mediaFeatureSymbol(entry, suffix):
7 name = entry['name']
8 if name.startswith('-webkit-'):
9 name = name[8:]
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
25 def getMediaFeatureSymbolWithSuffix(suffix):
26 def returnedFunction(entry):
27 return mediaFeatureSymbol(entry, suffix)
28 return returnedFunction