[webkit-changes] [WebKit/WebKit] 34e130: [GLIB] Disable hinting for testing

Vitaly Dyachkov noreply at github.com
Fri Feb 17 06:17:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 34e13090c6050e91fd0b20bdab40f1dbcf404520
      https://github.com/WebKit/WebKit/commit/34e13090c6050e91fd0b20bdab40f1dbcf404520
  Author: Vitaly Dyachkov <vitaly at igalia.com>
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  Changed paths:
    A LayoutTests/platform/glib/accessibility/math-multiscript-attributes-expected.txt
    A LayoutTests/platform/glib/css1/font_properties/font-expected.txt
    A LayoutTests/platform/glib/css1/pseudo/multiple_pseudo_elements-expected.txt
    A LayoutTests/platform/glib/css2.1/t051201-c23-first-line-00-b-expected.txt
    A LayoutTests/platform/glib/css2.1/t1508-c527-font-04-b-expected.txt
    A LayoutTests/platform/glib/css2.1/t1508-c527-font-05-b-expected.txt
    A LayoutTests/platform/glib/css2.1/t1508-c527-font-07-b-expected.txt
    A LayoutTests/platform/glib/css2.1/t1508-c527-font-10-c-expected.txt
    A LayoutTests/platform/glib/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt
    A LayoutTests/platform/glib/fast/block/lineboxcontain/glyphs-expected.txt
    A LayoutTests/platform/glib/fast/multicol/tall-image-behavior-expected.txt
    A LayoutTests/platform/glib/fast/text/international/vertical-text-glyph-test-expected.txt
    A LayoutTests/platform/glib/fast/text/international/vertical-text-metrics-test-expected.txt
    A LayoutTests/platform/glib/fast/writing-mode/border-vertical-lr-expected.txt
    A LayoutTests/platform/glib/fast/writing-mode/japanese-lr-text-expected.txt
    A LayoutTests/platform/glib/fast/writing-mode/japanese-rl-text-expected.txt
    A LayoutTests/platform/glib/mathml/opentype/horizontal-expected.txt
    A LayoutTests/platform/glib/mathml/opentype/horizontal-munderover-expected.txt
    A LayoutTests/platform/glib/mathml/opentype/large-operators-expected.txt
    A LayoutTests/platform/glib/mathml/opentype/vertical-expected.txt
    A LayoutTests/platform/glib/mathml/presentation/bug159513-expected.txt
    A LayoutTests/platform/glib/mathml/presentation/mo-stretch-expected.txt
    A LayoutTests/platform/glib/mathml/presentation/roots-expected.txt
    A LayoutTests/platform/glib/svg/batik/text/verticalText-expected.txt
    A LayoutTests/platform/glib/tables/mozilla/bugs/bug2886-2-expected.txt
    R LayoutTests/platform/gtk/accessibility/math-multiscript-attributes-expected.txt
    R LayoutTests/platform/gtk/css1/font_properties/font-expected.txt
    R LayoutTests/platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.txt
    R LayoutTests/platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.txt
    R LayoutTests/platform/gtk/css2.1/t1508-c527-font-04-b-expected.txt
    R LayoutTests/platform/gtk/css2.1/t1508-c527-font-05-b-expected.txt
    R LayoutTests/platform/gtk/css2.1/t1508-c527-font-07-b-expected.txt
    R LayoutTests/platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt
    R LayoutTests/platform/gtk/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt
    R LayoutTests/platform/gtk/fast/block/lineboxcontain/glyphs-expected.txt
    R LayoutTests/platform/gtk/fast/multicol/tall-image-behavior-expected.txt
    R LayoutTests/platform/gtk/fast/text/international/vertical-text-glyph-test-expected.txt
    R LayoutTests/platform/gtk/fast/text/international/vertical-text-metrics-test-expected.txt
    R LayoutTests/platform/gtk/fast/writing-mode/border-vertical-lr-expected.txt
    R LayoutTests/platform/gtk/fast/writing-mode/japanese-lr-text-expected.txt
    R LayoutTests/platform/gtk/fast/writing-mode/japanese-rl-text-expected.txt
    R LayoutTests/platform/gtk/mathml/opentype/horizontal-expected.txt
    R LayoutTests/platform/gtk/mathml/opentype/horizontal-munderover-expected.txt
    R LayoutTests/platform/gtk/mathml/opentype/large-operators-expected.txt
    R LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt
    R LayoutTests/platform/gtk/mathml/presentation/bug159513-expected.txt
    R LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt
    R LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt
    R LayoutTests/platform/gtk/svg/batik/text/verticalText-expected.txt
    R LayoutTests/platform/gtk/tables/mozilla/bugs/bug2886-2-expected.txt
    R LayoutTests/platform/wpe/accessibility/math-multiscript-attributes-expected.txt
    R LayoutTests/platform/wpe/css1/font_properties/font-expected.txt
    R LayoutTests/platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt
    R LayoutTests/platform/wpe/css2.1/t051201-c23-first-line-00-b-expected.txt
    R LayoutTests/platform/wpe/css2.1/t1508-c527-font-04-b-expected.txt
    R LayoutTests/platform/wpe/css2.1/t1508-c527-font-05-b-expected.txt
    R LayoutTests/platform/wpe/css2.1/t1508-c527-font-07-b-expected.txt
    R LayoutTests/platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt
    R LayoutTests/platform/wpe/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt
    R LayoutTests/platform/wpe/fast/block/lineboxcontain/glyphs-expected.txt
    R LayoutTests/platform/wpe/fast/multicol/tall-image-behavior-expected.txt
    R LayoutTests/platform/wpe/fast/text/international/vertical-text-glyph-test-expected.txt
    R LayoutTests/platform/wpe/fast/text/international/vertical-text-metrics-test-expected.txt
    R LayoutTests/platform/wpe/fast/writing-mode/border-vertical-lr-expected.txt
    R LayoutTests/platform/wpe/fast/writing-mode/japanese-lr-text-expected.txt
    R LayoutTests/platform/wpe/fast/writing-mode/japanese-rl-text-expected.txt
    R LayoutTests/platform/wpe/mathml/opentype/horizontal-expected.txt
    R LayoutTests/platform/wpe/mathml/opentype/horizontal-munderover-expected.txt
    R LayoutTests/platform/wpe/mathml/opentype/large-operators-expected.txt
    R LayoutTests/platform/wpe/mathml/opentype/vertical-expected.txt
    R LayoutTests/platform/wpe/mathml/presentation/bug159513-expected.txt
    R LayoutTests/platform/wpe/mathml/presentation/mo-stretch-expected.txt
    R LayoutTests/platform/wpe/mathml/presentation/roots-expected.txt
    R LayoutTests/platform/wpe/svg/batik/text/verticalText-expected.txt
    R LayoutTests/platform/wpe/tables/mozilla/bugs/bug2886-2-expected.txt
    M Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
    M Source/WebCore/platform/graphics/cairo/CairoUtilities.h
    M Source/WebKit/Shared/WebProcessCreationParameters.cpp
    M Source/WebKit/Shared/WebProcessCreationParameters.h
    M Source/WebKit/SourcesGTK.txt
    M Source/WebKit/SourcesWPE.txt
    M Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
    M Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
    A Source/WebKit/UIProcess/API/C/glib/WKContextConfigurationGlib.cpp
    A Source/WebKit/UIProcess/API/C/glib/WKContextConfigurationGlib.h
    M Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
    M Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
    M Source/WebKit/WebProcess/gtk/GtkSettingsManagerProxy.cpp
    M Source/WebKit/WebProcess/gtk/GtkSettingsManagerProxy.h
    M Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/gtk/main.cpp

  Log Message:
  -----------
  [GLIB] Disable hinting for testing
