merge Marijnh's replaceGetRect update, and have the plugin use it's own measuring code. (not yet tested)