Bug 272676 - Rename screenDPI() to fontDPI() where used for font scaling
Summary: Rename screenDPI() to fontDPI() where used for font scaling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Minor
Assignee: Diego Pino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-15 07:37 PDT by Glen Whitney
Modified: 2024-04-17 04:54 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glen Whitney 2024-04-15 07:37:55 PDT
As reported in https://bugs.webkit.org/show_bug.cgi?id=247980, WebKitGTK has display and font scaling issues on certain combinations of display pixel density and GTK settings. Based on the code and the proposed fix in https://github.com/WebKit/WebKit/pull/26938, it appears that these problems have arisen because in the GTK context, "screenDPI" in some places in the code refers to the pixel density of the underlying display, whereas in others it refers to a nominal DPI used for the purposes of scaling fonts. The latter uses should be renamed as fontDPI. This bug is being filed at @mcatanzaro's suggestion to provide an associated bug for the renaming PR https://github.com/WebKit/WebKit/pull/26954.
Comment 1 Glen Whitney 2024-04-15 09:42:39 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26954
Comment 2 EWS 2024-04-16 02:50:13 PDT
Committed 277537@main (51f27458d0d4): <https://commits.webkit.org/277537@main>

Reviewed commits have been landed. Closing PR #26954 and removing active labels.
Comment 3 Diego Pino 2024-04-17 02:24:54 PDT
The WPE-Linux-ARM32-bit-Release-Debian-Stable-Build bot is failing after this change with the following error:

```
/usr/bin/ld: Source/WebCore/CMakeFiles/WebCore.dir/./__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-81.cpp.o: in function `WebCore::fontDPI()':
UnifiedSource-3c72abbe-81.cpp:(.text._ZN7WebCore7fontDPIEv+0x2): undefined reference to `WebCore::primaryScreenDisplayID()'
collect2: error: ld returned 1 exit status
[1953/2173] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-30.cpp.o
```

This bot builds with the flag `--cmakeargs=-DENABLE_WPE_PLATFORM_DRM=OFF`.
Comment 4 Diego Pino 2024-04-17 02:25:58 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/27378
Comment 5 EWS 2024-04-17 04:54:09 PDT
Committed 277609@main (8965f9b7d1be): <https://commits.webkit.org/277609@main>

Reviewed commits have been landed. Closing PR #27378 and removing active labels.