The implementation of this method is required to be able to reflect correctly the state of the B, I and U buttons in the inspector bar also when the selection is a caret selection.
Created attachment 123826 [details]
After discussing this further with Darin, we've decided to implement typingAttributes in WebView.
I've changed the title of the bug to reflect this.
Created attachment 123979 [details]
This caused bug 77432.