本文整理汇总了C++中QualifiedName类的典型用法代码示例。如果您正苦于以下问题:C++ QualifiedName类的具体用法?C++ QualifiedName怎么用?C++ QualifiedName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QualifiedName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: synchronizeProperty
void SVGStyledElement::synchronizeProperty(const QualifiedName& attrName)
{
SVGElement::synchronizeProperty(attrName);
if (attrName == anyQName() || attrName.matches(HTMLNames::classAttr))
synchronizeClassName();
}
示例2: handleAttributeChanged
void AXObjectCache::handleAttributeChanged(const QualifiedName& attrName, Element* element)
{
if (attrName == roleAttr)
handleAriaRoleChanged(element);
else if (attrName == altAttr || attrName == titleAttr)
textChanged(element);
else if (attrName == forAttr && element->hasTagName(labelTag))
labelChanged(element);
if (!attrName.localName().string().startsWith("aria-"))
return;
if (attrName == aria_activedescendantAttr)
handleActiveDescendantChanged(element);
else if (attrName == aria_valuenowAttr || attrName == aria_valuetextAttr)
postNotification(element, AXObjectCache::AXValueChanged, true);
else if (attrName == aria_labelAttr || attrName == aria_labeledbyAttr || attrName == aria_labelledbyAttr)
textChanged(element);
else if (attrName == aria_checkedAttr)
checkedStateChanged(element);
else if (attrName == aria_selectedAttr)
selectedChildrenChanged(element);
else if (attrName == aria_expandedAttr)
handleAriaExpandedChange(element);
else if (attrName == aria_hiddenAttr)
childrenChanged(element->parentNode());
else if (attrName == aria_invalidAttr)
postNotification(element, AXObjectCache::AXInvalidStatusChanged, true);
else
postNotification(element, AXObjectCache::AXAriaAttributeChanged, true);
}
示例3: 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);
}
示例4: cssPropertyIdForFontFaceAttributeName
static CSSPropertyID cssPropertyIdForFontFaceAttributeName(const QualifiedName& attrName)
{
if (!attrName.namespaceURI().isNull())
return CSSPropertyInvalid;
static HashMap<StringImpl*, CSSPropertyID>* propertyNameToIdMap = 0;
if (!propertyNameToIdMap) {
propertyNameToIdMap = new HashMap<StringImpl*, CSSPropertyID>;
// This is a list of all @font-face CSS properties which are exposed as SVG XML attributes
// Those commented out are not yet supported by WebCore's style system
// mapAttributeToCSSProperty(propertyNameToIdMap, accent_heightAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, alphabeticAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, ascentAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, bboxAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, cap_heightAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, descentAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_familyAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_sizeAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_stretchAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_styleAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_variantAttr);
mapAttributeToCSSProperty(propertyNameToIdMap, font_weightAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, hangingAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, ideographicAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, mathematicalAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, overline_positionAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, overline_thicknessAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, panose_1Attr);
// mapAttributeToCSSProperty(propertyNameToIdMap, slopeAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, stemhAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, stemvAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_positionAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, strikethrough_thicknessAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, underline_positionAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, underline_thicknessAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, unicode_rangeAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, units_per_emAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, v_alphabeticAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, v_hangingAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, v_ideographicAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, v_mathematicalAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, widthsAttr);
// mapAttributeToCSSProperty(propertyNameToIdMap, x_heightAttr);
}
return propertyNameToIdMap->get(attrName.localName().impl());
}
示例5: new
QualifiedName * CmpSqlSession::updateVolatileQualifiedName(const NAString &inName)
{
QualifiedName *result = NULL;
if (volatileSchemaInUse_)
{
result = new (heap_)
QualifiedName(inName,
volatileSchemaName(), volatileCatalogName(), heap_);
CMPASSERT(result);
result->setIsVolatile(TRUE);
}
return result;
}
示例6: enqueueAttributeChangedCallbackIfNeeded
void CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded(Element& element, const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue)
{
ASSERT(element.isDefinedCustomElement());
ASSERT(element.document().refCount() > 0);
auto& queue = CustomElementReactionStack::ensureCurrentQueue(element);
if (queue.m_interface->observesAttribute(attributeName.localName()))
queue.m_items.append({attributeName, oldValue, newValue});
}
示例7: setTargetAttributeAnimatedValue
void SVGAnimationElement::setTargetAttributeAnimatedValue(const String& value)
{
if (!hasValidAttributeType())
return;
SVGElement* targetElement = this->targetElement();
QualifiedName attributeName = this->attributeName();
if (!targetElement || attributeName == anyQName() || value.isNull())
return;
// We don't want the instance tree to get rebuild. Instances are updated in the loop below.
if (targetElement->isStyled())
static_cast<SVGStyledElement*>(targetElement)->setInstanceUpdatesBlocked(true);
bool attributeIsCSSProperty = isTargetAttributeCSSProperty(targetElement, attributeName);
// Stop animation, if attributeType is set to CSS by the user, but the attribute itself is not a CSS property.
if (!attributeIsCSSProperty && attributeType() == AttributeTypeCSS)
return;
ExceptionCode ec;
if (attributeIsCSSProperty) {
// FIXME: This should set the override style, not the inline style.
// Sadly override styles are not yet implemented.
targetElement->style()->setProperty(attributeName.localName(), value, "", ec);
} else {
// FIXME: This should set the 'presentation' value, not the actual
// attribute value. Whatever that means in practice.
targetElement->setAttribute(attributeName, value, ec);
}
if (targetElement->isStyled())
static_cast<SVGStyledElement*>(targetElement)->setInstanceUpdatesBlocked(false);
// If the target element is used in an <use> instance tree, update that as well.
const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
if (!shadowTreeElement)
continue;
if (attributeIsCSSProperty)
shadowTreeElement->style()->setProperty(attributeName.localName(), value, "", ec);
else
shadowTreeElement->setAttribute(attributeName, value, ec);
(*it)->correspondingUseElement()->setNeedsStyleRecalc();
}
}
示例8: runAttributeChangedCallback
void ScriptCustomElementDefinition::runAttributeChangedCallback(
Element* element,
const QualifiedName& name,
const AtomicString& oldValue,
const AtomicString& newValue) {
if (!m_scriptState->contextIsValid())
return;
ScriptState::Scope scope(m_scriptState.get());
v8::Isolate* isolate = m_scriptState->isolate();
v8::Local<v8::Value> argv[] = {
v8String(isolate, name.localName()), v8StringOrNull(isolate, oldValue),
v8StringOrNull(isolate, newValue),
v8StringOrNull(isolate, name.namespaceURI()),
};
runCallback(m_attributeChangedCallback.newLocal(isolate), element,
WTF_ARRAY_LENGTH(argv), argv);
}
示例9: setBooleanAttribute
void Element::setBooleanAttribute(const QualifiedName& name, bool b)
{
if (b)
setAttribute(name, name.localName());
else {
ExceptionCode ex;
removeAttribute(name, ex);
}
}
示例10: isHBaseMeta
NABoolean isHBaseMeta(const QualifiedName& qualifiedName)
{
return
( HSGlobalsClass::isHBaseMeta(
qualifiedName.getUnqualifiedSchemaNameAsAnsiString()
) ||
isHBaseUmdHistograms(qualifiedName)
);
}
示例11: parseAttribute
bool SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name.matches(XLinkNames::hrefAttr)) {
setHrefBaseValue(value);
return true;
}
return false;
}
示例12: create
PassRefPtrWillBeRawPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document& document, const QualifiedName& tagName)
{
ASSERT(CustomElement::isValidName(tagName.localName()));
RefPtrWillBeRawPtr<Element> element;
if (HTMLNames::xhtmlNamespaceURI == tagName.namespaceURI()) {
element = HTMLElement::create(tagName, document);
} else if (SVGNames::svgNamespaceURI == tagName.namespaceURI()) {
element = SVGUnknownElement::create(tagName, document);
} else {
// XML elements are not custom elements, so return early.
return Element::create(tagName, &document);
}
element->setCustomElementState(Element::WaitingForUpgrade);
resolveOrScheduleResolution(element.get(), nullAtom);
return element.release();
}
示例13: serializeAsHTMLDocument
void MarkupAccumulator::appendAttribute(StringBuilder& result, const Element& element, const Attribute& attribute, Namespaces* namespaces)
{
bool documentIsHTML = serializeAsHTMLDocument(element);
QualifiedName prefixedName = attribute.name();
if (documentIsHTML && !attributeIsInSerializedNamespace(attribute)) {
result.append(' ');
result.append(attribute.name().localName());
} else {
if (attribute.namespaceURI() == XLinkNames::xlinkNamespaceURI) {
if (!attribute.prefix())
prefixedName.setPrefix(xlinkAtom);
} else if (attribute.namespaceURI() == XMLNames::xmlNamespaceURI) {
if (!attribute.prefix())
prefixedName.setPrefix(xmlAtom);
} else if (attribute.namespaceURI() == XMLNSNames::xmlnsNamespaceURI) {
if (!attribute.prefix() && attribute.localName() != xmlnsAtom)
prefixedName.setPrefix(xmlnsAtom);
if (namespaces) { // Account for the namespace attribute we're about to append.
const AtomicString& lookupKey = (!attribute.prefix()) ? emptyAtom : attribute.localName();
namespaces->set(lookupKey, attribute.value());
}
} else if (namespaces && shouldAddNamespaceAttribute(attribute, element)) {
if (!attribute.prefix()) {
// This behavior is in process of being standardized. See crbug.com/248044 and https://www.w3.org/Bugs/Public/show_bug.cgi?id=24208
String prefixPrefix("ns", 2);
for (unsigned i = attribute.namespaceURI().impl()->existingHash(); ; ++i) {
AtomicString newPrefix(String(prefixPrefix + String::number(i)));
AtomicString foundURI = namespaces->get(newPrefix);
if (foundURI == attribute.namespaceURI() || foundURI == nullAtom) {
// We already generated a prefix for this namespace.
prefixedName.setPrefix(newPrefix);
break;
}
}
}
ASSERT(prefixedName.prefix());
appendNamespace(result, prefixedName.prefix(), attribute.namespaceURI(), *namespaces);
}
result.append(' ');
result.append(prefixedName.toString());
}
result.append('=');
if (element.isURLAttribute(attribute)) {
appendQuotedURLAttributeValue(result, element, attribute);
} else {
result.append('"');
appendAttributeValue(result, attribute.value(), documentIsHTML);
result.append('"');
}
}
示例14: findAttributeWithName
static bool findAttributeWithName(const HTMLToken& token, const QualifiedName& name, size_t& indexOfMatchingAttribute)
{
for (size_t i = 0; i < token.attributes().size(); ++i) {
if (equalIgnoringNullity(token.attributes().at(i).m_name, name.localName())) {
indexOfMatchingAttribute = i;
return true;
}
}
return false;
}
示例15: create
PassRefPtr<SVGElement> SVGElementFactory::createElement(const QualifiedName& name, Document& document, bool createdByParser)
{
static NeverDestroyed<HashMap<AtomicStringImpl*, SVGConstructorFunction>> functions;
if (functions.get().isEmpty())
populateSVGFactoryMap(functions);
if (SVGConstructorFunction function = functions.get().get(name.localName().impl())) {
if (RefPtr<SVGElement> element = function(name, document, createdByParser))
return element.release();
}
return SVGUnknownElement::create(name, document);
}