Attribute::style() is an artifact of the deprecated Attr::style() API that we need to support because it shipped in Obj-C bindings. It returns the same as Attribute::decl() albeit with a lower return type specificity. We should just remove it and switch the few call sites to decl().
Created attachment 117670 [details] Patch
Comment on attachment 117670 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=117670&action=review Great idea. The name decl is so sad. review- because I don’t want to add that static_cast. > Source/WebCore/svg/SVGStyledElement.cpp:440 > - return cssSVGAttr->style()->getPropertyCSSValue(name); > + return static_cast<CSSStyleDeclaration*>(cssSVGAttr->decl())->getPropertyCSSValue(name); This cast is not the right way to code this. There are three ways to do it that I am OK with: 1) If we think it’s OK that CSSMutableStyleDeclaration hides the string overloads for the getters, then we should write: cssSVGAttr->decl()->CSSStyleDeclaration::getPropertyCSSValue(name); 2) Or we could write: CSSStyleDeclaration* style = cssSVGAttr->decl(); return style->getPropertyCSSValue(name); 3) But, best of all, we should probably do this: using CSSStyleDeclaration::getPropertyCSSValue; If we put that in CSSMutableStyleDeclaration.h then it should bring down the overloads of getPropertyCSSValue so they are visible and not hidden by the function we are overriding with.
D'oh, forgot about this long enough until it got fixed by someone else (Antti) on bug 76904.