From bug 28633.
resetMultipleFormSubmissionProtection() is being called in EventHandler's keyEvent() and handleMousePressEvent() functions, and should be moved to another abstraction layer.
One question is why we still have multiple form submission protection code at all. It's explicitly turned off for user actions, and it ineffective in some other cases (see bug 13011). At the same time, there are many closely related bugs tracked under bug 39021 umbrella, suggesting that the logic is fundamentally different from other browsers.