Detail often missed: she had a lid on the styrofoam cup, properly placed. It wasn't an open cup. The cup and lid were of low quality and, while they passed at lower temperatures, deformed at the serving temperature, enough that the lid popped off, causing the spill.
In addition to the serving temperature, one aspect of McDonalds's liability was the quality of the cups and lids: squeezing a coffee cup, with contents at the serving temperature, shouldn't cause the lid to pop.