This is a cleanup task. There is no need to use AppKit types here, nor in WebHTMLView toggleBaseWritingDirection.
Created attachment 185854 [details] Patch
Committed revision 141513.