当前位置: 首页>>代码示例>>C++>>正文


C++ StyleBase::isMutableStyleDeclaration方法代码示例

本文整理汇总了C++中StyleBase::isMutableStyleDeclaration方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleBase::isMutableStyleDeclaration方法的具体用法?C++ StyleBase::isMutableStyleDeclaration怎么用?C++ StyleBase::isMutableStyleDeclaration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StyleBase的用法示例。


在下文中一共展示了StyleBase::isMutableStyleDeclaration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: calculateGroupId

static GroupId calculateGroupId(StyleBase* styleBase)
{
    ASSERT(styleBase);
    StyleBase* current = styleBase;
    StyleSheet* styleSheet = 0;
    while (true) {
        // Special case: CSSStyleDeclarations might be either inline and in this case
        // we need to group them with their node or regular ones.
        if (current->isMutableStyleDeclaration()) {
            CSSMutableStyleDeclaration* cssMutableStyleDeclaration = static_cast<CSSMutableStyleDeclaration*>(current);
            if (cssMutableStyleDeclaration->isInlineStyleDeclaration()) {
                ASSERT(cssMutableStyleDeclaration->parent()->isStyleSheet());
                return calculateGroupId(cssMutableStyleDeclaration->node());
            }
            // Either we have no parent, or this parent is a CSSRule.
            ASSERT(cssMutableStyleDeclaration->parent() == cssMutableStyleDeclaration->parentRule());
        }

        if (current->isStyleSheet())
            styleSheet = static_cast<StyleSheet*>(current);

        StyleBase* parent = current->parent();
        if (!parent)
            break;
        current = parent;
    }

    if (styleSheet) {
        if (Node* ownerNode = styleSheet->ownerNode())
            return calculateGroupId(ownerNode);
        return GroupId(styleSheet);
    }

    return GroupId(current);
}
开发者ID:ohyeah521,项目名称:GT-I9300_Platform,代码行数:35,代码来源:V8GCController.cpp

示例2: getParsedVariableDeclarationBlock

CSSMutableStyleDeclaration* CSSVariablesDeclaration::getParsedVariableDeclarationBlock(const String& variableName)
{
    StyleBase* result = m_variablesMap.get(variableName).get();
    if (result->isMutableStyleDeclaration())
        return static_cast<CSSMutableStyleDeclaration*>(result);
    return 0;
}
开发者ID:Czerrr,项目名称:ISeeBrowser,代码行数:7,代码来源:CSSVariablesDeclaration.cpp

示例3: getParsedVariableDeclarationBlock

CSSMutableStyleDeclaration* CSSVariablesDeclaration::getParsedVariableDeclarationBlock(const String&)
{
// FIXME: Disabling declarations as variable values for now since they no longer have a common base class with CSSValues.
#if 0
    StyleBase* result = m_variablesMap.get(variableName).get();

    if (result->isMutableStyleDeclaration())
        return static_cast<CSSMutableStyleDeclaration*>(result);
#endif
    return 0;
}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:11,代码来源:CSSVariablesDeclaration.cpp


注:本文中的StyleBase::isMutableStyleDeclaration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。