WebKit Bugzilla
Attachment 346707 Details for
Bug 188372
: [macOS] Scrollbars are not visible when using 3rd party mouse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188372-20180807072216.patch (text/plain), 6.32 KB, created by
Per Arne Vollan
on 2018-08-07 07:22:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-08-07 07:22:23 PDT
Size:
6.32 KB
patch
obsolete
>Index: Source/WebCore/PAL/ChangeLog >=================================================================== >--- Source/WebCore/PAL/ChangeLog (revision 234641) >+++ Source/WebCore/PAL/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-06 Per Arne Vollan <pvollan@apple.com> >+ >+ [macOS] Scrollbars are not visible when using 3rd party mouse >+ https://bugs.webkit.org/show_bug.cgi?id=188372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added declaration of NSScrollerImpPair class method. This method updates all NSScrollerImpPairs >+ with a new recommended scroller style. >+ >+ * pal/spi/mac/NSScrollerImpSPI.h: >+ > 2018-08-02 David Fenton <david_fenton@apple.com> > > Unreviewed, rolling out r234489. >Index: Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h >=================================================================== >--- Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h (revision 234641) >+++ Source/WebCore/PAL/pal/spi/mac/NSScrollerImpSPI.h (working copy) >@@ -38,6 +38,7 @@ @interface NSScrollerImp () > > @interface NSScrollerImpPair () > + (NSUserInterfaceLayoutDirection)scrollerLayoutDirection; >++ (void)_updateAllScrollerImpPairsForNewRecommendedScrollerStyle:(NSScrollerStyle)newRecommendedScrollerStyle; > @end > > #else >@@ -133,6 +134,7 @@ @interface NSScrollerImpPair : NSObject > - (void)endLiveResize; > - (void)beginScrollGesture; > - (void)endScrollGesture; >++ (void)_updateAllScrollerImpPairsForNewRecommendedScrollerStyle:(NSScrollerStyle)newRecommendedScrollerStyle; > @end > > @protocol NSScrollerImpPairDelegate >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234641) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2018-08-06 Per Arne Vollan <pvollan@apple.com> >+ >+ [macOS] Scrollbars are not visible when using 3rd party mouse >+ https://bugs.webkit.org/show_bug.cgi?id=188372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The scrollbars are not visible because they are not updated with the recommended scroller style >+ when a 3rd party mouse is used. They still have the overlay style, but the system is >+ recommending the legacy style in this case. The UI process is currently notifying the WebProcess >+ about changes in the scroller style, but the current style is not set in the WebProcess on >+ startup. This patch sets the initial scroller style in the WebProcess by passing it as part of >+ the WebProcess creation parameters. Also, to make sure hot-plugging of a 3rd party mouse is >+ is visually changing the scroller style of the current page, a class method in NSScrollerImpPair >+ is called to update all NSScrollerImpPairs with the new recommended style. This method was >+ previously called by AppKit, but after blocking WindowServer access, AppKit is no longer calling >+ this method. This has been manually tested by using a 3rd party mouse. >+ >+ * Shared/WebProcessCreationParameters.cpp: >+ (WebKit::WebProcessCreationParameters::encode const): >+ (WebKit::WebProcessCreationParameters::decode): >+ * Shared/WebProcessCreationParameters.h: >+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm: >+ (WebKit::WebProcessPool::platformInitializeWebProcess): >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::platformInitializeWebProcess): >+ (WebKit::WebProcess::scrollerStylePreferenceChanged): >+ > 2018-08-06 Alex Christensen <achristensen@webkit.org> > > Check with SafeBrowsing during navigation in WKWebView >Index: Source/WebKit/Shared/WebProcessCreationParameters.cpp >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.cpp (revision 234641) >+++ Source/WebKit/Shared/WebProcessCreationParameters.cpp (working copy) >@@ -159,6 +159,7 @@ void WebProcessCreationParameters::encod > > #if PLATFORM(MAC) > encoder << screenProperties; >+ encoder << useOverlayScrollbars; > #endif > } > >@@ -417,6 +418,8 @@ bool WebProcessCreationParameters::decod > if (!screenProperties) > return false; > parameters.screenProperties = WTFMove(*screenProperties); >+ if (!decoder.decode(parameters.useOverlayScrollbars)) >+ return false; > #endif > > return true; >Index: Source/WebKit/Shared/WebProcessCreationParameters.h >=================================================================== >--- Source/WebKit/Shared/WebProcessCreationParameters.h (revision 234641) >+++ Source/WebKit/Shared/WebProcessCreationParameters.h (working copy) >@@ -198,6 +198,7 @@ struct WebProcessCreationParameters { > > #if PLATFORM(MAC) > WebCore::ScreenProperties screenProperties; >+ bool useOverlayScrollbars { true }; > #endif > }; > >Index: Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (revision 234641) >+++ Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (working copy) >@@ -286,6 +286,7 @@ void WebProcessPool::platformInitializeW > #if PLATFORM(MAC) > auto screenProperties = WebCore::collectScreenProperties(); > parameters.screenProperties = WTFMove(screenProperties); >+ parameters.useOverlayScrollbars = ([NSScroller preferredScrollerStyle] == NSScrollerStyleOverlay); > #endif > } > >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 234641) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -87,6 +87,7 @@ > > #if PLATFORM(MAC) > #import <WebCore/ScrollbarThemeMac.h> >+#import <pal/spi/mac/NSScrollerImpSPI.h> > #endif > > #if USE(OS_STATE) >@@ -197,6 +198,9 @@ void WebProcess::platformInitializeWebPr > > #if PLATFORM(MAC) > WebCore::setScreenProperties(parameters.screenProperties); >+#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) >+ scrollerStylePreferenceChanged(parameters.useOverlayScrollbars); >+#endif > #endif > } > >@@ -592,6 +596,9 @@ void WebProcess::scrollerStylePreference > return; > > static_cast<ScrollbarThemeMac&>(theme).preferencesChanged(); >+ >+ NSScrollerStyle style = useOverlayScrollbars ? NSScrollerStyleOverlay : NSScrollerStyleLegacy; >+ [NSScrollerImpPair _updateAllScrollerImpPairsForNewRecommendedScrollerStyle:style]; > } > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188372
: 346707