Chromium Code Reviews| Index: Source/devtools/scripts/generate_supported_css.py |
| diff --git a/Source/devtools/scripts/generate_supported_css.py b/Source/devtools/scripts/generate_supported_css.py |
| index 2883c943332d2495aa4524c54279cd215a7ae724..07933f4364c1b709d66cb2550032434be8febc3f 100755 |
| --- a/Source/devtools/scripts/generate_supported_css.py |
| +++ b/Source/devtools/scripts/generate_supported_css.py |
| @@ -59,14 +59,12 @@ def fillCSSShorthandsFromFile(fileName): |
| lines = f.readlines() |
| lines = filterCommentsAndEmptyLines(lines) |
| for line in lines: |
| - # Every line is: |
| - # <property-name>[ longhands=<longhand 1>;<longhand 2>;<longhand 3>,runtimeEnabledShorthand=<runtime flag name>] |
| - # There might be a runtime flag declaration at the end of the list followed by a comma. |
| - if "," in line: |
| - line = line[:line.index(",")] |
| - shorthand = line[:line.index(" ")] |
| - longhands = line[line.index("=") + 1:].split(";") |
| - cssProperties[shorthand] = longhands |
| + # Format for shorthands is: |
| + # <property-name>[ longhands=<longhand 1>;<longhand 2>;<longhand 3>] |
| + shorthand = line.partition(" ")[0] |
| + longhands = line.partition("longhands=")[2] |
|
lushnikov
2014/07/24 08:08:35
I've just found the following in CSSProperties.in:
Timothy Loh
2014/07/24 08:27:43
The way str.partition works means that the |longha
lushnikov
2014/07/24 09:26:30
My bad.
One more thing: this relies on "longhands"
Timothy Loh
2014/07/25 03:36:47
Sure, done. FYI the followup patch https://coderev
|
| + if longhands: |
| + cssProperties[shorthand] = longhands.split(";") |
| fillPropertiesFromFile(sys.argv[1]) |
| fillPropertiesFromFile(sys.argv[2]) |