Replace surrounding

replaceSurroundingText has landed in Gecko. This is a follow up of #10155.