- Revision
- 254567
- Author
- clo...@igalia.com
- Date
- 2020-01-15 06:44:06 -0800 (Wed, 15 Jan 2020)
Log Message
[GTK] Turn off antialiasing when rendering with Ahem
https://bugs.webkit.org/show_bug.cgi?id=204671
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Many CSS related tests use the "Ahem" font to compare its special
squared glyphs with the positioned elements of the test. But if
we enable antialiasing for this font, then the antialiasing of
the glyphs causes small pixel differences with the reference test.
So, this patch disables antialiasing for the Ahem font in GTK and WPE
ports. This commit its pretty much like r252701 for the Mac/iOS ports.
Covered by existing tests.
* platform/graphics/cairo/GraphicsContextImplCairo.cpp:
(WebCore::GraphicsContextImplCairo::drawGlyphs):
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
LayoutTests:
* platform/gtk/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (254566 => 254567)
--- trunk/LayoutTests/ChangeLog 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/LayoutTests/ChangeLog 2020-01-15 14:44:06 UTC (rev 254567)
@@ -1,3 +1,12 @@
+2020-01-15 Carlos Alberto Lopez Perez <clo...@igalia.com>
+
+ [GTK] Turn off antialiasing when rendering with Ahem
+ https://bugs.webkit.org/show_bug.cgi?id=204671
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/gtk/TestExpectations:
+
2020-01-15 youenn fablet <you...@apple.com>
Add support for MediaStream audio track rendering in GPUProcess
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (254566 => 254567)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2020-01-15 14:44:06 UTC (rev 254567)
@@ -3218,17 +3218,6 @@
webkit.org/b/152788 imported/mozilla/svg/filter-scaled-02.html [ ImageOnlyFailure Pass ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-basic-001.html [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-basic-002.html [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-basic-003.html [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-basic-004.html [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-rule-002.xht [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-rule-px-001.xht [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-rule-stacking-001.xht [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-shorthand-001.xht [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-span-all-block-sibling-003.xht [ ImageOnlyFailure ]
-webkit.org/b/152821 imported/w3c/web-platform-tests/css/css-multicol/multicol-span-all-margin-nested-firstchild-001.xht [ ImageOnlyFailure ]
-
webkit.org/b/152908 pageoverlay/overlay-installation.html [ Failure ]
webkit.org/b/152908 pageoverlay/overlay-large-document-scrolled.html [ Failure ]
webkit.org/b/152908 pageoverlay/overlay-large-document.html [ Failure ]
@@ -3943,42 +3932,7 @@
webkit.org/b/99036 pointer-lock/locked-element-iframe-removed-from-dom.html [ Failure ]
webkit.org/b/99036 pointer-lock/pointerlockchange-pointerlockerror-events.html [ Failure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-multicol/multicol-rule-fraction-003.xht [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-multicol/multicol-rule-shorthand-2.xht [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-001.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-002.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-003.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-004.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-005.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-006.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-007.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-008.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-009.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-010.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-014.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-015.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-016.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-end-017.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-001.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-002.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-003.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-004.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-005.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-justify-006.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-001.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-002.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-003.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-004.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-005.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-006.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-007.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-008.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-009.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-010.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-014.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-015.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-016.html [ ImageOnlyFailure ]
-webkit.org/b/204671 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-start-017.html [ ImageOnlyFailure ]
+webkit.org/b/206264 imported/w3c/web-platform-tests/css/css-multicol/multicol-gap-percentage-001.html [ Failure ]
webkit.org/b/204675 imported/w3c/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern.html [ Failure ]
webkit.org/b/204675 imported/w3c/web-platform-tests/offscreen-canvas/compositing/2d.composite.globalAlpha.canvaspattern.worker.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (254566 => 254567)
--- trunk/Source/WebCore/ChangeLog 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/Source/WebCore/ChangeLog 2020-01-15 14:44:06 UTC (rev 254567)
@@ -1,3 +1,27 @@
+2020-01-15 Carlos Alberto Lopez Perez <clo...@igalia.com>
+
+ [GTK] Turn off antialiasing when rendering with Ahem
+ https://bugs.webkit.org/show_bug.cgi?id=204671
+
+ Reviewed by Carlos Garcia Campos.
+
+ Many CSS related tests use the "Ahem" font to compare its special
+ squared glyphs with the positioned elements of the test. But if
+ we enable antialiasing for this font, then the antialiasing of
+ the glyphs causes small pixel differences with the reference test.
+
+ So, this patch disables antialiasing for the Ahem font in GTK and WPE
+ ports. This commit its pretty much like r252701 for the Mac/iOS ports.
+
+ Covered by existing tests.
+
+ * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
+ (WebCore::GraphicsContextImplCairo::drawGlyphs):
+ * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
+ (WebCore::FontCustomPlatformData::fontPlatformData):
+ * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+ (WebCore::Font::platformInit):
+
2020-01-15 Andres Gonzalez <andresg...@apple.com>
Implementation of AXIsolatedObject::press().
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp (254566 => 254567)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextImplCairo.cpp 2020-01-15 14:44:06 UTC (rev 254567)
@@ -254,6 +254,9 @@
cairo_scaled_font_t* scaledFont = font.platformData().scaledFont();
double syntheticBoldOffset = font.syntheticBoldOffset();
+ if (!font.allowsAntialiasing())
+ fontSmoothing = FontSmoothingMode::NoSmoothing;
+
auto& state = graphicsContext().state();
Cairo::drawGlyphs(m_platformContext, Cairo::FillSource(state), Cairo::StrokeSource(state),
Cairo::ShadowState(state), point, scaledFont, syntheticBoldOffset, glyphs, xOffset,
Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp (254566 => 254567)
--- trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp 2020-01-15 14:44:06 UTC (rev 254567)
@@ -79,11 +79,11 @@
{
auto* freeTypeFace = static_cast<FT_Face>(cairo_font_face_get_user_data(m_fontFace.get(), &freeTypeFaceKey));
ASSERT(freeTypeFace);
- RefPtr<FcPattern> pattern = defaultFontconfigOptions();
+ RefPtr<FcPattern> pattern = FcPatternDuplicate(defaultFontconfigOptions());
+ FcPatternAddString(pattern.get(), FC_FAMILY, reinterpret_cast<const FcChar8*>(freeTypeFace->family_name));
#if ENABLE(VARIATION_FONTS)
auto variants = buildVariationSettings(freeTypeFace, description);
if (!variants.isEmpty()) {
- pattern = adoptRef(FcPatternDuplicate(pattern.get()));
FcPatternAddString(pattern.get(), FC_FONT_VARIATIONS, reinterpret_cast<const FcChar8*>(variants.utf8().data()));
}
#endif
Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (254566 => 254567)
--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2020-01-15 14:42:44 UTC (rev 254566)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp 2020-01-15 14:44:06 UTC (rev 254567)
@@ -130,6 +130,14 @@
}
m_syntheticBoldOffset = m_platformData.syntheticBold() ? 1.0f : 0.f;
+
+ FcChar8* fontConfigFamilyName;
+ if (FcPatternGetString(m_platformData.fcPattern(), FC_FAMILY, 0, &fontConfigFamilyName) == FcResultMatch) {
+ String familyName = String::fromUTF8(reinterpret_cast<char*>(fontConfigFamilyName));
+ // Disable antialiasing for the Ahem font because many tests require this.
+ if (equalIgnoringASCIICase(familyName, "Ahem"))
+ m_allowsAntialiasing = false;
+ }
}
void Font::platformCharWidthInit()