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


C++ StylePropertySet类代码示例

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


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

示例1: applyCSSPropertyToTarget

static inline void applyCSSPropertyToTarget(SVGElement* targetElement, CSSPropertyID id, const String& value)
{
    ASSERT(!targetElement->m_deletionHasBegun);

    StylePropertySet* propertySet = targetElement->ensureAnimatedSMILStyleProperties();
    if (!propertySet->setProperty(id, value, false, 0))
        return;

    targetElement->setNeedsStyleRecalc(SyntheticStyleChange);
}
开发者ID:dzhshf,项目名称:WebKit,代码行数:10,代码来源:SVGAnimateElement.cpp

示例2: attributeStyle

void StyledElement::removeCSSProperties(int id1, int id2, int id3, int id4, int id5, int id6, int id7, int id8)
{
    StylePropertySet* style = attributeStyle();
    if (!style)
        return;

    ASSERT(id1 != CSSPropertyInvalid);
    style->removeProperty(id1);

    if (id2 == CSSPropertyInvalid)
        return;
    style->removeProperty(id2);
    if (id3 == CSSPropertyInvalid)
        return;
    style->removeProperty(id3);
    if (id4 == CSSPropertyInvalid)
        return;
    style->removeProperty(id4);
    if (id5 == CSSPropertyInvalid)
        return;
    style->removeProperty(id5);
    if (id6 == CSSPropertyInvalid)
        return;
    style->removeProperty(id6);
    if (id7 == CSSPropertyInvalid)
        return;
    style->removeProperty(id7);
    if (id8 == CSSPropertyInvalid)
        return;
    style->removeProperty(id8);
}
开发者ID:sohocoke,项目名称:webkit,代码行数:31,代码来源:StyledElement.cpp

示例3: StylePropertySet

MutableStylePropertySet::MutableStylePropertySet(const StylePropertySet& other)
    : StylePropertySet(other.cssParserMode())
{
    if (other.isMutable())
        m_propertyVector = static_cast<const MutableStylePropertySet&>(other).mutablePropertyVector();
    else {
        m_propertyVector.reserveInitialCapacity(other.propertyCount());
        for (unsigned i = 0; i < other.propertyCount(); ++i)
            m_propertyVector.uncheckedAppend(other.propertyAt(i).toCSSProperty());
    }
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例4: doApply

void RemoveCSSPropertyCommand::doApply()
{
    StylePropertySet* style = m_element->inlineStyleDecl();
    m_oldValue = style->getPropertyValue(m_property);
    m_important = style->propertyIsImportant(m_property);

    // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
    ExceptionCode ec;
    // Setting to null string removes the property. We don't have internal version of removeProperty.
    m_element->style()->setPropertyInternal(m_property, String(), false, ec);
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:11,代码来源:RemoveCSSPropertyCommand.cpp

示例5: copyPropertiesFrom

void StylePropertySet::copyPropertiesFrom(const StylePropertySet& other)
{
    ASSERT(isMutable());

    if (other.isMutable()) {
        *m_mutablePropertyVector = *other.m_mutablePropertyVector;
        return;
    }

    ASSERT(m_mutablePropertyVector->isEmpty());
    m_mutablePropertyVector->reserveInitialCapacity(other.m_arraySize);
    for (unsigned i = 0; i < other.m_arraySize; ++i)
        m_mutablePropertyVector->uncheckedAppend(other.array()[i]);
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例6: addViewportRule

void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule)
{
    StylePropertySet* propertySet = viewportRule->mutableProperties();

    unsigned propertyCount = propertySet->propertyCount();
    if (!propertyCount)
        return;

    if (!m_propertySet) {
        m_propertySet = propertySet->mutableCopy();
        return;
    }

    // We cannot use mergeAndOverrideOnConflict() here because it doesn't
    // respect the !important declaration (but addParsedProperty() does).
    for (unsigned i = 0; i < propertyCount; ++i)
        m_propertySet->addParsedProperty(propertySet->propertyAt(i).toCSSProperty());
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例7: ASSERT

void StyledElement::copyNonAttributeProperties(const Element* sourceElement)
{
    ASSERT(sourceElement);
    ASSERT(sourceElement->isStyledElement());

    const StyledElement* source = static_cast<const StyledElement*>(sourceElement);
    if (!source->inlineStyleDecl())
        return;

    StylePropertySet* inlineStyle = ensureInlineStyleDecl();
    inlineStyle->copyPropertiesFrom(*source->inlineStyleDecl());
    inlineStyle->setStrictParsing(source->inlineStyleDecl()->useStrictParsing());

    setIsStyleAttributeValid(source->isStyleAttributeValid());
    setIsSynchronizingStyleAttribute(source->isSynchronizingStyleAttribute());
    
    Element::copyNonAttributeProperties(sourceElement);
}
开发者ID:sohocoke,项目名称:webkit,代码行数:18,代码来源:StyledElement.cpp

示例8: setPropertyFromStyle

bool FontFace::setPropertyFromStyle(const StylePropertySet& properties, CSSPropertyID propertyID)
{
    return setPropertyValue(properties.getPropertyCSSValue(propertyID), propertyID);
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:4,代码来源:FontFace.cpp

示例9: property

CSSPropertyValue::CSSPropertyValue(CSSPropertyID id, const StylePropertySet& propertySet)
    : property(id), value(propertySet.getPropertyCSSValue(id).get())
{ }
开发者ID:ksimbili,项目名称:sky_engine,代码行数:3,代码来源:StyleResolver.cpp


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