Пример #1
0
void MutableStylePropertySet::setPrefixingVariantProperty(const CSSProperty& property)
{
    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
    CSSProperty* toReplace = findCSSPropertyWithID(prefixingVariant);
    if (toReplace && prefixingVariant != property.id())
        *toReplace = CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit);
}
Пример #2
0
void StylePropertySet::appendPrefixingVariantProperty(const CSSProperty& property)
{
    mutablePropertyVector().append(property);
    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
    if (prefixingVariant == property.id())
        return;
    mutablePropertyVector().append(CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.shorthandID(), property.metadata().m_implicit));
}
Пример #3
0
void StylePropertySet::addParsedProperty(const CSSProperty& property)
{
    // Only add properties that have no !important counterpart present
    if (!propertyIsImportant(property.id()) || property.isImportant()) {
        removeProperty(property.id());
        m_properties.append(property);
    }
}
Пример #4
0
void MutableStylePropertySet::appendPrefixingVariantProperty(const CSSProperty& property)
{
    m_propertyVector.append(property);
    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
    if (prefixingVariant == property.id())
        return;

    m_propertyVector.append(CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.isSetFromShorthand(), getIndexInShorthandVectorForPrefixingVariant(property, prefixingVariant), property.metadata().m_implicit));
}
Пример #5
0
void CSSMutableStyleDeclaration::addParsedProperty(const CSSProperty& property)
{
    ASSERT(!m_iteratorCount);

    // Only add properties that have no !important counterpart present
    if (!getPropertyPriority(property.id()) || property.isImportant()) {
        removeProperty(property.id(), false);
        m_properties.append(property);
    }
}
Пример #6
0
void StylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slot)
{
    if (!removeShorthandProperty(property.id())) {
        CSSProperty* toReplace = slot ? slot : findPropertyWithId(property.id());
        if (toReplace) {
            *toReplace = property;
            return;
        }
    }
    m_properties.append(property);
}
Пример #7
0
void StylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slot)
{
    ASSERT(isMutable());
    if (!removeShorthandProperty(property.id())) {
        CSSProperty* toReplace = slot ? slot : findMutableCSSPropertyWithID(property.id());
        if (toReplace) {
            *toReplace = property;
            return;
        }
    }
    mutablePropertyVector().append(property);
}
Пример #8
0
void MutableStylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slot)
{
    if (!removeShorthandProperty(property.id())) {
        CSSProperty* toReplace = slot ? slot : findCSSPropertyWithID(property.id());
        if (toReplace) {
            *toReplace = property;
            setPrefixingVariantProperty(property);
            return;
        }
    }
    appendPrefixingVariantProperty(property);
}
Пример #9
0
void CSSMutableStyleDeclaration::setPropertyInternal(const CSSProperty& property, CSSProperty* slot)
{
    ASSERT(!m_iteratorCount);

    if (!removeShorthandProperty(property.id(), false)) {
        CSSProperty* toReplace = slot ? slot : findPropertyWithId(property.id());
        if (toReplace) {
            *toReplace = property;
            return;
        }
    }
    m_properties.append(property);
}
Пример #10
0
void StylePropertySet::addParsedProperty(const CSSProperty& property)
{
    ASSERT(isMutable());
    // Only add properties that have no !important counterpart present
    if (!propertyIsImportant(property.id()) || property.isImportant())
        setProperty(property);
}
bool MutableStylePropertySet::addRespectingCascade(const CSSProperty& property)
{
    // Only add properties that have no !important counterpart present
    if (!propertyIsImportant(property.id()) || property.isImportant())
        return setProperty(property);
    return false;
}
bool MutableStylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slot)
{
    if (!removeShorthandProperty(property.id())) {
        const AtomicString& name = (property.id() == CSSPropertyVariable) ?
            toCSSCustomPropertyDeclaration(property.value())->name() : nullAtom;
        CSSProperty* toReplace = slot ? slot : findCSSPropertyWithID(property.id(), name);
        if (toReplace && *toReplace == property)
            return false;
        if (toReplace) {
            *toReplace = property;
            return true;
        }
    }
    m_propertyVector.append(property);
    return true;
}
Пример #13
0
void StylePropertySet::setPrefixingVariantProperty(const CSSProperty& property)
{
    CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
    CSSProperty* toReplace = findMutableCSSPropertyWithID(prefixingVariant);
    if (toReplace)
        *toReplace = CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.shorthandID(), property.metadata().m_implicit);
}
void CSSMutableStyleDeclaration::addParsedProperty(const CSSProperty& property)
{
    removeProperty(property.id(), false);
    m_values.append(property);
}