Summary: | Attribute: Remove style() since it returns the same as decl(). | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||
Component: | DOM | Assignee: | Andreas Kling <kling> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | andersca, eric, hyatt | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Andreas Kling
2011-12-02 12:07:15 PST
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. |