Пример #1
0
WTF::String DisplayItem::typeAsDebugString(Type type)
{
    if (isDrawingType(type))
        return drawingTypeAsDebugString(type);
    if (isCachedDrawingType(type))
        return "Cached" + drawingTypeAsDebugString(cachedDrawingTypeToDrawingType(type));
    if (isClipType(type))
        return clipTypeAsDebugString(type);
    if (isEndClipType(type))
        return "End" + clipTypeAsDebugString(endClipTypeToClipType(type));

    if (type == UninitializedType)
        return "UninitializedType";

    PAINT_PHASE_BASED_DEBUG_STRINGS(FloatClip);
    if (isEndFloatClipType(type))
        return "End" + typeAsDebugString(endFloatClipTypeToFloatClipType(type));

    PAINT_PHASE_BASED_DEBUG_STRINGS(Scroll);
    if (isEndScrollType(type))
        return "End" + typeAsDebugString(endScrollTypeToScrollType(type));

    if (isTransform3DType(type))
        return transform3DTypeAsDebugString(type);
    if (isEndTransform3DType(type))
        return "End" + transform3DTypeAsDebugString(endTransform3DTypeToTransform3DType(type));

    if (isSubsequenceType(type))
        return subsequenceTypeAsDebugString(type);
    if (isEndSubsequenceType(type))
        return "End" + subsequenceTypeAsDebugString(endSubsequenceTypeToSubsequenceType(type));
    if (isCachedSubsequenceType(type))
        return "Cached" + subsequenceTypeAsDebugString(cachedSubsequenceTypeToSubsequenceType(type));

    switch (type) {
        DEBUG_STRING_CASE(BeginFilter);
        DEBUG_STRING_CASE(EndFilter);
        DEBUG_STRING_CASE(BeginCompositing);
        DEBUG_STRING_CASE(EndCompositing);
        DEBUG_STRING_CASE(BeginTransform);
        DEBUG_STRING_CASE(EndTransform);
        DEBUG_STRING_CASE(BeginClipPath);
        DEBUG_STRING_CASE(EndClipPath);
        DEBUG_STRING_CASE(BeginFixedPosition);
        DEBUG_STRING_CASE(EndFixedPosition);
        DEBUG_STRING_CASE(BeginFixedPositionContainer);
        DEBUG_STRING_CASE(EndFixedPositionContainer);
        DEBUG_STRING_CASE(UninitializedType);
        DEFAULT_CASE;
    }
}
Пример #2
0
void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
{
    stringBuilder.append(String::format("client: \"%p", client()));
    if (!clientDebugString().isEmpty()) {
        stringBuilder.append(' ');
        stringBuilder.append(clientDebugString());
    }
    stringBuilder.append("\", type: \"");
    stringBuilder.append(typeAsDebugString(type()));
    stringBuilder.append('"');
    if (m_skippedCache)
        stringBuilder.append(", skippedCache: true");
    if (m_scopeContainer)
        stringBuilder.append(String::format(", scope: \"%p,%d\"", m_scopeContainer, m_scopeId));
}
Пример #3
0
void DisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
{
    if (!hasValidClient()) {
        stringBuilder.append("validClient: false, originalDebugString: ");
        // This is the original debug string which is in json format.
        stringBuilder.append(clientDebugString());
        return;
    }

    stringBuilder.append(String::format("client: \"%p", &client()));
    if (!clientDebugString().isEmpty()) {
        stringBuilder.append(' ');
        stringBuilder.append(clientDebugString());
    }
    stringBuilder.append("\", type: \"");
    stringBuilder.append(typeAsDebugString(type()));
    stringBuilder.append('"');
    if (m_skippedCache)
        stringBuilder.append(", skippedCache: true");
    if (m_scope)
        stringBuilder.append(String::format(", scope: %d", m_scope));
}