本文整理汇总了C++中QualifiedName::matches方法的典型用法代码示例。如果您正苦于以下问题:C++ QualifiedName::matches方法的具体用法?C++ QualifiedName::matches怎么用?C++ QualifiedName::matches使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QualifiedName
的用法示例。
在下文中一共展示了QualifiedName::matches方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: svgAttributeChanged
void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName)
{
if (attrName == SVGNames::durAttr) {
m_cachedDur = invalidCachedTime;
} else if (attrName == SVGNames::repeatDurAttr) {
m_cachedRepeatDur = invalidCachedTime;
} else if (attrName == SVGNames::repeatCountAttr) {
m_cachedRepeatCount = invalidCachedTime;
} else if (attrName == SVGNames::minAttr) {
m_cachedMin = invalidCachedTime;
} else if (attrName == SVGNames::maxAttr) {
m_cachedMax = invalidCachedTime;
} else if (attrName == SVGNames::attributeNameAttr) {
setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr)));
} else if (attrName.matches(SVGNames::hrefAttr) || attrName.matches(XLinkNames::hrefAttr)) {
// TODO(fs): Could be smarter here when 'href' is specified and 'xlink:href' is changed.
SVGElement::InvalidationGuard invalidationGuard(this);
buildPendingResource();
if (m_targetElement)
clearAnimatedType();
} else if (attrName == SVGNames::beginAttr || attrName == SVGNames::endAttr) {
if (inDocument()) {
connectEventBaseConditions();
if (attrName == SVGNames::beginAttr)
beginListChanged(elapsed());
else if (attrName == SVGNames::endAttr)
endListChanged(elapsed());
}
} else {
SVGElement::svgAttributeChanged(attrName);
return;
}
animationAttributeChanged();
}
示例2: parseAttribute
void SVGLangSpace::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name.matches(XMLNames::langAttr))
setXmllang(value);
if (name.matches(XMLNames::spaceAttr))
setXmlspace(value);
}
示例3: isKnownAttribute
bool SVGTextPositioningElement::isKnownAttribute(const QualifiedName& attrName)
{
return (attrName.matches(SVGNames::xAttr) ||
attrName.matches(SVGNames::yAttr) ||
attrName.matches(SVGNames::dxAttr) ||
attrName.matches(SVGNames::dyAttr) ||
attrName.matches(SVGNames::rotateAttr) ||
SVGTextContentElement::isKnownAttribute(attrName));
}
示例4: isKnownAttribute
bool SVGTextContentElement::isKnownAttribute(const QualifiedName& attrName)
{
return (attrName.matches(SVGNames::lengthAdjustAttr) ||
attrName.matches(SVGNames::textLengthAttr) ||
SVGTests::isKnownAttribute(attrName) ||
SVGLangSpace::isKnownAttribute(attrName) ||
SVGExternalResourcesRequired::isKnownAttribute(attrName) ||
SVGStyledElement::isKnownAttribute(attrName));
}
示例5: parseAttribute
bool SVGLangSpace::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name.matches(XMLNames::langAttr)) {
setXmllang(value);
return true;
}
if (name.matches(XMLNames::spaceAttr)) {
setXmlspace(value);
return true;
}
return false;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:13,代码来源:SVGLangSpace.cpp
示例6: svgAttributeChanged
void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGElement::svgAttributeChanged(attrName);
if (attrName.matches(HTMLNames::classAttr))
classAttributeChanged(className());
RenderObject* object = renderer();
if (attrName == idAttributeName()) {
// Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
if (object && object->isSVGResourceContainer())
object->toRenderSVGResourceContainer()->idChanged();
}
if (!document()->parsing() && object) {
// If we're the child of a resource element, tell the resource (and eventually its resources) that we've changed.
invalidateResourcesInAncestorChain();
// If we're referencing resources, tell them we've changed.
deregisterFromResources(object);
}
// Invalidate all SVGElementInstances associated with us
SVGElementInstance::invalidateAllInstancesOfElement(this);
}
示例7: synchronizeProperty
void SVGStyledElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGElement::synchronizeProperty(attrName);
if (attrName == anyQName() || attrName.matches(HTMLNames::classAttr))
synchronizeClassName();
}
示例8: parseAttribute
bool SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name.matches(XLinkNames::hrefAttr)) {
setHrefBaseValue(value);
return true;
}
return false;
}
示例9: collectStyleForPresentationAttribute
void SVGTextContentElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style)
{
if (!isSupportedAttribute(name))
SVGGraphicsElement::collectStyleForPresentationAttribute(name, value, style);
else if (name.matches(XMLNames::spaceAttr)) {
DEPRECATED_DEFINE_STATIC_LOCAL(const AtomicString, preserveString, ("preserve", AtomicString::ConstructFromLiteral));
if (value == preserveString)
addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValuePre);
else
addPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace, CSSValueNowrap);
}
示例10: collectStyleForPresentationAttribute
void HTMLElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
{
if (name == alignAttr) {
if (equalIgnoringCase(value, "middle"))
addPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign, CSSValueCenter);
else
addPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign, value);
} else if (name == contenteditableAttr) {
if (value.isEmpty() || equalIgnoringCase(value, "true")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserModify, CSSValueReadWrite);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWordWrap, CSSValueBreakWord);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitLineBreak, CSSValueAfterWhiteSpace);
UseCounter::count(document(), UseCounter::ContentEditableTrue);
if (hasTagName(htmlTag))
UseCounter::count(document(), UseCounter::ContentEditableTrueOnHTML);
} else if (equalIgnoringCase(value, "plaintext-only")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserModify, CSSValueReadWritePlaintextOnly);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWordWrap, CSSValueBreakWord);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitLineBreak, CSSValueAfterWhiteSpace);
UseCounter::count(document(), UseCounter::ContentEditablePlainTextOnly);
} else if (equalIgnoringCase(value, "false")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserModify, CSSValueReadOnly);
}
} else if (name == hiddenAttr) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyDisplay, CSSValueNone);
} else if (name == draggableAttr) {
if (equalIgnoringCase(value, "true")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserDrag, CSSValueElement);
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserSelect, CSSValueNone);
} else if (equalIgnoringCase(value, "false")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserDrag, CSSValueNone);
}
} else if (name == dirAttr) {
if (equalIgnoringCase(value, "auto")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, unicodeBidiAttributeForDirAuto(this));
} else {
if (isValidDirAttribute(value))
addPropertyToPresentationAttributeStyle(style, CSSPropertyDirection, value);
else
addPropertyToPresentationAttributeStyle(style, CSSPropertyDirection, "ltr");
if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(outputTag))
addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi, CSSValueIsolate);
}
} else if (name.matches(XMLNames::langAttr)) {
mapLanguageAttributeToLocale(value, style);
} else if (name == langAttr) {
// xml:lang has a higher priority than lang.
if (!fastHasAttribute(XMLNames::langAttr))
mapLanguageAttributeToLocale(value, style);
} else {
Element::collectStyleForPresentationAttribute(name, value, style);
}
}
示例11: parseAttribute
void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == HTMLNames::classAttr) {
// SVG animation has currently requires special storage of values so we set
// the className here. svgAttributeChanged actually causes the resulting
// style updates (instead of Element::parseAttribute). We don't
// tell Element about the change to avoid parsing the class list twice
SVGParsingError parseError = NoError;
m_className->setBaseValueAsString(value, parseError);
reportAttributeParsingError(parseError, name, value);
} else if (name.matches(XMLNames::langAttr) || name.matches(XMLNames::spaceAttr)) {
} else if (name == tabindexAttr) {
Element::parseAttribute(name, value);
} else {
// standard events
const AtomicString& eventName = HTMLElement::eventNameForAttributeName(name);
if (!eventName.isNull())
setAttributeEventListener(eventName, createAttributeEventListener(this, name, value, eventParameterName()));
else
Element::parseAttribute(name, value);
}
}
示例12: svgAttributeChanged
void SVGStyledElement::svgAttributeChanged(const QualifiedName& attrName)
{
SVGElement::svgAttributeChanged(attrName);
if (attrName.matches(HTMLNames::classAttr))
classAttributeChanged(className());
RenderObject* object = renderer();
if (isIdAttributeName(attrName)) {
// Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
if (object && object->isSVGResourceContainer())
object->toRenderSVGResourceContainer()->idChanged();
}
// Invalidate all SVGElementInstances associated with us
SVGElementInstance::invalidateAllInstancesOfElement(this);
}
示例13: isKnownAttribute
bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
{
return attrName.matches(XLinkNames::hrefAttr);
}
示例14: isKnownAttribute
bool SVGAnimatedHref::isKnownAttribute(const QualifiedName& attrName) {
return attrName.matches(SVGNames::hrefAttr) ||
attrName.matches(XLinkNames::hrefAttr);
}
示例15: isPresentationAttribute
bool SVGTextContentElement::isPresentationAttribute(const QualifiedName& name) const
{
if (name.matches(XMLNames::spaceAttr))
return true;
return SVGGraphicsElement::isPresentationAttribute(name);
}