[webkit-dev] About text decoration wavy style implementation on Skia platform

Bruno Abinader brunoabinader at gmail.com
Mon Nov 5 05:18:11 PST 2012


Hi all,

I am implementing the CSS3 text decoration style "wavy" for Skia platform
[3], and I would like to know a few things (please let me know if this is
not the right mailing list to ask this):

- There is already a "spelling line" style implementation which mimics
"wavy" style behavior, only with its own colors and theme. While Skia uses
a custom, inline bitmap for rendering the red waves, other toolkits such as
Cairo and Qt implements a function called "drawErrorUnderline" which
renders the waves based on a given bounding rectangle. These are triggered
by the drawLineForDocumentMarker function.

- Individual implementations of the "wavy" style are popping up for each
platform (ie. Qt [1] and Cairo [2] already have their implementations
pending review).

I see we can go both ways here:

1. Adapt the already implemented functions to support custom colors (as
defined by "-webkit-text-decoration-color", for example). While this looks
easier on Qt and Cairo platforms, since drawErrorUnderline already gives
everything we need, we would need to find a consensus on the custom bitmap
usage for Skia platform. Of course, this would include updating the Qt [1]
and Cairo [2] patches to support this approach.

2. Continue with individual implementations of the wavy style as we're
doing now. I'm afraid this option would involve code duplication.

IMO we should adopt first option, rename the drawErrorUnderline to
drawWavyLine (as suggested by KyungTae Kim), and find a solution for the
Skia custom bitmap approach.

What do you guys think?

Links:
[1] https://bugs.webkit.org/show_bug.cgi?id=93507
[2] https://bugs.webkit.org/show_bug.cgi?id=94110
[3] https://bugs.webkit.org/show_bug.cgi?id=93509

Best,

-- 
Bruno de Oliveira Abinader
Software Engineer @ basysKom GmbH
WebKit committer / Nokia Certified Qt Specialist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121105/91aff13c/attachment.html>


More information about the webkit-dev mailing list