The CSS3 property "text-decoration-style" accepts the following values: "solid | double | dotted | dashed | wavy" as seen on the link below:
All values except "wavy" were already implemented on Skia due to previous usage on "border-style" property:
This bug intends to provide Skia platform support for "dashed" and "dotted" values on GraphicsContext::drawLineForText. This bug is a subtask from bug 93509.
Created attachment 163403 [details]
Peter, can you please take a look at it? :)
I wouldn't know about the Skia code, adding Mike and Tom, hoping that either of them can take a look. Thanks for the patch!
This is actually in the WebKit-to-Skia glue layer, not inside Skia proper. senorblanco@ or junov@ might be (or know) a better subject-matter expert.
I'm surprised that the roundf() in drawLineForText() doesn't break anything?
Otherwise after reading over some of the related code this looks reasonable to me.
You are right, I was trying to avoid using static_cast<int>, however the roundf()/lroundf() trick ~might~ not work on all compilers, as it relies on C99 standard. I'm going to revert this change on an updated patch.
(In reply to comment #4)
> This is actually in the WebKit-to-Skia glue layer, not inside Skia proper. senorblanco@ or junov@ might be (or know) a better subject-matter expert.
> I'm surprised that the roundf() in drawLineForText() doesn't break anything?
> Otherwise after reading over some of the related code this looks reasonable to me.
Double checking the code, I've reminded myself that roundf() is actually already used to convert strokeThickness() to int (check http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp#L559 for details). I'm sorry I forgot to mention that previosuly. Said this, shall this gets a r+, then? :)
Created attachment 178798 [details]
Updated version based on Tom's comments. Added 'double' and 'wavy' values under CSS3_TEXT feature flag.
Comment on attachment 178798 [details]
Clearing flags on a Skia-specific patch.