mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1642526 - Force the macOS scrollthumbs to be drawn via the custom drawing codepath. r=mstange
The default drawing codepath requests the OS to draw it, but the OS seems to ignore the scaling factor of the transform. So when drawing scrollbars after APZ-zooming, the scrollthumbs appear abnormally thin. This patch forces us into the custom drawing codepath which gets scaled properly. Differential Revision: https://phabricator.services.mozilla.com/D92677
This commit is contained in:
parent
9abf9516ff
commit
36fe42d67a
@ -2390,6 +2390,16 @@ nsNativeThemeCocoa::ScrollbarParams nsNativeThemeCocoa::ComputeScrollbarParams(n
|
||||
params.faceColor = colors.thumb.CalcColor(*style);
|
||||
}
|
||||
}
|
||||
|
||||
// With APZ zooming, we need to be able to draw scrollbars manually because
|
||||
// the native CG drawing doesn't apply our desired scale. The easiest way to
|
||||
// do this is set the custom flag with the default scrollbar colors.
|
||||
if (!params.custom) {
|
||||
params.custom = true;
|
||||
params.trackColor = NS_RGBA(250, 250, 250, 255);
|
||||
params.faceColor = NS_RGBA(194, 194, 194, 255);
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -3,3 +3,4 @@ fuzzy-if(Android,0-17,0-1120) fuzzy-if(webrender,0-8,0-480) == meter-native-styl
|
||||
skip-if(!cocoaWidget) == meter-vertical-native-style.html meter-vertical-native-style-ref.html # dithering
|
||||
== meter-fallback-default-style.html meter-fallback-default-style-ref.html
|
||||
load 664925.xhtml
|
||||
pref(apz.allow_zooming,true) pref(ui.useOverlayScrollbars,0) skip-if(!cocoaWidget) == scaled-scrollbar.html scaled-scrollbar-ref.html
|
||||
|
6
widget/reftests/scaled-scrollbar-ref.html
Normal file
6
widget/reftests/scaled-scrollbar-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html reftest-resolution="2.0">
|
||||
<div style="scrollbar-color: rgb(194,194,194) rgb(250,250,250); overflow: scroll; width: 300px; height: 300px">
|
||||
<div style="width: 1000px; height: 1000px"></div>
|
||||
</div>
|
||||
</html>
|
6
widget/reftests/scaled-scrollbar.html
Normal file
6
widget/reftests/scaled-scrollbar.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html reftest-resolution="2.0">
|
||||
<div style="overflow: scroll; width: 300px; height: 300px">
|
||||
<div style="width: 1000px; height: 1000px"></div>
|
||||
</div>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user