Skip to content

Commit f693e01

Browse files
committed
Unreviewed manual rollout of r239100-r239102 and r239114
https://bugs.webkit.org/show_bug.cgi?id=192151 <rdar://problem/46655586> .: * Source/cmake/OptionsGTK.cmake: Source/WebCore: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::font): * loader/cache/CachedFont.cpp: (WebCore::CachedFont::platformDataFromCustomData): * platform/FreeType.cmake: * platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::isFixedWidth const): Deleted. * platform/graphics/cairo/FontCustomPlatformData.h: * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::systemFallbackForCharacters): (WebCore::FontCache::createFontPlatformData): (WebCore::getFontPropertiesFromPattern): Deleted. (WebCore::defaultVariationValues): Deleted. (WebCore::buildVariationSettings): Deleted. * platform/graphics/freetype/FontCacheFreeType.h: Removed. * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::FontCustomPlatformData::FontCustomPlatformData): (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::FontCustomPlatformData::fontPlatformData): (WebCore::FontCustomPlatformData::supportsFormat): (WebCore::defaultFontconfigOptions): Deleted. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::setCairoFontOptionsFromFontConfigPattern): (WebCore::getDefaultFontconfigOptions): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): (WebCore::FontPlatformData::harfBuzzFace const): (WebCore::FontPlatformData::platformIsEqual const): (WebCore::FontPlatformData::buildScaledFont): (WebCore::FontPlatformData::fcPattern const): Deleted. (WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Deleted. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::Font::platformCreateScaledFont const): * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: (WebCore::fontFeatures): (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): (WebCore::floatToHarfBuzzPosition): Deleted. (WebCore::doubleToHarfBuzzPosition): Deleted. (WebCore::harfBuzzFontFunctions): Deleted. (WebCore::findScriptForVerticalGlyphSubstitution): Deleted. * platform/graphics/harfbuzz/HarfBuzzFace.cpp: Added. (WebCore::HarfBuzzFace::CacheEntry::CacheEntry): (WebCore::HarfBuzzFace::CacheEntry::~CacheEntry): (WebCore::HarfBuzzFace::cache): (WebCore::HarfBuzzFace::HarfBuzzFace): (WebCore::HarfBuzzFace::~HarfBuzzFace): (WebCore::findScriptForVerticalGlyphSubstitution): (WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution): * platform/graphics/harfbuzz/HarfBuzzFace.h: Added. (WebCore::HarfBuzzFace::CacheEntry::create): (WebCore::HarfBuzzFace::CacheEntry::face): (WebCore::HarfBuzzFace::CacheEntry::glyphCache): * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Added. (WebCore::floatToHarfBuzzPosition): (WebCore::doubleToHarfBuzzPosition): (WebCore::CairoGetGlyphWidthAndExtents): (WebCore::harfBuzzGetGlyph): (WebCore::harfBuzzGetGlyphHorizontalAdvance): (WebCore::harfBuzzGetGlyphHorizontalOrigin): (WebCore::harfBuzzGetGlyphExtents): (WebCore::harfBuzzCairoTextGetFontFuncs): (WebCore::harfBuzzCairoGetTable): (WebCore::HarfBuzzFace::createFace): (WebCore::HarfBuzzFace::createFont): * platform/graphics/harfbuzz/HbUniquePtr.h: (WebCore::HbPtrDeleter<hb_face_t>::operator() const): Deleted. * platform/graphics/opentype/OpenTypeMathData.cpp: (WebCore::OpenTypeMathData::OpenTypeMathData): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/win/FontCustomPlatformData.h: * platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Tools: * gtk/jhbuild.modules: * gtk/patches/cairo-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch: Removed. LayoutTests: * platform/gtk/TestExpectations: * platform/gtk/mathml/opentype/opentype-stretchy-expected.png: * platform/gtk/mathml/opentype/opentype-stretchy-expected.txt: Canonical link: https://commits.webkit.org/207203@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 708763d commit f693e01

29 files changed

Lines changed: 692 additions & 487 deletions

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2018-12-12 Michael Catanzaro <[email protected]>
2+
3+
Unreviewed manual rollout of r239100-r239102 and r239114
4+
https://bugs.webkit.org/show_bug.cgi?id=192151
5+
<rdar://problem/46655586>
6+
7+
* Source/cmake/OptionsGTK.cmake:
8+
19
2018-12-12 Carlos Garcia Campos <[email protected]>
210

