diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py')
-rw-r--r-- | chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py b/chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py new file mode 100644 index 00000000000..0077ccbf900 --- /dev/null +++ b/chromium/third_party/WebKit/Source/build/scripts/media_feature_symbol.py @@ -0,0 +1,28 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +def mediaFeatureSymbol(entry, suffix): + name = entry['name'] + if name.startswith('-webkit-'): + name = name[8:] + + foundDash = False + newName = "" + for chr in name: + if chr == '-': + foundDash = True + continue + if foundDash: + chr = chr.upper() + foundDash = False + newName = newName + chr + newName = newName + suffix + return newName + + +def getMediaFeatureSymbolWithSuffix(suffix): + def returnedFunction(entry): + return mediaFeatureSymbol(entry, suffix) + return returnedFunction |