[webkit-dev] Subpixel Layout Update

Levi Weintraub leviw at chromium.org
Tue Feb 21 10:13:50 PST 2012

Hi Dirk,


On Sat, Feb 18, 2012 at 9:44 PM, Dirk Schulze <dschulze at adobe.com> wrote:

> Hi Emil and Levi,
> I have a question to sub pixels from the SVG point of view.
> Right now a lot of content on renderers and also in RenderStyle uses
> LayoutPoint, LayoutSize, LayoutRect, Length… and so on. How would
> LayoutUnit deal with SVG's "float system"? Your Wiki says that SVG's float
> system stays unchanged. I assume that you mean that the source code of the
> SVG implementation will stay float based and not move to LayoutUnit. Is
> that correct?

Currently, when SVG code queries the Render Tree it receives results as
integers or floats. The only change we're making is to replace those
integers with a subpixel unit. Things that were floats before will remain
so (including all SVG layout), and we'll only increase precision in other

> So my question is, if we use code of renderers or RenderStyle that would
> work on LayoutUnits, would we still be confronted with rounding to fixed
> point units? Or can LayoutUnit deal floats than? In SVG we would still like
> to have float based results, not rounded to fixed point, even if it is
> better than integer. This would be interesting for supporting
> 'transform-origin' and other CSS features in SVG. Maybe it is just a
> misunderstanding from me. Thanks for any clarification.

LayoutUnits will not be floats, but we are not replacing things that were
floats with LayoutUnits. LayoutUnits will be integers that represent 1/60th
of a pixel, and you'll be able to convert floats to and from LayoutUnits
when needed. There should not be any additional rounding in SVG or anywhere
else than there is now.

-Emil and Levi

> Greetings,
> Dirk
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120221/1708a096/attachment.html>

More information about the webkit-dev mailing list