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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLUnknownElement.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLUnknownElement.h" 5 #include "core/html/HTMLUnknownElement.h"
6 6
7 #include "core/frame/UseCounter.h" 7 #include "core/frame/UseCounter.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 HTMLUnknownElement::HTMLUnknownElement(const QualifiedName& tagName, 11 HTMLUnknownElement::HTMLUnknownElement(const QualifiedName& tagName,
12 Document& document) 12 Document& document)
13 : HTMLElement(tagName, document) { 13 : HTMLElement(tagName, document) {
14 if (tagName.localName() == "data") 14 if (tagName.localName() == "data")
15 UseCounter::count(document, UseCounter::DataElement); 15 UseCounter::count(document, UseCounter::DataElement);
16 else if (tagName.localName() == "time") 16 else if (tagName.localName() == "time")
17 UseCounter::count(document, UseCounter::TimeElement); 17 UseCounter::count(document, UseCounter::TimeElement);
18 else if (tagName.localName() == "menuitem") 18 else if (tagName.localName() == "menuitem")
19 UseCounter::count(document, UseCounter::MenuItemElement); 19 UseCounter::count(document, UseCounter::MenuItemElement);
20 } 20 }
21 21
22 void HTMLUnknownElement::parseAttribute(
23 const AttributeModificationParams& params) {
24 if (params.name == HTMLNames::iconAttr && hasTagName(HTMLNames::menuitemTag))
25 UseCounter::count(document(), UseCounter::MenuItemElementIconAttribute);
26 HTMLElement::parseAttribute(params);
27 }
28
22 } // namespace blink 29 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLUnknownElement.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698