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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMeterElement.cpp

Issue 1415573015: Count usage of <meter> with various -webkit-appearance values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/core/frame/UseCounter.h ('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/core/html/HTMLMeterElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMeterElement.cpp b/third_party/WebKit/Source/core/html/HTMLMeterElement.cpp
index 97587fa12436bb251c3af6388e18a70ad298107d..d91601fe2f967b051a7ca07cb63fa401e8c5b34f 100644
--- a/third_party/WebKit/Source/core/html/HTMLMeterElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMeterElement.cpp
@@ -57,6 +57,28 @@ PassRefPtrWillBeRawPtr<HTMLMeterElement> HTMLMeterElement::create(Document& docu
LayoutObject* HTMLMeterElement::createLayoutObject(const ComputedStyle& style)
{
+ switch (style.appearance()) {
+ case ContinuousCapacityLevelIndicatorPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithContinuousCapacityAppearance);
+ break;
+ case DiscreteCapacityLevelIndicatorPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithDiscreteCapacityAppearance);
+ break;
+ case MeterPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithMeterAppearance);
+ break;
+ case NoControlPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithNoneAppearance);
+ break;
+ case RatingLevelIndicatorPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithRatingAppearance);
+ break;
+ case RelevancyLevelIndicatorPart:
+ UseCounter::count(document(), UseCounter::MeterElementWithRelevancyAppearance);
+ break;
+ default:
kochi 2015/11/06 06:14:26 Shall we count this other appearances to get the t
tkent 2015/11/06 08:31:36 UseCounter::MeterElement would be the denominator.
+ break;
+ }
if (openShadowRoot() || !LayoutTheme::theme().supportsMeter(style.appearance()))
return LayoutObject::createObject(this, style);
return new LayoutMeter(this);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698