Bug 131347

Summary: [GTK] Several hidpi tests are failing
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED    
Severity: Normal CC: adrien-xx-webkit, aperez, badshah400, bugs-noreply, cgarcia, clopez, gwhitneycom5, jonnylamb, mcatanzaro, mrobinson, otaylor, rishi.is, tpopela
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Add HighDPI support.
none
webkitgtk.org in MiniBrowser on 283dpi screen
none
webkitgtk.org in Firefox on 283 dpi screen
none
webkitgtk.org in MiniBrowser with GDK_SCALE=3 on 283 dpi screen none

Martin Robinson
Reported 2014-04-07 23:04:14 PDT
We need support for getting the scaling factor from the system.
Attachments
Add HighDPI support. (25.30 KB, patch)
2014-12-19 13:52 PST, Michael Kuhn
no flags
webkitgtk.org in MiniBrowser on 283dpi screen (1.67 MB, image/png)
2022-11-15 14:27 PST, Glen Whitney
no flags
webkitgtk.org in Firefox on 283 dpi screen (2.91 MB, image/png)
2022-11-15 14:28 PST, Glen Whitney
no flags
webkitgtk.org in MiniBrowser with GDK_SCALE=3 on 283 dpi screen (2.53 MB, image/png)
2022-11-15 14:29 PST, Glen Whitney
no flags
Owen Taylor
Comment 1 2014-04-08 04:54:18 PDT
The status of this is that I patches that I think are fine (http://fishsoup.net/misc/webkit-hidpi-patches), but testing them in the test framework: - Requires rebasing the reference build to a newer version of GTK+/cairo/etc - which creates some amount of new failures in the test suite - Would require rebasing the reference build to a Git snapshot of cairo I've been spending some effort trying to get a cairo release released.
Atri Bhattacharya
Comment 2 2014-12-11 20:41:26 PST
Hi! Is there a released version of webkitgtk that carries the hidpi patches? I have version 2.4.6 built against the recent cairo (1.14.0) but I still see very fuzzy text on hidpi displays. Thanks.
Michael Kuhn
Comment 3 2014-12-19 13:52:42 PST
Created attachment 243575 [details] Add HighDPI support. Because HighDPI support is only available in WebKitGTK 2.6 and quite a few applications (Evolution, Empathy, …) still depend on 2.4, I have backported the patches from 2.6 and adapted some of the patches found at the previously posted link for 2.4. The attached patch applies to 2.4.7 and seems to work based on local tests.
Michael Catanzaro
Comment 4 2015-04-08 14:47:20 PDT
My understanding is that this feature is complete in 2.6.0, and no further patches are needed. That sound right, Owen? (Thanks for your help!) Regarding backporting to 2.4: I'm indifferent. There is one big advantage to not backporting new features: it's incentive for apps to upgrade to modern WebKit.
Carlos Garcia Campos
Comment 5 2015-05-18 05:40:39 PDT
(In reply to comment #3) > Created attachment 243575 [details] > Add HighDPI support. > > Because HighDPI support is only available in WebKitGTK 2.6 and quite a few > applications (Evolution, Empathy, …) still depend on 2.4, I have backported > the patches from 2.6 and adapted some of the patches found at the previously > posted link for 2.4. > > The attached patch applies to 2.4.7 and seems to work based on local tests. Merged in 2.4 http://trac.webkit.org/changeset/184466
Carlos Alberto Lopez Perez
Comment 6 2015-07-08 10:48:50 PDT
The following two tests have started working with the upgrade of GTK+, Cairo, Gdk-Pixbuf and GLib done in r186500 <http://trac.webkit.org/r186500>. fast/hidpi/image-srcset-change-dynamically-from-js-2x.html fast/hidpi/image-srcset-fraction-1.5x.html fast/hidpi/image-srcset-fraction.html fast/hidpi/image-srcset-invalid-inputs-except-one.html fast/hidpi/image-srcset-simple-2x.html fast/hidpi/image-srcset-src-selection-2x.html And this new others have started to fail: fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html fast/hidpi/filters-blur.html fast/hidpi/filters-hue-rotate.html fast/hidpi/filters-invert.html fast/hidpi/filters-multiple.html fast/hidpi/filters-reference.html I have updated the expectations file on http://trac.webkit.org/changeset/186513
Michael Catanzaro
Comment 7 2016-01-30 08:52:01 PST
The following failing tests were marked against this bug despite not being mentioned here. Reopening until these are fixed: webkit.org/b/131347 fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html [ ImageOnlyFailure Pass ] webkit.org/b/131347 fast/borders/hidpi-border-image-gradient-on-subpixels.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/borders/hidpi-double-border-with-border-radius-always-produce-solid-line.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/borders/hidpi-simple-hairline-border-painting.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/hidpi/clip-text-in-hidpi.html [ Failure Pass Missing ] webkit.org/b/131347 fast/hidpi/image-set-background-dynamic.html [ Failure Pass Missing ] webkit.org/b/131347 fast/hidpi/image-set-border-image-dynamic.html [ Failure Pass Missing ] webkit.org/b/131347 fast/hidpi/image-srcset-png-canvas.html [ ImageOnlyFailure Pass ] webkit.org/b/131347 fast/hidpi/filters-morphology.html [ ImageOnlyFailure Pass ] webkit.org/b/131347 fast/inline-block/hidpi-margin-top-with-subpixel-value-and-overflow-hidden.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/inline/hidpi-inline-selection-leaves-gap.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/inline/hidpi-inline-text-decoration-with-subpixel-value.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/inline/hidpi-select-inline-on-subpixel-position.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/layers/hidpi-box-positioned-off-by-one-when-transform-is-present.html [ ImageOnlyFailure ] webkit.org/b/131347 fast/layers/hidpi-transform-on-child-content-is-mispositioned.html [ Crash ImageOnlyFailure Pass ] webkit.org/b/131347 fast/repaint/hidpi-absolute-positioned-element-wrong-cliprect-after-move.html [ Failure ] webkit.org/b/131347 fast/repaint/hidpi-content-inside-iframe-leaves-trails.html [ Failure ] webkit.org/b/131347 fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html [ Failure ] webkit.org/b/131347 fast/repaint/hidpi-transform-on-subpixel-repaintrect.html [ Failure ] webkit.org/b/131347 fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html [ Failure ] webkit.org/b/131347 svg/custom/hidpi-masking-clipping.svg [ Failure ImageOnlyFailure Timeout ] webkit.org/b/131347 svg/text/hidpi-text-selection-rect-position.html [ ImageOnlyFailure ]
Michael Catanzaro
Comment 8 2016-01-30 08:52:37 PST
Note that the tests Carlos Lopez mentioned in comment #6 have a separate bug, bug #146731.
Michael Catanzaro
Comment 9 2016-04-09 10:32:21 PDT
(In reply to comment #7) > fast/borders/hidpi-border-image-gradient-on-subpixels.html [ > ImageOnlyFailure ] This one is fixed since r199034. Updated expectations in r199270.
Carlos Alberto Lopez Perez
Comment 10 2016-05-05 13:17:36 PDT
More hidpi tests failing: http/tests/loading/hidpi-preload-picture-sizes.html fails since it was added on r194865. It is only test of 4 that were added on that rev that fails. fast/hidpi/filters-morphology.html now crashes also. fast/table/hidpi-collapsed-border-with-odd-pixel-width.html fails since it was added on r197524 And so on... I have updated the list of hidpi tests currently failing on: http://trac.webkit.org/changeset/200472/trunk/LayoutTests/platform/gtk/TestExpectations Question (for those with a hidpi screen)... Do we even support hidpi? If we support it.. maybe this tests are failing because of the GTK+ version that we use on the JHBuild or something like that?
Michael Catanzaro
Comment 11 2016-05-05 16:03:16 PDT
(In reply to comment #10) > Do we even support hidpi? Yes, our hidpi support is reportedly very good relative to our competitors. Firefox requires manually tweaking some hidden about:config setting so it's broken for all but expert users, for example. > If we support it.. maybe this tests are failing because of the GTK+ version > that we use on the JHBuild or something like that? No way, our GTK+ is plenty new enough.
Martin Robinson
Comment 12 2016-05-05 16:11:43 PDT
(In reply to comment #11) > (In reply to comment #10) > > Do we even support hidpi? > > Yes, our hidpi support is reportedly very good relative to our competitors. > Firefox requires manually tweaking some hidden about:config setting so it's > broken for all but expert users, for example. Weird. I have a hidpi laptop and scaling seems to be working fine in Firefox, but perhaps it is broken in some more subtle way.
Debarshi Ray
Comment 13 2016-05-06 00:35:20 PDT
I have been using HiDpi for the last 2 years. (In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #10) > > > Do we even support hidpi? > > > > Yes, our hidpi support is reportedly very good relative to our competitors. Yes, the Epiphany / WebKitGTK+ combo definitely supports HiDpi. It has been that way ever since I first tried them on such hardware. > > Firefox requires manually tweaking some hidden about:config setting so it's > > broken for all but expert users, for example. > > Weird. I have a hidpi laptop and scaling seems to be working fine in > Firefox, but perhaps it is broken in some more subtle way. Things have recently improved in Firefox. Recent versions of Fedora build Firefox with GTK+ 3.x and those have HiDpi support out of the box. However, this wasn't always the case. Back when I first started using HiDpi things would show up really tiny in both Firefox and Chrome. As Michael says, the former had some about:config setting that could be tweaked to address this, but I am not aware of any such knob in Chrome.
Carlos Garcia Campos
Comment 14 2017-02-13 04:20:06 PST
*** Bug 168228 has been marked as a duplicate of this bug. ***
Glen Whitney
Comment 15 2022-11-15 14:27:24 PST
Created attachment 463540 [details] webkitgtk.org in MiniBrowser on 283dpi screen
Glen Whitney
Comment 16 2022-11-15 14:28:29 PST
Created attachment 463541 [details] webkitgtk.org in Firefox on 283 dpi screen
Glen Whitney
Comment 17 2022-11-15 14:29:19 PST
Created attachment 463542 [details] webkitgtk.org in MiniBrowser with GDK_SCALE=3 on 283 dpi screen
Glen Whitney
Comment 18 2022-11-15 14:38:09 PST
Five years on, what's the status of this issue? I ask because on my 283 dpi laptop runnning OpenSUSE Tumbleweed with their latest build of xfce 4.17, out of the box the 2.38.2 webkitgtk3 MiniBrowser renders webkitgtk.org with a very narrow main block (see first screenshot attached) whereas Firefox renders it as expected (see the second screenshot attached). Note the fonts appear basically reasonably sized in both cases, but the MiniBrowser seems to think that 960px (the width of that main block) is a very small fraction of the screen. But the screen is 13" wide, so it should be about 3/4 of the screen width, which is just about what it is in Firefox. Is there a way to tell WebkitGTK that a px should be 3 physical pixels? (I have tried GDK_SCALE=3 -- with that setting, the main block indeed comes out the roughly correct fraction of the screen, but the fonts are all way too huge, see the third screenshot I just attached. It would be desirable for WebkitGTK to simultaneously get px measurements correct and fonts the appropriate sizes.) Thanks for any status/guidance on this you can offer. In particular, these problems make html email more or less unreadable in Evolution, which would otherwise be my mail reader of choice.
Glen Whitney
Comment 19 2022-11-16 04:49:20 PST
Milan Crha, a developer/maintainer of Evolution, suggested that it could be useful for me to post at least the top of the webkit://gpu information from the MiniBrowser. So it's incorporated below. It seems as though webkitgtk has the correct information for every characteristic shown, which makes the display issues shown above appear to me to be more like a bug than misconfiguration, especially given that other browsers are fine. Thanks for your thoughts/help. ------------------------- webkit://gpu results follow ------------------- Version Information WebKit version WebKitGTK 2.38.2 (tarball) Operating system Linux 6.0.8-1-default #1 SMP PREEMPT_DYNAMIC Fri Nov 11 08:02:50 UTC 2022 (1579d93) x86_64 Desktop XFCE Cairo version 1.17.6 (build) 1.17.6 (runtime) GStreamer version 1.20.4 (build) GStreamer 1.20.4 (runtime) GTK version 3.24.34 (build) 3.24.34 (runtime) Display Information Type X11 Screen geometry 0,0 3840x2400 Screen work area 0,0 3840x2400 Depth 24 Bits per color component 8 DPI 283.00 Hardware Acceleration Information Policy always WebGL enabled Yes API OpenGL Native interface GLX GL_RENDERER Mesa Intel(R) Graphics (ADL GT2) GL_VENDOR Intel GL_VERSION 4.6 (Core Profile) Mesa 22.2.3 .... [remainder cut]
Michael Catanzaro
Comment 20 2022-11-16 07:38:43 PST
I would report a new bug for this. It's going to go unnoticed here in a layout test failure bug. I was not aware of general problems with hidpi support....
Note You need to log in before you can comment on or make changes to this bug.