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

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: 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
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..cfc1e949853a60695ae221785315ec34a2d23aee 100644
--- a/third_party/WebKit/Source/core/html/HTMLOListElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOListElement.cpp
@@ -96,6 +96,19 @@ void HTMLOListElement::ParseAttribute(
}
}
+int HTMLOListElement::start() const {
+ if (has_explicit_start_)
+ return start_;
+
+ if (is_reversed_) {
+ UseCounter::Count(GetDocument(),
+ UseCounter::kHTMLOListElementReversedWithoutStart);
+ return ItemCount();
+ }
+
+ return 1;
+}
+
void HTMLOListElement::setStart(int start) {
SetIntegralAttribute(startAttr, start);
}

Powered by Google App Engine
This is Rietveld 408576698