It's weird that Frame owns editor() and selection(); these should be per-document, so owned by Document. Otherwise we risk editor and selection state leaking between documents.
<rdar://problem/40743780>