[dev-servo] .getBoundingClientRect() or lightweight alternative?

2016-11-12 Thread Emilio Cobos Álvarez
I'm posting this message in the name of Rod McGuire, who got his message rejected apparently. --- [ I apologize for knowing nothing of current Servo internals ] For precise layout of things like math equations or SVG diagrams a Javascrpt application may need to know the width and height extent o

Re: [dev-servo] .getBoundingClientRect() or lightweight alternative?

2016-11-12 Thread Michael Howell
To compute the bounding box of an element, you have to place it in the DOM, because you can't do CSS selector matching on an element otherwise. You have to do selector matching on it to know which CSS rules will be applicable, because CSS rules affect the bounding box. We defer the actual renderin

Re: [dev-servo] .getBoundingClientRect() or lightweight alternative?

2016-11-12 Thread Simon Sapin
On 12/11/16 17:49, Emilio Cobos Álvarez wrote: I think most developers affected by this would be somewhat happy with width and height just for textual elements. They also might like some exposure of the actual selected font so that font table information can be used in layout. There is a propos