summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py
blob: 10d8a10f35404379859deb812b747629c76baa3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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.


from blinkbuild.name_style_converter import NameStyleConverter


def mediaFeatureSymbol(entry, suffix):
    name = entry['name'].original
    if name.startswith('-webkit-'):
        name = name[8:]
    return 'k' + NameStyleConverter(name).to_upper_camel_case() + suffix


def getMediaFeatureSymbolWithSuffix(suffix):
    def returnedFunction(entry):
        return mediaFeatureSymbol(entry, suffix)
    return returnedFunction