本文整理汇总了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);
}
示例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);
}
示例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());
}
}
示例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);
}
示例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]);
}
示例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());
}
示例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);
}
示例8: setPropertyFromStyle
bool FontFace::setPropertyFromStyle(const StylePropertySet& properties, CSSPropertyID propertyID)
{
return setPropertyValue(properties.getPropertyCSSValue(propertyID), propertyID);
}
示例9: property
CSSPropertyValue::CSSPropertyValue(CSSPropertyID id, const StylePropertySet& propertySet)
: property(id), value(propertySet.getPropertyCSSValue(id).get())
{ }