There's a rumour that passive mobs (pigs, cows, sheep) can only spawn on the highest solid block. In other words, they won't spawn on grass with a solid block roof over it, such as in an underground cave, a player-built barn, or a glass dome.

Is this true, as of Minecraft 1.0?