Sharapova's cockiness has always been a topic of discussion on tennis boards. As long as Sharapova doesn't start doing a Mike Tyson impersonation when she's trash-talking, I'm all for her brand of cockiness. I wish the players would do it more as long as no one is belittled or threats are made to their family (eg. Eating their children. ).
Personally, I think cockiness and trash-talking can both be linked to either having great confidence or great insecurity. Cockiness due to confidence can lead to complacency. Cockiness due to insecurity can lead to undue pressure. That's just my take on things.