About a decade ago, Barbie began losing market share in the high-value fashion doll industry after a small-time competitor, MGA Entertainment Inc., stole trade secrets and the designer at Mattel Inc. who had come up with the idea for the wildly popular Bratz dolls, John Quinn, Mattel’s lawyer, told a federal jury on Tuesday.