Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: third_party/WebKit/Source/devtools/scripts/generate_supported_css.py

Issue 2220473002: DevTools: generate information about property inheritance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kill-2
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/scripts/generate_supported_css.py
diff --git a/third_party/WebKit/Source/devtools/scripts/generate_supported_css.py b/third_party/WebKit/Source/devtools/scripts/generate_supported_css.py
index f03541568a3601849502989e07957635077a2b43..a1c25e5b51e594cd7a6bdd5c8fca0e1a2a763154 100755
--- a/third_party/WebKit/Source/devtools/scripts/generate_supported_css.py
+++ b/third_party/WebKit/Source/devtools/scripts/generate_supported_css.py
@@ -33,7 +33,7 @@ except ImportError:
import json
import sys
-
+import re
def properties_from_file(file_name):
properties = []
@@ -43,8 +43,12 @@ def properties_from_file(file_name):
line = line.strip()
if not line or line.startswith("//") or "alias_for" in line:
continue
- name = line.partition(" ")[0]
+ partition = re.split("[, ]", line)
+ name = partition[0]
+ attributes = partition[1:]
entry = {"name": name}
+ if "inherited" in attributes:
+ entry["inherited"] = True
propertyNames.add(name)
longhands = line.partition("longhands=")[2].partition(",")[0]
if longhands:
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698