311
[FreeType] Add initial implementation of variation fonts

LayoutTests/ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2018-12-12 Michael Catanzaro <[email protected]>
2+
3+
Unreviewed manual rollout of r239100-r239102 and r239114
4+
https://bugs.webkit.org/show_bug.cgi?id=192151
5+
<rdar://problem/46655586>
6+
7+
* platform/gtk/TestExpectations:
8+
* platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
9+
* platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
10+
111
2018-12-12 Carlos Garcia Campos <[email protected]>
212

313
[FreeType] Remove HarfBuzzFace

LayoutTests/platform/gtk/TestExpectations

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,11 @@ webkit.org/b/161586 css3/font-feature-settings-font-face-rendering.html [ ImageO
10461046

10471047
webkit.org/b/161962 fast/forms/implicit-submission.html [ Failure ]
10481048

1049+
# Font variations build flag is turned off
1050+
webkit.org/b/162815 fast/text/variations/ [ Skip ]
1051+
webkit.org/b/162815 animations/font-variations/ [ Skip ]
1052+
webkit.org/b/162815 legacy-animation-engine/animations/font-variations/ [ Skip ]
1053+
10491054
webkit.org/b/169531 fast/text/font-selection-font-face-parse.html [ Skip ]
10501055

10511056
# CSS image-orientation is not yet enabled.
@@ -3637,10 +3642,6 @@ webkit.org/b/192434 fast/inline/inline-content-with-float-and-margin.html [ Fail
36373642
webkit.org/b/166536 fast/canvas/webgl/hide-some-renderer-info.html [ Failure ]
36383643
webkit.org/b/192435 fast/css-custom-paint/leaks.html [ Failure ]
36393644

3640-
webkit.org/b/162815 fast/text/variations/font-face-clamp.html [ ImageOnlyFailure ]
3641-
webkit.org/b/162815 fast/text/variations/font-selection-properties.html [ ImageOnlyFailure ]
3642-
webkit.org/b/162815 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ]
3643-
36443645
#////////////////////////////////////////////////////////////////////////////////////////
36453646
# End of non-crashing, non-flaky tests failing
36463647
#////////////////////////////////////////////////////////////////////////////////////////
19 Bytes
Loading

LayoutTests/platform/gtk/mathml/opentype/opentype-stretchy-expected.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
layer at (0,0) size 800x600
22
RenderView at (0,0) size 800x600
3-
layer at (0,0) size 800x350
4-
RenderBlock {HTML} at (0,0) size 800x350
5-
RenderBody {BODY} at (8,16) size 784x318
3+
layer at (0,0) size 800x339
4+
RenderBlock {HTML} at (0,0) size 800x339
5+
RenderBody {BODY} at (8,16) size 784x307
66
RenderBlock {P} at (0,0) size 784x35
77
RenderMathMLMath {math} at (0,20) size 26x11
88
RenderMathMLRow {mrow} at (0,0) size 26x11
@@ -35,10 +35,10 @@ layer at (0,0) size 800x350
3535
RenderText {#text} at (0,-3) size 2x0
3636
text run at (0,-3) width 2: "\x{219F}"
3737
RenderText {#text} at (0,0) size 0x0
38-
RenderBlock {P} at (0,221) size 784x97
39-
RenderMathMLMath {math} at (0,0) size 94x93
40-
RenderMathMLRow {mrow} at (0,0) size 94x93
41-
RenderMathMLOperator {mo} at (0,0) size 94x93
38+
RenderBlock {P} at (0,221) size 784x86
39+
RenderMathMLMath {math} at (0,0) size 84x82
40+
RenderMathMLRow {mrow} at (0,0) size 84x82
41+
RenderMathMLOperator {mo} at (0,0) size 84x82
4242
RenderBlock (anonymous) at (0,0) size 10x12
4343
RenderText {#text} at (0,6) size 10x0
4444
text run at (0,6) width 10: "\x{2A1B}"

Source/WebCore/ChangeLog

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
2018-12-12 Michael Catanzaro <[email protected]>
2+
3+
Unreviewed manual rollout of r239100-r239102 and r239114
4+
https://bugs.webkit.org/show_bug.cgi?id=192151
5+
<rdar://problem/46655586>
6+
7+
* css/CSSFontFaceSource.cpp:
8+
(WebCore::CSSFontFaceSource::font):
9+
* loader/cache/CachedFont.cpp:
10+
(WebCore::CachedFont::platformDataFromCustomData):
11+
* platform/FreeType.cmake:
12+
* platform/graphics/FontPlatformData.h:
13+
(WebCore::FontPlatformData::isFixedWidth const): Deleted.
14+
* platform/graphics/cairo/FontCustomPlatformData.h:
15+
* platform/graphics/freetype/FontCacheFreeType.cpp:
16+
(WebCore::FontCache::systemFallbackForCharacters):
17+
(WebCore::FontCache::createFontPlatformData):
18+
(WebCore::getFontPropertiesFromPattern): Deleted.
19+
(WebCore::defaultVariationValues): Deleted.
20+
(WebCore::buildVariationSettings): Deleted.
21+
* platform/graphics/freetype/FontCacheFreeType.h: Removed.
22+
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
23+
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
24+
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
25+
(WebCore::FontCustomPlatformData::fontPlatformData):
26+
(WebCore::FontCustomPlatformData::supportsFormat):
27+
(WebCore::defaultFontconfigOptions): Deleted.
28+
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
29+
(WebCore::setCairoFontOptionsFromFontConfigPattern):
30+
(WebCore::getDefaultFontconfigOptions):
31+
(WebCore::FontPlatformData::FontPlatformData):
32+
(WebCore::FontPlatformData::operator=):
33+
(WebCore::FontPlatformData::harfBuzzFace const):
34+
(WebCore::FontPlatformData::platformIsEqual const):
35+
(WebCore::FontPlatformData::buildScaledFont):
36+
(WebCore::FontPlatformData::fcPattern const): Deleted.
37+
(WebCore::FontPlatformData::createOpenTypeMathHarfBuzzFont const): Deleted.
38+
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
39+
(WebCore::Font::platformCreateScaledFont const):
40+
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
41+
(WebCore::fontFeatures):
42+
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
43+
(WebCore::floatToHarfBuzzPosition): Deleted.
44+
(WebCore::doubleToHarfBuzzPosition): Deleted.
45+
(WebCore::harfBuzzFontFunctions): Deleted.
46+
(WebCore::findScriptForVerticalGlyphSubstitution): Deleted.
47+
* platform/graphics/harfbuzz/HarfBuzzFace.cpp: Added.
48+
(WebCore::HarfBuzzFace::CacheEntry::CacheEntry):
49+
(WebCore::HarfBuzzFace::CacheEntry::~CacheEntry):
50+
(WebCore::HarfBuzzFace::cache):
51+
(WebCore::HarfBuzzFace::HarfBuzzFace):
52+
(WebCore::HarfBuzzFace::~HarfBuzzFace):
53+
(WebCore::findScriptForVerticalGlyphSubstitution):
54+
(WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution):
55+
* platform/graphics/harfbuzz/HarfBuzzFace.h: Added.
56+
(WebCore::HarfBuzzFace::CacheEntry::create):
57+
(WebCore::HarfBuzzFace::CacheEntry::face):
58+
(WebCore::HarfBuzzFace::CacheEntry::glyphCache):
59+
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Added.
60+
(WebCore::floatToHarfBuzzPosition):
61+
(WebCore::doubleToHarfBuzzPosition):
62+
(WebCore::CairoGetGlyphWidthAndExtents):
63+
(WebCore::harfBuzzGetGlyph):
64+
(WebCore::harfBuzzGetGlyphHorizontalAdvance):
65+
(WebCore::harfBuzzGetGlyphHorizontalOrigin):
66+
(WebCore::harfBuzzGetGlyphExtents):
67+
(WebCore::harfBuzzCairoTextGetFontFuncs):
68+
(WebCore::harfBuzzCairoGetTable):
69+
(WebCore::HarfBuzzFace::createFace):
70+
(WebCore::HarfBuzzFace::createFont):
71+
* platform/graphics/harfbuzz/HbUniquePtr.h:
72+
(WebCore::HbPtrDeleter<hb_face_t>::operator() const): Deleted.
73+
* platform/graphics/opentype/OpenTypeMathData.cpp:
74+
(WebCore::OpenTypeMathData::OpenTypeMathData):
75+
* platform/graphics/win/FontCustomPlatformData.cpp:
76+
(WebCore::FontCustomPlatformData::fontPlatformData):
77+
* platform/graphics/win/FontCustomPlatformData.h:
78+
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
79+
(WebCore::FontCustomPlatformData::fontPlatformData):
80+
181
2018-12-12 Chris Dumez <[email protected]>
282

383
Unreviewed attempt to fix Windows Cairo build after r239100.

Source/WebCore/css/CSSFontFaceSource.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ RefPtr<Font> CSSFontFaceSource::font(const FontDescription& fontDescription, boo
232232
return nullptr;
233233
if (!m_inDocumentCustomPlatformData)
234234
return nullptr;
235+
#if PLATFORM(COCOA)
235236
return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities), Font::Origin::Remote);
237+
#else
238+
return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic), Font::Origin::Remote);
239+
#endif
236240
#endif
237241

238242
ASSERT_NOT_REACHED();

Source/WebCore/loader/cache/CachedFont.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,14 @@ FontPlatformData CachedFont::platformDataFromCustomData(const FontDescription& f
141141

142142
FontPlatformData CachedFont::platformDataFromCustomData(FontCustomPlatformData& fontCustomPlatformData, const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
143143
{
144+
#if PLATFORM(COCOA)
144145
return fontCustomPlatformData.fontPlatformData(fontDescription, bold, italic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
146+
#else
147+
UNUSED_PARAM(fontFaceFeatures);
148+
UNUSED_PARAM(fontFaceVariantSettings);
149+
UNUSED_PARAM(fontFaceCapabilities);
150+
return fontCustomPlatformData.fontPlatformData(fontDescription, bold, italic);
151+
#endif
145152
}
146153

147154
void CachedFont::allClientsRemoved()

Source/WebCore/platform/FreeType.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ list(APPEND WebCore_SOURCES
1111
platform/graphics/freetype/SimpleFontDataFreeType.cpp
1212

1313
platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
14+
platform/graphics/harfbuzz/HarfBuzzFace.cpp
1415
)
1516

1617
if (PORT STREQUAL "GTK")
@@ -26,6 +27,8 @@ endif ()
2627
if (USE_CAIRO)
2728
list(APPEND WebCore_SOURCES
2829
platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
30+
31+
platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
2932
)
3033
endif ()
3134

Source/WebCore/platform/graphics/FontPlatformData.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#if USE(FREETYPE)
4242
#include "FcUniquePtr.h"
43-
#include "HbUniquePtr.h"
43+
#include "HarfBuzzFace.h"
4444
#include "RefPtrFontconfig.h"
4545
#include <memory>
4646
#endif
@@ -112,7 +112,8 @@ class FontPlatformData {
112112
#endif
113113

114114
#if USE(FREETYPE)
115-
FontPlatformData(cairo_font_face_t*, FcPattern*, float size, bool fixedWidth, bool syntheticBold, bool syntheticOblique, FontOrientation);
115+
FontPlatformData(FcPattern*, const FontDescription&);
116+
FontPlatformData(cairo_font_face_t*, const FontDescription&, bool syntheticBold, bool syntheticOblique);
116117
FontPlatformData(const FontPlatformData&);
117118
FontPlatformData(FontPlatformData&&) = default;
118119
FontPlatformData& operator=(const FontPlatformData&);
@@ -168,10 +169,8 @@ class FontPlatformData {
168169
#endif
169170

170171
#if USE(FREETYPE)
171-
HbUniquePtr<hb_font_t> createOpenTypeMathHarfBuzzFont() const;
172+
HarfBuzzFace& harfBuzzFace() const;
172173
bool hasCompatibleCharmap() const;
173-
FcPattern* fcPattern() const;
174-
bool isFixedWidth() const { return m_fixedWidth; }
175174
#endif
176175

177176
unsigned hash() const;
@@ -249,6 +248,7 @@ class FontPlatformData {
249248

250249
#if USE(FREETYPE)
251250
RefPtr<FcPattern> m_pattern;
251+
mutable std::unique_ptr<HarfBuzzFace> m_harfBuzzFace;
252252
#endif
253253

254254
// The values below are common to all ports

0 commit comments

Comments
 (0)