예제 #1
0
void UseCounter::count(const Document& document, Feature feature)
{
    FrameHost* host = document.frameHost();
    if (!host)
        return;

    ASSERT(host->useCounter().deprecationMessage(feature).isEmpty());
    host->useCounter().recordMeasurement(feature);
}
예제 #2
0
void UseCounter::count(const Frame* frame, Feature feature)
{
    if (!frame)
        return;
    FrameHost* host = frame->host();
    if (!host)
        return;

    ASSERT(host->useCounter().deprecationMessage(feature).isEmpty());
    host->useCounter().recordMeasurement(feature);
}
예제 #3
0
void UseCounter::countDeprecation(const Document& document, Feature feature)
{
    FrameHost* host = document.frameHost();
    if (!host)
        return;

    if (host->useCounter().recordMeasurement(feature)) {
        ASSERT(!host->useCounter().deprecationMessage(feature).isEmpty());
        host->console().addMessage(DeprecationMessageSource, WarningMessageLevel, host->useCounter().deprecationMessage(feature));
    }
}
예제 #4
0
void UseCounter::countDeprecation(const LocalFrame* frame, Feature feature)
{
    if (!frame)
        return;
    FrameHost* host = frame->host();
    if (!host)
        return;

    if (host->useCounter().recordMeasurement(feature)) {
        ASSERT(!host->useCounter().deprecationMessage(feature).isEmpty());
        frame->console().addMessage(ConsoleMessage::create(DeprecationMessageSource, WarningMessageLevel, host->useCounter().deprecationMessage(feature)));
    }
}
예제 #5
0
bool UseCounter::isCounted(Document& document, Feature feature)
{
    Frame* frame = document.frame();
    if (!frame)
        return false;
    FrameHost* host = frame->host();
    if (!host)
        return false;
    return host->useCounter().hasRecordedMeasurement(feature);
}
예제 #6
0
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)
        return false;
    return host->useCounter().isCounted(propertyID);
}