Although I've just filed a bug for the Shadow DOM spec (see the bellow), I think shadowRoot.activeElement should be null if it does not contain a focused element.
The current implementation of ShadowRoot.activeElement may return a focused element which is outside of ShadowRoot.
Created attachment 131833 [details]
Comment on attachment 131833 [details]
Clearing flags on attachment: 131833
Committed r110810: <http://trac.webkit.org/changeset/110810>
All reviewed patches have been landed. Closing bug.