Revert border styling perf change and merge official fix from CodeMirror upstream/master