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

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

Issue 2805633002: Count 'icon' attribute of MENUITEM element. (Closed)
Patch Set: Created 3 years, 8 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/HTMLMenuItemElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp b/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
index d3c1267408474e903d48be8f0c4319b4544e242c..b06ca84e0b5eec91465532636cf85999760716a7 100644
--- a/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
@@ -22,6 +22,13 @@ bool HTMLMenuItemElement::isURLAttribute(const Attribute& attribute) const {
return attribute.name() == iconAttr || HTMLElement::isURLAttribute(attribute);
}
+void HTMLMenuItemElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ if (params.name == iconAttr)
+ UseCounter::count(document(), UseCounter::MenuItemElementIconAttribute);
+ HTMLElement::parseAttribute(params);
+}
+
void HTMLMenuItemElement::defaultEventHandler(Event* event) {
if (event->type() == EventTypeNames::click) {
if (equalIgnoringCase(fastGetAttribute(typeAttr), "checkbox")) {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMenuItemElement.h ('k') | third_party/WebKit/Source/core/html/HTMLUnknownElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698