Ejemplo n.º 1
0
// This hack will not handle the case where we're setting a width/height
// on a root <svg> via svg.width.baseValue = when it has none.
static void updateCSSForAttribute(SVGSVGElement* element, const QualifiedName& attrName, CSSPropertyID property, const SVGLength& value)
{
    Attribute* attribute = element->attributes(false)->getAttributeItem(attrName);
    if (!attribute || !attribute->isMappedAttribute())
        return;
    element->addCSSProperty(attribute, property, value.valueAsString());
}
Ejemplo n.º 2
0
static v8::Handle<v8::Value> valueAsStringAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.SVGLength.valueAsString._get");
    V8SVGPODTypeWrapper<SVGLength>* impWrapper = V8SVGPODTypeWrapper<SVGLength>::toNative(info.Holder());
    SVGLength impInstance = *impWrapper;
    SVGLength* imp = &impInstance;
    return v8String(imp->valueAsString());
}