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

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

Issue 2902723006: Measure the usage of <ol>.start with |reversed| and no |start| attribute. (Closed)
Patch Set: rebased Created 3 years, 7 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/core/html/HTMLOListElement.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLOListElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOListElement.cpp b/third_party/WebKit/Source/core/html/HTMLOListElement.cpp
index 5dcd6c6a07a666f186888b70930559bf202ff2bc..0a0c69d8c5f1b201df0c00c6fa59d7021aa3e471 100644
--- a/third_party/WebKit/Source/core/html/HTMLOListElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOListElement.cpp
@@ -96,6 +96,20 @@ void HTMLOListElement::ParseAttribute(
}
}
+int HTMLOListElement::start() const {
+ if (has_explicit_start_)
+ return start_;
+
+ if (is_reversed_) {
+ UseCounter::Count(
+ GetDocument(),
+ UseCounter::kHTMLOListElementStartGetterReversedWithoutStartAttribute);
+ return ItemCount();
+ }
+
+ return 1;
+}
+
void HTMLOListElement::setStart(int start) {
SetIntegralAttribute(startAttr, start);
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOListElement.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698