Add a new prefixed property which will suggest to the layout engine whether they should respect the intrinsic size of an image, or the specified size, when sizing its object box. The default is "auto" which is the current behaviour.
<rdar://problem/15991746>
"Spec" and discussion at http://www.w3.org/mid/m2r47n3h9i.fsf@eoconnor.apple.com
Created attachment 223251 [details] Patch
Comment on attachment 223251 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=223251&action=review This looks good to me, but I noticed a textual difference between ObjectSizingPreserveSpecified and CSSValuePreferSpecified. Are these equivalent? > Source/WebCore/rendering/style/RenderStyleConstants.h:218 > + ObjectSizingAuto, ObjectSizingPreserveIntrinsic, ObjectSizingPreserveSpecified Does CSSValuePreferSpecified === ObjectSizingPreserveSpecified?
Comment on attachment 223251 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=223251&action=review >> Source/WebCore/rendering/style/RenderStyleConstants.h:218 >> + ObjectSizingAuto, ObjectSizingPreserveIntrinsic, ObjectSizingPreserveSpecified > > Does CSSValuePreferSpecified === ObjectSizingPreserveSpecified? Oh, I totally screwed up here. I actually made this same mistake a number of times while developing - typing "Preserve" when I meant "Prefer"
Maybe that's an indication that "preserve" is a better name.
(In reply to comment #6) > Maybe that's an indication that "preserve" is a better name. If we change the property name to "aspect-ratio" then I guess "preserve" makes more sense. I really don't mind either way.
BTW - we're holding off on review until we have more of the implementation done.
Per discussion on www-style I think "aspect-ratio" will be the name.
Yes, updating title. We already have partial support for aspect-ratio, but it needs to understand keywords rather than just numbers.
Created attachment 223661 [details] Patch
Committed r163840: <http://trac.webkit.org/changeset/163840>