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
6def 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
25def getMediaFeatureSymbolWithSuffix(suffix):
26    def returnedFunction(entry):
27        return mediaFeatureSymbol(entry, suffix)
28    return returnedFunction
29