When a CSS property value is replaced in any way, the old property is first removed. removeProperty returns the old property value because that is what the CSSOM calls for. But we can just use an internal version in this case that does not bother to generate the return value, since serializing the property value can be expensive.
Created attachment 16499 [details]
Comment on attachment 16499 [details]
The patch includes extra changes unrelated to this bug. r=me on the CSSMutableStyleDeclaration change.
Oops. the markup.cpp changes are from another bug.
Created attachment 16511 [details]
for reference, without the extraneous bits