[webkit-dev] About text decoration wavy style implementation on Skia platform
thakis at chromium.org
Mon Nov 5 07:06:30 PST 2012
On Mon, Nov 5, 2012 at 5:18 AM, Bruno Abinader <brunoabinader at gmail.com> wrote:
> Hi all,
> I am implementing the CSS3 text decoration style "wavy" for Skia platform
> , 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  and Cairo  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 
> and Cairo  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?
The spelling underline on OS X is not a wavy line. If you end up
changing the skia code, please make sure the chromium/mac spelling
underline doesn't become a wavy line.
>  https://bugs.webkit.org/show_bug.cgi?id=93507
>  https://bugs.webkit.org/show_bug.cgi?id=94110
>  https://bugs.webkit.org/show_bug.cgi?id=93509
> Bruno de Oliveira Abinader
> Software Engineer @ basysKom GmbH
> WebKit committer / Nokia Certified Qt Specialist
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
More information about the webkit-dev