RESOLVED FIXED 128262
Update aspect-ratio property to have constraining keywords
https://bugs.webkit.org/show_bug.cgi?id=128262
Summary Update aspect-ratio property to have constraining keywords
Dean Jackson
Reported 2014-02-05 11:04:11 PST
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.
Attachments
Patch (22.06 KB, patch)
2014-02-05 11:33 PST, Dean Jackson
no flags
Patch (23.28 KB, patch)
2014-02-09 18:27 PST, Dean Jackson
simon.fraser: review+
Radar WebKit Bug Importer
Comment 1 2014-02-05 11:04:48 PST
Dean Jackson
Comment 2 2014-02-05 11:24:12 PST
Dean Jackson
Comment 3 2014-02-05 11:33:26 PST
Brent Fulgham
Comment 4 2014-02-05 16:11:49 PST
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?
Dean Jackson
Comment 5 2014-02-05 16:54:03 PST
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"
Theresa O'Connor
Comment 6 2014-02-06 11:07:27 PST
Maybe that's an indication that "preserve" is a better name.
Dean Jackson
Comment 7 2014-02-07 10:06:29 PST
(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.
Dean Jackson
Comment 8 2014-02-07 10:06:53 PST
BTW - we're holding off on review until we have more of the implementation done.
Theresa O'Connor
Comment 9 2014-02-07 14:29:30 PST
Per discussion on www-style I think "aspect-ratio" will be the name.
Dean Jackson
Comment 10 2014-02-09 17:18:53 PST
Yes, updating title. We already have partial support for aspect-ratio, but it needs to understand keywords rather than just numbers.
Dean Jackson
Comment 11 2014-02-09 18:27:30 PST
Dean Jackson
Comment 12 2014-02-10 17:17:16 PST
Note You need to log in before you can comment on or make changes to this bug.