- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 18 Feb 2010 00:44:22 -0800
- To: Simon Pieters <simonp@opera.com>
- CC: www-style@w3.org
On 02/18/2010 12:00 AM, Simon Pieters wrote: > On Thu, 18 Feb 2010 00:01:06 +0100, fantasai > <fantasai.lists@inkedblade.net> wrote: >> My current mental model for the rendering of replaced content is the >> following: >> >> 1. CSS queries the object for its intrinsic size. >> 2. CSS computes the size of the CSS content box based on this info >> and the CSS properties applied to the replaced element. >> 3. CSS adjusts the viewport for the replaced element: >> - to match the size of the content box for image-fit: fill >> - to cover the size of the content box while preserving the >> intrinsic aspect ratio for image-fit: cover >> - to contain the size of the content box while preserving >> the intrinsic aspect ratio for image-fit: contain >> 4. CSS adjusts the position of the viewport with respect to the >> content box according to the specified image-position. >> 5. CSS gives the object its viewport dimensions and asks it to render. >> 6. The object renders into its given viewport according to its own >> rendering rules. (For SVG, this could include accounting for >> preserveAspectRatio. For videos, it could mean using 'content') >> 7. CSS clips any parts of the viewport that extend beyond the >> content box. >> >> In the above mode, the only interaction between CSS and the replaced >> content is: >> a. The replaced content reports its intrinsic size >> b. CSS tells the replaced content the size of its viewport >> >> I think it's important for there to be no format-specific negotiation >> between the replaced content and CSS. The model should be defined so >> that SVG doesn't need any special exceptions. The rules in CSS should >> be able to handle <iframe> content, plugins, videos, bitmap images, >> SVG, <canvas> and any other replaced content the same way. > > Browsers have format-specific rules today. <object> can use different > formats. Therefore, for compat, <object> needs format-specific rules. > Hence the new 'auto' value. But does *CSS* need format-specific rules, or can those be handled in step 6? It seems to me they can be handled in step 6. ~fantasai
Received on Thursday, 18 February 2010 08:54:40 UTC