Use the getRegisteredDomain ftn to compare the target url and the security origin url. Also, only dispatch the addsearchprovider event after we check user-gesture.
Created attachment 194326 [details] Patch
Comment on attachment 194326 [details] Patch LGTM.
Comment on attachment 194326 [details] Patch Clearing flags on attachment: 194326 Committed r146526: <http://trac.webkit.org/changeset/146526>
All reviewed patches have been landed. Closing bug.