The ruling followed a ferocious legal battle between the world’s top two smartphone manufacturers that began in 2011 when Apple sued Samsung, asserting that its rival stole its technology and the iPhone’s trademarked appearance.