Changeset 37401 in webkit
- Timestamp:
- Oct 7, 2008 5:12:08 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r37391 r37401 1 2008-10-06 Eric Seidel <eric@webkit.org>2 3 Reviewed by Darin Adler, Nikolas Zimmermann and Dave Hyatt.4 5 svgElement.className.baseValue = "foo" doesn't work6 https://bugs.webkit.org/show_bug.cgi?id=206517 8 * svg/custom/class-baseValue.svg: Added.9 10 1 2008-10-04 Eric Seidel <eric@webkit.org> 11 2 -
trunk/WebCore/ChangeLog
r37399 r37401 121 121 * css/CSSSelector.h: 122 122 (WebCore::CSSSelector::): 123 124 2008-10-02 Eric Seidel <eric@webkit.org>125 126 Reviewed by Darin Adler, Nikolas Zimmermann and Dave Hyatt.127 128 svgElement.className.baseValue = "foo" does not work129 https://bugs.webkit.org/show_bug.cgi?id=20651130 131 * dom/StyledElement.cpp:132 (WebCore::StyledElement::classAttributeChanged):133 (WebCore::StyledElement::parseMappedAttribute):134 * dom/StyledElement.h:135 * svg/SVGStyledElement.cpp:136 (WebCore::SVGStyledElement::svgAttributeChanged):137 123 138 124 2008-10-06 Timothy Hatcher <timothy@apple.com> -
trunk/WebCore/dom/StyledElement.cpp
r37391 r37401 211 211 } 212 212 213 void StyledElement::classAttributeChanged(const AtomicString& newClassString)214 {215 const UChar* characters = newClassString.characters();216 unsigned length = newClassString.length();217 unsigned i;218 for (i = 0; i < length; ++i) {219 if (!isClassWhitespace(characters[i]))220 break;221 }222 setHasClass(i < length);223 if (namedAttrMap) {224 if (i < length)225 mappedAttributes()->setClass(newClassString);226 else227 mappedAttributes()->clearClass();228 }229 setChanged();230 }231 232 213 void StyledElement::parseMappedAttribute(MappedAttribute *attr) 233 214 { … … 244 225 } 245 226 setChanged(); 246 } else if (attr->name() == classAttr) 247 classAttributeChanged(attr->value()); 248 else if (attr->name() == styleAttr) { 227 } else if (attr->name() == classAttr) { 228 // class 229 const AtomicString& value = attr->value(); 230 const UChar* characters = value.characters(); 231 unsigned length = value.length(); 232 unsigned i; 233 for (i = 0; i < length; ++i) { 234 if (!isClassWhitespace(characters[i])) 235 break; 236 } 237 setHasClass(i < length); 238 if (namedAttrMap) { 239 if (i < length) 240 mappedAttributes()->setClass(value); 241 else 242 mappedAttributes()->clearClass(); 243 } 244 setChanged(); 245 } else if (attr->name() == styleAttr) { 249 246 if (attr->isNull()) 250 247 destroyInlineStyleDecl(); -
trunk/WebCore/dom/StyledElement.h
r37391 r37401 82 82 83 83 protected: 84 // classAttributeChanged() exists to share code between85 // parseMappedAttribute (called via setAttribute()) and86 // svgAttributeChanged (called when element.className.baseValue is set)87 void classAttributeChanged(const AtomicString& newClassString);88 89 84 RefPtr<CSSMutableStyleDeclaration> m_inlineStyleDecl; 90 85 }; -
trunk/WebCore/svg/SVGStyledElement.cpp
r37391 r37401 187 187 SVGElement::svgAttributeChanged(attrName); 188 188 189 if (attrName == HTMLNames::classAttr)190 classAttributeChanged(className());191 192 189 // If we're the child of a resource element, be sure to invalidate it. 193 190 invalidateResourcesInAncestorChain();
Note: See TracChangeset
for help on using the changeset viewer.