Lines Matching refs:attr
69 CSSMappedAttributeDeclaration* StyledElement::getMappedAttributeDecl(MappedAttributeEntry entryType, Attribute* attr)
73 return mappedAttributeDecls->get(MappedAttributeKey(entryType, attr->name().localName().impl(), attr->value().impl()));
83 void StyledElement::setMappedAttributeDecl(MappedAttributeEntry entryType, Attribute* attr, CSSMappedAttributeDeclaration* decl)
87 mappedAttributeDecls->set(MappedAttributeKey(entryType, attr->name().localName().impl(), attr->value().impl()), decl);
146 void StyledElement::attributeChanged(Attribute* attr, bool preserveDecls)
148 if (!attr->isMappedAttribute()) {
149 Element::attributeChanged(attr, preserveDecls);
153 MappedAttribute* mappedAttr = static_cast<MappedAttribute*>(attr);
163 bool needToParse = mapToEntry(attr->name(), entry);
172 else if (!attr->isNull() && entry != eNone) {
173 CSSMappedAttributeDeclaration* decl = getMappedAttributeDecl(entry, attr);
193 recalcStyleIfNeededAfterAttributeChanged(attr);
197 setMappedAttributeDecl(entry, attr, mappedAttr->decl());
198 mappedAttr->decl()->setMappedState(entry, attr->name(), attr->value());
204 updateAfterAttributeChanged(attr);
235 void StyledElement::parseMappedAttribute(MappedAttribute *attr)
237 if (attr->name() == idAttributeName()) {
239 setHasID(!attr->isNull());
241 if (attr->isNull())
244 namedAttrMap->setID(attr->value().lower());
246 namedAttrMap->setID(attr->value());
249 } else if (attr->name() == classAttr)
250 classAttributeChanged(attr->value());
251 else if (attr->name() == styleAttr) {
252 if (attr->isNull())
255 getInlineStyleDecl()->parseDeclaration(attr->value());
278 void StyledElement::addCSSProperty(MappedAttribute* attr, int id, const String &value)
280 if (!attr->decl()) createMappedDecl(attr);
281 attr->decl()->setProperty(id, value, false);
284 void StyledElement::addCSSProperty(MappedAttribute* attr, int id, int value)
286 if (!attr->decl()) createMappedDecl(attr);
287 attr->decl()->setProperty(id, value, false);
290 void StyledElement::addCSSImageProperty(MappedAttribute* attr, int id, const String& url)
292 if (!attr->decl()) createMappedDecl(attr);
293 attr->decl()->setImageProperty(id, url, false);
296 void StyledElement::addCSSLength(MappedAttribute* attr, int id, const String &value)
300 if (!attr->decl())
301 createMappedDecl(attr);
324 attr->decl()->setLengthProperty(id, v->substring(0, l), false);
329 attr->decl()->setLengthProperty(id, value, false);
333 void StyledElement::addCSSColor(MappedAttribute* attr, int id, const String& c)
339 if (!attr->decl())
340 createMappedDecl(attr);
342 if (attr->decl()->setProperty(id, c, false))
398 if (attr->decl()->setProperty(id, color, false))
402 attr->decl()->setProperty(id, CSSValueBlack, false);
405 void StyledElement::createMappedDecl(MappedAttribute* attr)
408 attr->setDecl(decl);