summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py')
-rw-r--r--chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py b/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py
index f9d51e96a7a..10d8a10f354 100644
--- a/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py
+++ b/chromium/third_party/blink/renderer/build/scripts/media_feature_symbol.py
@@ -3,23 +3,14 @@
# 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:]
-
- 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
+ return 'k' + NameStyleConverter(name).to_upper_camel_case() + suffix
def getMediaFeatureSymbolWithSuffix(suffix):