本文整理汇总了C++中reportAttributeParsingError函数的典型用法代码示例。如果您正苦于以下问题:C++ reportAttributeParsingError函数的具体用法?C++ reportAttributeParsingError怎么用?C++ reportAttributeParsingError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reportAttributeParsingError函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reportAttributeParsingError
void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{
if (SVGAnimatedPropertyBase* property = propertyFromAttribute(name)) {
SVGParsingError parseError = property->setBaseValueAsString(value);
reportAttributeParsingError(parseError, name, value);
return;
}
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 = m_className->setBaseValueAsString(value);
reportAttributeParsingError(parseError, name, value);
} else if (name == tabindexAttr) {
Element::parseAttribute(name, oldValue, value);
} else {
// standard events
const AtomicString& eventName = HTMLElement::eventNameForAttributeName(name);
if (!eventName.isNull())
setAttributeEventListener(eventName, createAttributeEventListener(this, name, value, eventParameterName()));
else
Element::parseAttribute(name, oldValue, value);
}
}
示例2: reportAttributeParsingError
void SVGAnimationElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
{
if (name == SVGNames::valuesAttr) {
if (!parseValues(value, m_values)) {
reportAttributeParsingError(ParsingAttributeFailedError, name, value);
return;
}
updateAnimationMode();
return;
}
if (name == SVGNames::keyTimesAttr) {
if (!parseKeyTimes(value, m_keyTimes, true))
reportAttributeParsingError(ParsingAttributeFailedError, name, value);
return;
}
if (name == SVGNames::keyPointsAttr) {
if (isSVGAnimateMotionElement(*this)) {
// This is specified to be an animateMotion attribute only but it is simpler to put it here
// where the other timing calculatations are.
if (!parseKeyTimes(value, m_keyPoints, false))
reportAttributeParsingError(ParsingAttributeFailedError, name, value);
}
return;
}
if (name == SVGNames::keySplinesAttr) {
if (!parseKeySplines(value, m_keySplines))
reportAttributeParsingError(ParsingAttributeFailedError, name, value);
return;
}
if (name == SVGNames::attributeTypeAttr) {
setAttributeType(value);
return;
}
if (name == SVGNames::calcModeAttr) {
setCalcMode(value);
return;
}
if (name == SVGNames::fromAttr || name == SVGNames::toAttr || name == SVGNames::byAttr) {
updateAnimationMode();
return;
}
SVGSMILElement::parseAttribute(name, oldValue, value);
}
示例3: setMaskUnitsBaseValue
void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == SVGNames::maskUnitsAttr) {
auto propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setMaskUnitsBaseValue(propertyValue);
return;
}
if (name == SVGNames::maskContentUnitsAttr) {
auto propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setMaskContentUnitsBaseValue(propertyValue);
return;
}
SVGParsingError parseError = NoError;
if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::widthAttr)
setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::heightAttr)
setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
reportAttributeParsingError(parseError, name, value);
SVGElement::parseAttribute(name, value);
SVGTests::parseAttribute(name, value);
SVGExternalResourcesRequired::parseAttribute(name, value);
}
示例4: if
void SVGMarkerElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
if (!isSupportedAttribute(name))
SVGElement::parseAttribute(name, value);
else if (name == SVGNames::markerUnitsAttr) {
SVGMarkerUnitsType propertyValue = SVGPropertyTraits<SVGMarkerUnitsType>::fromString(value);
if (propertyValue > 0)
setMarkerUnitsBaseValue(propertyValue);
} else if (name == SVGNames::refXAttr)
setRefXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::refYAttr)
setRefYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::markerWidthAttr)
setMarkerWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::markerHeightAttr)
setMarkerHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::orientAttr) {
SVGAngle angle;
SVGMarkerOrientType orientType = SVGPropertyTraits<SVGMarkerOrientType>::fromString(value, angle);
if (orientType > 0)
setOrientTypeBaseValue(orientType);
if (orientType == SVGMarkerOrientAngle)
setOrientAngleBaseValue(angle);
} else if (SVGLangSpace::parseAttribute(name, value)
|| SVGExternalResourcesRequired::parseAttribute(name, value)
|| SVGFitToViewBox::parseAttribute(this, name, value)) {
} else
ASSERT_NOT_REACHED();
reportAttributeParsingError(parseError, name, value);
}
示例5: setFilterUnitsBaseValue
void SVGFilterElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
if (name == SVGNames::filterUnitsAttr) {
SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setFilterUnitsBaseValue(propertyValue);
} else if (name == SVGNames::primitiveUnitsAttr) {
SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setPrimitiveUnitsBaseValue(propertyValue);
} else if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::widthAttr)
setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::heightAttr)
setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::filterResAttr) {
float x, y;
if (parseNumberOptionalNumber(value, x, y)) {
setFilterResXBaseValue(x);
setFilterResYBaseValue(y);
}
}
reportAttributeParsingError(parseError, name, value);
SVGElement::parseAttribute(name, value);
SVGURIReference::parseAttribute(name, value);
SVGExternalResourcesRequired::parseAttribute(name, value);
}
示例6: if
void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGElement::parseAttribute(name, value);
return;
}
SVGParsingError parseError = NoError;
if (name == SVGNames::azimuthAttr)
m_azimuth->setBaseValueAsString(value, parseError);
else if (name == SVGNames::elevationAttr)
m_elevation->setBaseValueAsString(value, parseError);
else if (name == SVGNames::xAttr)
m_x->setBaseValueAsString(value, parseError);
else if (name == SVGNames::yAttr)
m_y->setBaseValueAsString(value, parseError);
else if (name == SVGNames::zAttr)
m_z->setBaseValueAsString(value, parseError);
else if (name == SVGNames::pointsAtXAttr)
m_pointsAtX->setBaseValueAsString(value, parseError);
else if (name == SVGNames::pointsAtYAttr)
m_pointsAtY->setBaseValueAsString(value, parseError);
else if (name == SVGNames::pointsAtZAttr)
m_pointsAtZ->setBaseValueAsString(value, parseError);
else if (name == SVGNames::specularExponentAttr)
m_specularExponent->setBaseValueAsString(value, parseError);
else if (name == SVGNames::limitingConeAngleAttr)
m_limitingConeAngle->setBaseValueAsString(value, parseError);
else
ASSERT_NOT_REACHED();
reportAttributeParsingError(parseError, name, value);
}
示例7: if
void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
if (!isSupportedAttribute(name)) {
SVGElement::parseAttribute(name, value);
} else if (name == SVGNames::patternUnitsAttr) {
m_patternUnits->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::patternContentUnitsAttr) {
m_patternContentUnits->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::patternTransformAttr) {
m_patternTransform->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::xAttr) {
m_x->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::yAttr) {
m_y->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::widthAttr) {
m_width->setBaseValueAsString(value, parseError);
} else if (name == SVGNames::heightAttr) {
m_height->setBaseValueAsString(value, parseError);
} else if (SVGURIReference::parseAttribute(name, value, parseError)) {
} else if (SVGTests::parseAttribute(name, value)) {
} else if (SVGFitToViewBox::parseAttribute(name, value, document(), parseError)) {
} else {
ASSERT_NOT_REACHED();
}
reportAttributeParsingError(parseError, name, value);
}
示例8: setPreserveAspectRatioBaseValue
void SVGImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (name == SVGNames::preserveAspectRatioAttr) {
SVGPreserveAspectRatio preserveAspectRatio;
preserveAspectRatio.parse(value);
setPreserveAspectRatioBaseValue(preserveAspectRatio);
return;
}
SVGParsingError parseError = NoError;
if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::widthAttr)
setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
else if (name == SVGNames::heightAttr)
setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
reportAttributeParsingError(parseError, name, value);
SVGGraphicsElement::parseAttribute(name, value);
SVGExternalResourcesRequired::parseAttribute(name, value);
SVGURIReference::parseAttribute(name, value);
}
示例9: if
void SVGRectElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
if (!isSupportedAttribute(name))
SVGGraphicsElement::parseAttribute(name, value);
else if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
else if (name == SVGNames::rxAttr)
setRxBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
else if (name == SVGNames::ryAttr)
setRyBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
else if (name == SVGNames::widthAttr)
setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
else if (name == SVGNames::heightAttr)
setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
else if (SVGLangSpace::parseAttribute(name, value)
|| SVGExternalResourcesRequired::parseAttribute(name, value)) {
} else
ASSERT_NOT_REACHED();
reportAttributeParsingError(parseError, name, value);
}
示例10: propertyFromAttribute
void SVGElement::parseAttributeNew(const QualifiedName& name, const AtomicString& value)
{
RefPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute(name);
if (property) {
SVGParsingError parseError = NoError;
property->setBaseValueAsString(value, parseError);
reportAttributeParsingError(parseError, name, value);
return;
}
SVGElement::parseAttribute(name, value);
}
示例11: ASSERT_NOT_REACHED
void SVGSymbolElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGElement::parseAttribute(name, value);
return;
}
SVGParsingError parseError = NoError;
if (SVGFitToViewBox::parseAttribute(name, value, document(), parseError)) {
} else {
ASSERT_NOT_REACHED();
}
reportAttributeParsingError(parseError, name, value);
}
示例12: ASSERT_NOT_REACHED
void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGGraphicsElement::parseAttribute(name, value);
return;
}
SVGParsingError parseError = NoError;
if (name == SVGNames::clipPathUnitsAttr)
m_clipPathUnits->setBaseValueAsString(value, parseError);
else
ASSERT_NOT_REACHED();
reportAttributeParsingError(parseError, name, value);
}
示例13: ASSERT_NOT_REACHED
void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGElement::parseAttribute(name, value);
return;
}
SVGParsingError parseError = NoError;
if (name == SVGNames::inAttr)
m_in1->setBaseValueAsString(value, parseError);
else
ASSERT_NOT_REACHED();
reportAttributeParsingError(parseError, name, value);
}
示例14: setXBaseValue
void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
if (name == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
else if (name == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
reportAttributeParsingError(parseError, name, value);
SVGElement::parseAttribute(name, value);
SVGTests::parseAttribute(name, value);
SVGExternalResourcesRequired::parseAttribute(name, value);
SVGURIReference::parseAttribute(name, value);
}
示例15: document
void SVGSVGElement::parseMappedAttribute(Attribute* attr)
{
SVGParsingError parseError = NoError;
if (!nearestViewportElement()) {
bool setListener = true;
// Only handle events if we're the outermost <svg> element
if (attr->name() == HTMLNames::onunloadAttr)
document()->setWindowAttributeEventListener(eventNames().unloadEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == HTMLNames::onresizeAttr)
document()->setWindowAttributeEventListener(eventNames().resizeEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == HTMLNames::onscrollAttr)
document()->setWindowAttributeEventListener(eventNames().scrollEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == SVGNames::onzoomAttr)
document()->setWindowAttributeEventListener(eventNames().zoomEvent, createAttributeEventListener(document()->frame(), attr));
else
setListener = false;
if (setListener)
return;
}
if (attr->name() == HTMLNames::onabortAttr)
document()->setWindowAttributeEventListener(eventNames().abortEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == HTMLNames::onerrorAttr)
document()->setWindowAttributeEventListener(eventNames().errorEvent, createAttributeEventListener(document()->frame(), attr));
else if (attr->name() == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, attr->value(), parseError));
else if (attr->name() == SVGNames::yAttr)
setYBaseValue(SVGLength::construct(LengthModeHeight, attr->value(), parseError));
else if (attr->name() == SVGNames::widthAttr) {
setWidthBaseValue(SVGLength::construct(LengthModeWidth, attr->value(), parseError, ForbidNegativeLengths));
addCSSProperty(attr, CSSPropertyWidth, attr->value());
} else if (attr->name() == SVGNames::heightAttr) {
setHeightBaseValue(SVGLength::construct(LengthModeHeight, attr->value(), parseError, ForbidNegativeLengths));
addCSSProperty(attr, CSSPropertyHeight, attr->value());
} else if (SVGTests::parseMappedAttribute(attr)
|| SVGLangSpace::parseMappedAttribute(attr)
|| SVGExternalResourcesRequired::parseMappedAttribute(attr)
|| SVGFitToViewBox::parseMappedAttribute(document(), attr)
|| SVGZoomAndPan::parseMappedAttribute(attr)) {
} else
SVGStyledLocatableElement::parseMappedAttribute(attr);
reportAttributeParsingError(parseError, attr);
}