diff --git a/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-motion-rotation.html b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-motion-rotation.html new file mode 100644 index 00000000000000..3c696f11f61fad --- /dev/null +++ b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-motion-rotation.html @@ -0,0 +1,21 @@ + + + + + + +
+ diff --git a/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotate.html b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotate.html new file mode 100644 index 00000000000000..34d93fe6c6977f --- /dev/null +++ b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotate.html @@ -0,0 +1,21 @@ + + + + + + +
+ diff --git a/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotation.html b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotation.html new file mode 100644 index 00000000000000..7deb34d7ba246b --- /dev/null +++ b/third_party/WebKit/LayoutTests/css3/motion-path/property-use-count-offset-rotation.html @@ -0,0 +1,21 @@ + + + + + + +
+ diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp index 723d2cc3d3f237..80e96095731b90 100644 --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp @@ -45,7 +45,7 @@ int totalPagesMeasuredCSSSampleId() { } // Make sure update_use_counter_css.py was run which updates histograms.xml. -constexpr int kMaximumCSSSampleId = 547; +constexpr int kMaximumCSSSampleId = 548; } // namespace @@ -1050,9 +1050,7 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram( return 540; case CSSPropertyOffsetPath: return 541; - case CSSPropertyOffsetRotate: case CSSPropertyOffsetRotation: - // TODO(ericwilligers): Distinct use counter for CSSPropertyOffsetRotate. return 542; case CSSPropertyOffset: return 543; @@ -1064,6 +1062,8 @@ int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram( return 546; case CSSPropertyCaretColor: return 547; + case CSSPropertyOffsetRotate: + return 548; // 1. Add new features above this line (don't change the assigned numbers of // the existing items). // 2. Update kMaximumCSSSampleId with the new maximum value. diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 35be8bcdbfca60..a667b94fd0478e 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -94133,6 +94133,8 @@ value. + + diff --git a/tools/metrics/histograms/update_use_counter_css.py b/tools/metrics/histograms/update_use_counter_css.py index a598439007d2cc..a4dd2865eddb93 100755 --- a/tools/metrics/histograms/update_use_counter_css.py +++ b/tools/metrics/histograms/update_use_counter_css.py @@ -36,19 +36,23 @@ def ReadCssProperties(filename): with open(path_util.GetInputFile(filename)) as f: content = f.readlines() - # Looking for a line like "case CSSPropertyGrid: return 453;". + # Looking for a pair of lines like "case CSSPropertyGrid:\n return 453;". ENUM_REGEX = re.compile(r"""CSSProperty(.*): # capture the enum name \s*return\s* ([0-9]+) # capture the id """, re.VERBOSE) properties = {} + previous_line = '' for line in content: - enum_match = ENUM_REGEX.search(line) + enum_match = ENUM_REGEX.search(previous_line + '\n' + line) if enum_match: enum_name = enum_match.group(1) property_id = int(enum_match.group(2)) properties[property_id] = EnumToCssProperty(enum_name) + previous_line = '' + else: + previous_line = line return properties