[Chromium] Adding HarfBuzz-ng for Linux https://bugs.webkit.org/show_bug.cgi?id=90362
[Chromium] Adding HarfBuzz-ng for Linux
https://bugs.webkit.org/show_bug.cgi?id=90362

Reviewed by Tony Chang.

Source/WebCore:

This patch adds harfbuzz-ng support for Chromium Linux port as a part of
transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng
callbacks by using Skia APIs. For now, the feature is enabled only when
WTF_USE_HARFBUZZ_NG is defined.

No new tests. No change in behavior now.

* WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files.
* WebCore.gypi: Added HarfBuzzFaceSkia.cpp
* platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG).
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::offsetForPositionForComplexText):
(WebCore::Font::selectionRectForComplexText):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
(WebCore):
(WebCore::FontPlatformData::harfbuzzFace):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
(FontPlatformData):
* platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added.
(WebCore):
(WebCore::SkiaScalarToHarfbuzzPosition):
(WebCore::SkiaGetGlyphWidthAndExtents):
(WebCore::harfbuzzGetGlyph):
(WebCore::harfbuzzGetGlyphHorizontalAdvance):
(WebCore::harfbuzzGetGlyphHorizontalOrigin):
(WebCore::harfbuzzGetGlyphExtents):
(WebCore::harfbuzzSkiaGetFontFuncs):
(WebCore::harfbuzzSkiaGetTable):
(WebCore::destroyPaint):
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):
(WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
* platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG).
(WebCore::substituteWithVerticalGlyphs):

Source/WebKit/chromium:

* features.gypi: Added use_harfbuzz_ng variable. If the value is set, USE(HARFBUZZ_NG) is defined.

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@122316 bbb929c8-8fbe-4397-9dbb-9b2b20218538
PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,modulexcite/blink,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,modulexcite/blink,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,XiaosongWei/blink-crosswalk,nwjs/blink,smishenk/blink-crosswalk,kurli/blink-crosswalk,kurli/blink-crosswalk,ondra-novak/blink,jtg-gg/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,PeterWangIntel/blink-crosswalk,ondra-novak/blink,PeterWangIntel/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,nwjs/blink,jtg-gg/blink,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,jtg-gg/blink,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,ondra-novak/blink,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,jtg-gg/blink,Pluto-tv/blink-crosswalk,nwjs/blink,jtg-gg/blink,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,Bysmyyr/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,jtg-gg/blink,modulexcite/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink,kurli/blink-crosswalk,nwjs/blink,crosswalk-project/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,nwjs/blink,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,ondra-novak/blink,modulexcite/blink,hgl888/blink-crosswalk-efl,modulexcite/blink,Pluto-tv/blink-crosswalk,nwjs/blink,jtg-gg/blink,smishenk/blink-crosswalk,nwjs/blink,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,jtg-gg/blink,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,modulexcite/blink,Pluto-tv/blink-crosswalk,nwjs/blink,XiaosongWei/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,modulexcite/blink,modulexcite/blink