W3C home > Mailing lists > Public > www-style@w3.org > October 2015

Re: [css-images] API for authors to request concrete object size & position, for replaced element w/ "object-fit"/"object-position"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 7 Oct 2015 10:08:57 -0700
Message-ID: <CAAWBYDAUWjuj8MmF=BjRvSY-UBdqTnDOs4FZy+ndj-1mUm_gFg@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Daniel Holbert <dholbert@mozilla.com>, www-style <www-style@w3.org>
On Wed, Oct 7, 2015 at 3:55 AM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Wed, Oct 7, 2015 at 5:18 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
>> (2) What should an API to query this information look like? Maybe a new
>> getter "DOMRect getConcreteObjectRect()" on all replaced elements?
>> (This may really be a question for the WHATWG -- not sure -- but since
>> object-fit & object-position are defined in CSS, I figured I'd start
>> with the CSSWG.)
>
> I would add a new box type to CSSBoxType in GeometryUtils, e.g. "object",
> representing the object rectangle. This would let you use getBoxQuads and
> coordinate conversion methods without any additoinal API surface.

Agreed.

~TJ
Received on Wednesday, 7 October 2015 17:09:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:57 UTC