In the process of creating the SVG dynamic updates testsuite, we're supposed to add 'svgAttributeChanged' implementation to all SVG*Elements. SVGForeignObjectElement/SVGImageElement/SVGSVGElement have a special case that width/height attributes are mapped to CSS_PROP_WIDTH / CSS_PROP_HEIGHT using the usual addCSSProperty() logic called from parseMappedAttribute. As SVG DOM updates never go through the parseMappedAttribute/attributeChanged route, but instead of svgAttributeChanged directly, we'll need a special trick to be able to unify the updating logic for these cases. TODO: - remove addCSSProperty calls from SVGForeignObjectElement::parseMappedAttributes The idea was to just move them into svgAttributeChanged - though that's not going to work as StyledElement::attributeChanged uses a special logic to map these attributes to CSS properties. We need to duplicate a subset of this logic, I called it "addCSSPropertyAndNotifyAttributeMap". It's a new helper function that's now living in SVGForeignObjectElement, and needs to be moved down into a SVG*Element subclass, as soon as SVGImageElement/SVGSVGElement are fixed, too. Remember, this is _ONLY_ need to support SVG DOM updates, otherwhise the HTML-style of calling addCSSProperty from parseMappedAttribute would be sufficient! Uploading patch soon. Just adding
Created attachment 19401 [details] Initial patch Code changes are low. Mostly new tests (8 in total)
Landed in r30695.