コード例 #1
0
bool StylePropertySet::removeShorthandProperty(int propertyID)
{
    CSSPropertyLonghand longhand = longhandForProperty(propertyID);
    if (!longhand.length())
        return false;
    return removePropertiesInSet(longhand.properties(), longhand.length());
}
コード例 #2
0
bool CSSMutableStyleDeclaration::removeShorthandProperty(int propertyID, bool notifyChanged) 
{
    CSSPropertyLonghand longhand = longhandForProperty(propertyID);
    if (longhand.length()) {
        removePropertiesInSet(longhand.properties(), longhand.length(), notifyChanged);
        return true;
    }
    return false;
}
コード例 #3
0
bool StylePropertySet::propertyIsImportant(int propertyID) const
{
    const CSSProperty* property = findPropertyWithId(propertyID);
    if (property)
        return property->isImportant();

    CSSPropertyLonghand longhands = longhandForProperty(propertyID);
    if (!longhands.length())
        return false;

    for (unsigned i = 0; i < longhands.length(); ++i) {
        if (!propertyIsImportant(longhands.properties()[i]))
            return false;
    }
    return true;
}
コード例 #4
0
void StylePropertySet::setProperty(int propertyID, PassRefPtr<CSSValue> prpValue, bool important)
{
    CSSPropertyLonghand longhand = longhandForProperty(propertyID);
    if (!longhand.length()) {
        setProperty(CSSProperty(propertyID, prpValue, important));
        return;
    }

    removePropertiesInSet(longhand.properties(), longhand.length());

    RefPtr<CSSValue> value = prpValue;
    for (unsigned i = 0; i < longhand.length(); ++i)
        m_properties.append(CSSProperty(longhand.properties()[i], value, important));
}