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

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