khtml/css should use RefPtr instead of manual ref() deref() This patch does just that. (I'm doing each of the khtml sub-directories one at a time to keep these patches small).
Created attachment 5085 [details] Proposed patch
Comment on attachment 5085 [details] Proposed patch To avoid leaks, getPropertyCSSValue should be changed to return a PassRefPtr rather than a raw pointer. CSSStyleRuleImpl::setDeclaration doesn't need the != check. It can just be a one-liner m_style = style. The changes to CSSPrimitiveValueImpl don't seem like much of an improvement to me. ~CSSProperty should be removed altogether rather than left declared as an empty inline. In this line: RefPtr<CSSMutableStyleDeclarationImpl>dummyStyleDeclaration there's a space missing after the > symbol. But none of these are major issues, it's fine to land as-is if you like.