Bug 128262 - Update aspect-ratio property to have constraining keywords
Summary: Update aspect-ratio property to have constraining keywords
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2014-02-05 11:04 PST by Dean Jackson
Modified: 2014-02-10 17:17 PST (History)
11 users (show)

See Also:


Attachments
Patch (22.06 KB, patch)
2014-02-05 11:33 PST, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (23.28 KB, patch)
2014-02-09 18:27 PST, Dean Jackson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 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.
Comment 1 Radar WebKit Bug Importer 2014-02-05 11:04:48 PST
<rdar://problem/15991746>
Comment 2 Dean Jackson 2014-02-05 11:24:12 PST
"Spec" and discussion at http://www.w3.org/mid/m2r47n3h9i.fsf@eoconnor.apple.com
Comment 3 Dean Jackson 2014-02-05 11:33:26 PST
Created attachment 223251 [details]
Patch
Comment 4 Brent Fulgham 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?
Comment 5 Dean Jackson 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"
Comment 6 Theresa O'Connor 2014-02-06 11:07:27 PST
Maybe that's an indication that "preserve" is a better name.
Comment 7 Dean Jackson 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.
Comment 8 Dean Jackson 2014-02-07 10:06:53 PST
BTW - we're holding off on review until we have more of the implementation done.
Comment 9 Theresa O'Connor 2014-02-07 14:29:30 PST
Per discussion on www-style I think "aspect-ratio" will be the name.
Comment 10 Dean Jackson 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.
Comment 11 Dean Jackson 2014-02-09 18:27:30 PST
Created attachment 223661 [details]
Patch
Comment 12 Dean Jackson 2014-02-10 17:17:16 PST
Committed r163840: <http://trac.webkit.org/changeset/163840>