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..538b5fcaf1981f9f94c50a8f5f7ad2acc24133bd 100644 |
| --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| @@ -680,6 +680,27 @@ 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; |
| + CSSPropertyID propertyID = cssPropertyID(string); |
| + |
| + if (propertyID != CSSPropertyInvalid) |
|
Timothy Loh
2016/02/26 06:37:45
better to rearrange this so the success case is at
nainar
2016/02/26 06:59:55
Done.
|
| + return host->useCounter().isCounted(propertyID); |
| + return false; |
| +} |
| + |
| void UseCounter::count(const ExecutionContext* context, Feature feature) |
| { |
| if (!context) |