Bug 180066 - [WinCairo] Wrongly placed scroll bars in HiDPI
Summary: [WinCairo] Wrongly placed scroll bars in HiDPI
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-27 22:16 PST by Fujii Hironori
Modified: 2017-12-01 10:21 PST (History)
6 users (show)

See Also:


Attachments
screenshot (267.79 KB, image/png)
2017-11-27 22:16 PST, Fujii Hironori
no flags Details
Patch (4.68 KB, patch)
2017-11-27 23:16 PST, Fujii Hironori
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-elcapitan (2.92 MB, application/zip)
2017-11-28 00:33 PST, EWS Watchlist
no flags Details
WIP patch (7.06 KB, patch)
2017-11-29 23:19 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (2.68 KB, patch)
2017-11-30 21:32 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (1.76 KB, patch)
2017-12-01 00:12 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2017-11-27 22:16:57 PST
Created attachment 327728 [details]
screenshot

See the screenshot. I tested with WinCairo port, Release build, trunk@225207, HiDPI display.
Comment 1 Fujii Hironori 2017-11-27 22:34:06 PST
Seems a relevant bug:
  Bug 169463 – [Win] Scrollbars buttons have incorrect size in HiDPI.
Comment 2 Fujii Hironori 2017-11-27 23:16:55 PST
Created attachment 327731 [details]
Patch

A screenshot with the fix. https://photos.app.goo.gl/hMKoqN1H2J2CHShD2
Comment 3 EWS Watchlist 2017-11-27 23:18:37 PST
Attachment 327731 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/win/ScrollbarThemeWin.cpp:290:  Use nullptr instead of NULL.  [readability/null] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 EWS Watchlist 2017-11-28 00:33:13 PST
Comment on attachment 327731 [details]
Patch

Attachment 327731 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/5385752

New failing tests:
webanimations/animation-opacity-animation-crash.html
Comment 5 EWS Watchlist 2017-11-28 00:33:15 PST
Created attachment 327733 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 Per Arne Vollan 2017-11-29 07:53:08 PST
Comment on attachment 327731 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=327731&action=review

> Source/WebCore/platform/win/ScrollbarThemeWin.cpp:268
> +    context.save();

You may want to consider using the GraphicsContextStateSaver class here.

> Source/WebCore/platform/win/ScrollbarThemeWin.cpp:410
> +    context.save();

Ditto.
Comment 7 Fujii Hironori 2017-11-29 23:19:32 PST
Created attachment 327956 [details]
WIP patch

This in not only scroll bars bugs, but also all RenderTheme controls which is using DrawThemeBackground.
I created a WIP patch just applying the same workaround to drawControl.
But, this doesn't solve the issues perfectly. If I scroll web pages, controls are painted at wrong places.
Comment 8 Fujii Hironori 2017-11-30 21:32:11 PST
Created attachment 328072 [details]
WIP patch
Comment 9 Fujii Hironori 2017-11-30 21:33:52 PST
Zan,

This WIP patch solves the bug. This code has been removed in Bug 179657.
Could you take a look?
Comment 10 Fujii Hironori 2017-12-01 00:12:37 PST
Created attachment 328076 [details]
Patch
Comment 11 Zan Dobersek 2017-12-01 00:52:21 PST
Comment on attachment 328076 [details]
Patch

LGTM. It's breaking the wincairo EWS though, so please commit it yourself.
Comment 12 WebKit Commit Bot 2017-12-01 10:20:09 PST
Comment on attachment 328076 [details]
Patch

Clearing flags on attachment: 328076

Committed r225397: <https://trac.webkit.org/changeset/225397>
Comment 13 WebKit Commit Bot 2017-12-01 10:20:11 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2017-12-01 10:21:34 PST
<rdar://problem/35799346>