The U.S. Supreme Court unanimously ruled in favor of Samsung Electronics Co. on Tuesday in its titanic patent dispute with Apple Inc. over design features copied from Apple iPhones.

Justice Sonia Sotomayor, writing for a unanimous court, said the damages Samsung should pay Apple for infringement need not be based on the profits from the entire phone but rather can be keyed to the value of the copied components.