benschwarz/developers.whatwg.org — pull request #73 by Smylers (2012-12-06 10:35:51+00:00)
Title: Don't stretch narrow images in handheld view

If the handheld CSS has been selected then setting images to be full-width
was stretching narrow images (but leaving their height alone), distorting
them. For example see the sample rendering images in this section:
http://developers.whatwg.org/states-of-the-type-attribute.html#range-state-%28type=range%29

This can be seen in a desktop browser simply by resizing the window to under 960px.

Fix the problem by not resizing images that already fit.

Instead, set a maximum width so that large images get scaled down to fit,
and ensure the height stays in proportion with the width.