- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Fri, 27 Jun 2014 10:25:50 +1200
- To: Justin Novosad <junov@google.com>
- Cc: Rik Cabanier <cabanier@gmail.com>, Kenneth Russell <kbr@google.com>, Stephen White <senorblanco@chromium.org>, WHAT Working Group <whatwg@whatwg.org>, Dean Jackson <dino@apple.com>, Ian Hickson <ian@hixie.ch>
On Fri, Jun 27, 2014 at 2:00 AM, Justin Novosad <junov@google.com> wrote: > Hadn't thought of that. object-fit seems smells dangerous. I think we may > need to define explicit behaviors for renderedPixelWidth/Height for the > different object fit modes. I don't think so. Given renderedPixelWidth/Height returns the size of the content box, and the element's CSS width and height are not 'auto', then renderedPixelWidth/Height are not affected by object-fit or the intrinsic size, so there is no feedback loop. For example, with 'object-fit: contains', will the renderedPixelWidth/Height > be computed in a way to fill the element's content area, or will it > preserve the aspect ratio of the original intrinsic size? > The former. > Also, with object fit triggering a renderedsizechange event, the event > listener will presumably change the intrinsic size of the canvas, which > will invalidate style (because the object-fit computation depends on the > intrinsic size), and that causes a style invalidation feedback loop. We don't implement object-fit in Gecko yet, but when we do the change to the intrinsic size will trigger a relayout that will end up not change anything so there is no feedback loop. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w
Received on Thursday, 26 June 2014 22:51:16 UTC