It looks like the font size is insufficient to make the test pass on GTK+. We can fix it by adding a few more orders of magnitude to the font size.
Looks like this might actually be a bug in the Cairo GraphicsContext. Investigating now.
fast/css3-text/css3-text-decoration/text-decoration-thickness.html and fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html are also failing because of this issue.
*** Bug 126879 has been marked as a duplicate of this bug. ***
Created attachment 226217 [details] Patch
I have ported mmaxfield's original CG patch to the Cairo GraphicsContext, which seems to fix the tests.
Comment on attachment 226217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226217&action=review > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:617 > +static FloatRect computeLineBoundsAndAntialiasingModeForText(GraphicsContext& initialContext, const FloatPoint& point, float width, bool printing, bool& shouldAntialias, Color& color) Perhaps there is some cause for duplicate code reuse. Is there enough commonality here that the implementations could be unified? > LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html:-10 > -<div style="left: -160px; top: -320px; position: absolute; -webkit-transform: scale(20); font-family: helvetica; -webkit-transform-origin: left top; display: inline-block; text-decoration: underline; -webkit-text-decoration-skip: ink;">gy</div> Glad you caught this. This is good.
(In reply to comment #6) > (From update of attachment 226217 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226217&action=review > > > Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:617 > > +static FloatRect computeLineBoundsAndAntialiasingModeForText(GraphicsContext& initialContext, const FloatPoint& point, float width, bool printing, bool& shouldAntialias, Color& color) > > Perhaps there is some cause for duplicate code reuse. Is there enough commonality here that the implementations could be unified? I'd be happy to move the code to a shared GraphicsContext method if you think it makes sense. I've tried to make most of the code platform-independent. Would getting the transformation matrix via GraphicsContext::getCTM be sufficient for iOS and Mac?
GraphicsContext::getCTM(DefinitelyIncludeDeviceScale) should do the trick.
(In reply to comment #8) > GraphicsContext::getCTM(DefinitelyIncludeDeviceScale) should do the trick. Thanks for the information. I'll try to have a unified patch tomorrow.
Created attachment 226460 [details] Patch
r=me but i'm not a reviewer
Comment on attachment 226460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226460&action=review > Source/WebCore/platform/graphics/GraphicsContext.cpp:1012 > + return FloatRect(FloatPoint(origin.x(), origin.y()), FloatSize(width, thickness)); There is a FloatRect constructor that takes all four.
Committed r166902: <http://trac.webkit.org/changeset/166902>
*** Bug 129734 has been marked as a duplicate of this bug. ***
*** Bug 127282 has been marked as a duplicate of this bug. ***
*** Bug 128664 has been marked as a duplicate of this bug. ***