[GTK] Add support for text-decoration-skip
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2014 18:37:39 +0000 (18:37 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2014 18:37:39 +0000 (18:37 +0000)
commit5540310e90981a7765e3116ced09a937b82dace2
tree0e7d86a7a6100aa25d0d3e016ad2fac7d64f34a0
parent5ef1e138eac947118e8f54058224f16ad3d55f82
[GTK] Add support for text-decoration-skip
https://bugs.webkit.org/show_bug.cgi?id=131540

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

No new tests. This is covered by existing layout tests.

* platform/graphics/cairo/FontCairo.cpp:
(WebCore::GlyphIterationState): Added this class, a modified version of the Mac
port's implementation.
(WebCore::Font::dashesForIntersectionsWithRect): Ditto.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Added an implementation for
HarfBuzz that just fills out the GlyphBuffer, but does not render it.
(WebCore::Font::drawComplexText): Use the new getGlyphsAndAdvancesForComplexText
in a similar way to the Mac port.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): We need to pass the current
character index to GlyphBuffer:add since it's used by dashesForIntersectionsWithRect
and otherwise it will be uninitialized when we try to access it.

Source/WTF:

* wtf/Platform.h: Enable text decoration skip by default.

LayoutTests:

* platform/gtk/TestExpectations: Unskip a test relying on text-decoration-skip
and skip a new test that has a newly exposed, but unrelated issue.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/FontCairo.cpp
Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp