Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/UseCounter.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| index 15eb00c980c79d02610521b0b8ec5bf8a2a85790..3d0b2cdb028151a54ca3b41af851a8ea5a6b89f1 100644 |
| --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| @@ -680,6 +680,23 @@ bool UseCounter::isCounted(Document& document, Feature feature) |
| return host->useCounter().hasRecordedMeasurement(feature); |
| } |
| +bool UseCounter::isCounted(CSSPropertyID unresolvedProperty) |
| +{ |
| + return m_CSSFeatureBits.quickGet(unresolvedProperty); |
| +} |
| + |
| + |
| +bool UseCounter::isCounted(Document& document, const String& string) |
| +{ |
| + Frame* frame = document.frame(); |
| + if (!frame) |
| + return false; |
| + FrameHost* host = frame->host(); |
| + if (!host) |
| + return false; |
| + return host->useCounter().isCounted(cssPropertyID(string)); |
|
alancutter (OOO until 2018)
2016/02/24 02:45:52
ASSERT not CSSPropertyInvalid.
nainar
2016/02/24 03:34:25
Done.
|
| +} |
| + |
| void UseCounter::count(const ExecutionContext* context, Feature feature) |
| { |
| if (!context) |