| Index: third_party/WebKit/Source/core/paint/ThemePainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/ThemePainter.cpp b/third_party/WebKit/Source/core/paint/ThemePainter.cpp
|
| index 432bb4ea33f5af0dd35e3ba9760a02e877720705..89fd9dd692f8b009c2c98835f656118fb3e612e7 100644
|
| --- a/third_party/WebKit/Source/core/paint/ThemePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/ThemePainter.cpp
|
| @@ -23,6 +23,7 @@
|
|
|
| #include "core/InputTypeNames.h"
|
| #include "core/frame/FrameView.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "core/html/HTMLDataListElement.h"
|
| #include "core/html/HTMLDataListOptionsCollection.h"
|
| #include "core/html/HTMLInputElement.h"
|
| @@ -67,6 +68,19 @@ bool ThemePainter::paint(const LayoutObject& o, const PaintInfo& paintInfo, cons
|
| if (LayoutTheme::theme().shouldUseFallbackTheme(o.styleRef()))
|
| return paintUsingFallbackTheme(o, paintInfo, r);
|
|
|
| + if (part == ButtonPart && o.node()) {
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceButtonRendered);
|
| + if (isHTMLAnchorElement(o.node())) {
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceButtonForAnchor);
|
| + } else if (isHTMLButtonElement(o.node())) {
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceButtonForButton);
|
| + } else if (isHTMLInputElement(o.node()) && toHTMLInputElement(o.node())->isTextButton()) {
|
| + // Text buttons (type=button, reset, submit) has
|
| + // -webkit-appearance:push-button by default.
|
| + UseCounter::count(o.node()->document(), UseCounter::CSSValueAppearanceButtonForOtherButtons);
|
| + }
|
| + }
|
| +
|
| if (m_platformTheme) {
|
| switch (part) {
|
| case CheckboxPart:
|
| @@ -162,6 +176,14 @@ bool ThemePainter::paintBorderOnly(const LayoutObject& o, const PaintInfo& paint
|
| // Call the appropriate paint method based off the appearance value.
|
| switch (o.styleRef().appearance()) {
|
| case TextFieldPart:
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceTextFieldRendered);
|
| + if (isHTMLInputElement(o.node())) {
|
| + HTMLInputElement* input = toHTMLInputElement(o.node());
|
| + if (input->type() == InputTypeNames::search)
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceTextFieldForSearch);
|
| + else if (input->isTextField())
|
| + UseCounter::count(o.document(), UseCounter::CSSValueAppearanceTextFieldForTextField);
|
| + }
|
| return paintTextField(o, paintInfo, r);
|
| case TextAreaPart:
|
| return paintTextArea(o, paintInfo, r);
|
|
|