We should move hasFocus() and attribute activeElement from interface HTMLDocument to DOMDocument as per section Focus management APIs of the HTML5 standard: <http://www.whatwg.org/specs/web-apps/current-work/#focus-management-apis> (1 April 2014). Then hasFocus() and attribute activeElement can be used within an XML document.
Created attachment 228339 [details]
Patch and layout test
Please wait for approval from email@example.com (or another member of the Apple Safari Team) before submitting because this patch contains changes to the Apple Mac WebKit.framework public API.
I used the patch for <https://bugs.webkit.org/show_bug.cgi?id=67651> as example of moving a versioned public API from derived interface to its base interface. Let me know if we should handle this differently.
Committed r166668: <http://trac.webkit.org/changeset/166668>