https://bugs.webkit.org/show_bug.cgi?id=251912

Reviewed by Carlos Garcia Campos.

There are some tests that differ between GTK and WPE because GTK
`WebKitTestRunner` disables font hinting. It does it by using
`GtkSettingsManager` mechanism which doesn't exist on WPE.

This patch introduces a new boolean WebProcess creation parameter
`disableFontHintingForTesting`. When set by `WebKitTestRunner`,
`CAIRO_HINT_METRICS_OFF` and `CAIRO_HINT_STYLE_NONE` will be applied
to `defaultCairoFontOptions`, and all subsequent calls of
`setDefaultCairoHintOptions()` will do nothing.

It let us reuse the same baselines for some tests.

* LayoutTests/platform/glib/accessibility/math-multiscript-attributes-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/math-multiscript-attributes-expected.txt.
* LayoutTests/platform/glib/css1/font_properties/font-expected.txt: Renamed from LayoutTests/platform/gtk/css1/font_properties/font-expected.txt.
* LayoutTests/platform/glib/css1/pseudo/multiple_pseudo_elements-expected.txt: Renamed from LayoutTests/platform/gtk/css1/pseudo/multiple_pseudo_elements-expected.txt.
* LayoutTests/platform/glib/css2.1/t051201-c23-first-line-00-b-expected.txt: Renamed from LayoutTests/platform/gtk/css2.1/t051201-c23-first-line-00-b-expected.txt.
* LayoutTests/platform/glib/css2.1/t1508-c527-font-04-b-expected.txt: Renamed from LayoutTests/platform/gtk/css2.1/t1508-c527-font-04-b-expected.txt.
* LayoutTests/platform/glib/css2.1/t1508-c527-font-05-b-expected.txt: Renamed from LayoutTests/platform/gtk/css2.1/t1508-c527-font-05-b-expected.txt.
* LayoutTests/platform/glib/css2.1/t1508-c527-font-07-b-expected.txt: Renamed from LayoutTests/platform/gtk/css2.1/t1508-c527-font-07-b-expected.txt.
* LayoutTests/platform/glib/css2.1/t1508-c527-font-10-c-expected.txt: Renamed from LayoutTests/platform/gtk/css2.1/t1508-c527-font-10-c-expected.txt.
* LayoutTests/platform/glib/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt: Renamed from LayoutTests/platform/gtk/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt.
* LayoutTests/platform/glib/fast/block/lineboxcontain/glyphs-expected.txt: Renamed from LayoutTests/platform/gtk/fast/block/lineboxcontain/glyphs-expected.txt.
* LayoutTests/platform/glib/fast/multicol/tall-image-behavior-expected.txt: Renamed from LayoutTests/platform/gtk/fast/multicol/tall-image-behavior-expected.txt.
* LayoutTests/platform/glib/fast/text/international/vertical-text-glyph-test-expected.txt: Renamed from LayoutTests/platform/gtk/fast/text/international/vertical-text-glyph-test-expected.txt.
* LayoutTests/platform/glib/fast/text/international/vertical-text-metrics-test-expected.txt: Renamed from LayoutTests/platform/gtk/fast/text/international/vertical-text-metrics-test-expected.txt.
* LayoutTests/platform/glib/fast/writing-mode/border-vertical-lr-expected.txt: Renamed from LayoutTests/platform/gtk/fast/writing-mode/border-vertical-lr-expected.txt.
* LayoutTests/platform/glib/fast/writing-mode/japanese-lr-text-expected.txt: Renamed from LayoutTests/platform/gtk/fast/writing-mode/japanese-lr-text-expected.txt.
* LayoutTests/platform/glib/fast/writing-mode/japanese-rl-text-expected.txt: Renamed from LayoutTests/platform/gtk/fast/writing-mode/japanese-rl-text-expected.txt.
* LayoutTests/platform/glib/mathml/opentype/horizontal-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/opentype/horizontal-expected.txt.
* LayoutTests/platform/glib/mathml/opentype/horizontal-munderover-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/opentype/horizontal-munderover-expected.txt.
* LayoutTests/platform/glib/mathml/opentype/large-operators-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/opentype/large-operators-expected.txt.
* LayoutTests/platform/glib/mathml/opentype/vertical-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/opentype/vertical-expected.txt.
* LayoutTests/platform/glib/mathml/presentation/bug159513-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/presentation/bug159513-expected.txt.
* LayoutTests/platform/glib/mathml/presentation/mo-stretch-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/presentation/mo-stretch-expected.txt.
* LayoutTests/platform/glib/mathml/presentation/roots-expected.txt: Renamed from LayoutTests/platform/gtk/mathml/presentation/roots-expected.txt.
* LayoutTests/platform/glib/svg/batik/text/verticalText-expected.txt: Renamed from LayoutTests/platform/gtk/svg/batik/text/verticalText-expected.txt.
* LayoutTests/platform/glib/tables/mozilla/bugs/bug2886-2-expected.txt: Renamed from LayoutTests/platform/gtk/tables/mozilla/bugs/bug2886-2-expected.txt.
* LayoutTests/platform/wpe/accessibility/math-multiscript-attributes-expected.txt: Removed.
* LayoutTests/platform/wpe/css1/font_properties/font-expected.txt: Removed.
* LayoutTests/platform/wpe/css1/pseudo/multiple_pseudo_elements-expected.txt: Removed.
* LayoutTests/platform/wpe/css2.1/t051201-c23-first-line-00-b-expected.txt: Removed.
* LayoutTests/platform/wpe/css2.1/t1508-c527-font-04-b-expected.txt: Removed.
* LayoutTests/platform/wpe/css2.1/t1508-c527-font-05-b-expected.txt: Removed.
* LayoutTests/platform/wpe/css2.1/t1508-c527-font-07-b-expected.txt: Removed.
* LayoutTests/platform/wpe/css2.1/t1508-c527-font-10-c-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/block/lineboxcontain/glyphs-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/multicol/tall-image-behavior-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/text/international/vertical-text-glyph-test-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/text/international/vertical-text-metrics-test-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/writing-mode/border-vertical-lr-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/writing-mode/japanese-lr-text-expected.txt: Removed.
* LayoutTests/platform/wpe/fast/writing-mode/japanese-rl-text-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/opentype/horizontal-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/opentype/horizontal-munderover-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/opentype/large-operators-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/opentype/vertical-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/presentation/bug159513-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/presentation/mo-stretch-expected.txt: Removed.
* LayoutTests/platform/wpe/mathml/presentation/roots-expected.txt: Removed.
* LayoutTests/platform/wpe/svg/batik/text/verticalText-expected.txt: Removed.
* LayoutTests/platform/wpe/tables/mozilla/bugs/bug2886-2-expected.txt: Removed.
* Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::getDefaultCairoFontOptions):
(WebCore::setDefaultCairoFontOptionsForTesting):
* Source/WebCore/platform/graphics/cairo/CairoUtilities.h:
* Source/WebKit/Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h:
* Source/WebKit/UIProcess/API/C/glib/WKContextConfigurationGlib.cpp: Added.
(WKContextConfigurationOverrideDefaultCairoFontOptionsForTesting):
(WKContextConfigurationSetOverrideDefaultCairoFontOptionsForTesting):
* Source/WebKit/UIProcess/API/C/glib/WKContextConfigurationGlib.h: Added.
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::generateContextConfiguration const):
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/gtk/main.cpp:
(initializeGtkSettings):

Canonical link: https://commits.webkit.org/260443@main




More information about the webkit-changes mailing list