Title: [268535] branches/safari-610-branch/Source/WebKit
- Revision
- 268535
- Author
- [email protected]
- Date
- 2020-10-15 11:07:50 -0700 (Thu, 15 Oct 2020)
Log Message
Cherry-pick r268376. rdar://problem/70321635
Cursor window is transparent - but not hidden - when `cursor: none` is specified
https://bugs.webkit.org/show_bug.cgi?id=217639
<rdar://problem/70006186>
Reviewed by Simon Fraser.
* Platform/spi/mac/AppKitSPI.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::setCursor):
Adopt new AppKit SPI to actually hide the cursor when we set it to the "none" shape.
This hiding lives until the next time the app-global cursor shape is changed by any client.]
We'll re-set it the next time we set the "none" shape.
This is important, because on some platforms, hiding the cursor is a performance improvement
over simply making it transparent.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610-branch/Source/WebKit/ChangeLog (268534 => 268535)
--- branches/safari-610-branch/Source/WebKit/ChangeLog 2020-10-15 18:07:48 UTC (rev 268534)
+++ branches/safari-610-branch/Source/WebKit/ChangeLog 2020-10-15 18:07:50 UTC (rev 268535)
@@ -1,5 +1,46 @@
2020-10-15 Russell Epstein <[email protected]>
+ Cherry-pick r268376. rdar://problem/70321635
+
+ Cursor window is transparent - but not hidden - when `cursor: none` is specified
+ https://bugs.webkit.org/show_bug.cgi?id=217639
+ <rdar://problem/70006186>
+
+ Reviewed by Simon Fraser.
+
+ * Platform/spi/mac/AppKitSPI.h:
+ * UIProcess/mac/PageClientImplMac.mm:
+ (WebKit::PageClientImpl::setCursor):
+ Adopt new AppKit SPI to actually hide the cursor when we set it to the "none" shape.
+ This hiding lives until the next time the app-global cursor shape is changed by any client.]
+ We'll re-set it the next time we set the "none" shape.
+
+ This is important, because on some platforms, hiding the cursor is a performance improvement
+ over simply making it transparent.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-12 Tim Horton <[email protected]>
+
+ Cursor window is transparent - but not hidden - when `cursor: none` is specified
+ https://bugs.webkit.org/show_bug.cgi?id=217639
+ <rdar://problem/70006186>
+
+ Reviewed by Simon Fraser.
+
+ * Platform/spi/mac/AppKitSPI.h:
+ * UIProcess/mac/PageClientImplMac.mm:
+ (WebKit::PageClientImpl::setCursor):
+ Adopt new AppKit SPI to actually hide the cursor when we set it to the "none" shape.
+ This hiding lives until the next time the app-global cursor shape is changed by any client.]
+ We'll re-set it the next time we set the "none" shape.
+
+ This is important, because on some platforms, hiding the cursor is a performance improvement
+ over simply making it transparent.
+
+2020-10-15 Russell Epstein <[email protected]>
+
Cherry-pick r268367. rdar://problem/70321875
[macCatalyst] Enable WKPDFView
Modified: branches/safari-610-branch/Source/WebKit/Platform/spi/mac/AppKitSPI.h (268534 => 268535)
--- branches/safari-610-branch/Source/WebKit/Platform/spi/mac/AppKitSPI.h 2020-10-15 18:07:48 UTC (rev 268534)
+++ branches/safari-610-branch/Source/WebKit/Platform/spi/mac/AppKitSPI.h 2020-10-15 18:07:50 UTC (rev 268535)
@@ -67,3 +67,8 @@
@property CGFloat titlebarAlphaValue;
@end
#endif
+
+// FIXME: Move this above once <rdar://problem/70224980> is in an SDK.
+@interface NSCursor ()
++ (void)hideUntilChanged;
+@end
Modified: branches/safari-610-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (268534 => 268535)
--- branches/safari-610-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2020-10-15 18:07:48 UTC (rev 268534)
+++ branches/safari-610-branch/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2020-10-15 18:07:50 UTC (rev 268535)
@@ -29,6 +29,7 @@
#if PLATFORM(MAC)
#import "APIHitTestResult.h"
+#import "AppKitSPI.h"
#import "ColorSpaceData.h"
#import "DataReference.h"
#import "DownloadProxy.h"
@@ -327,6 +328,11 @@
return;
[platformCursor set];
+
+ if (cursor.type() == WebCore::Cursor::Type::None) {
+ if ([NSCursor respondsToSelector:@selector(hideUntilChanged)])
+ [NSCursor hideUntilChanged];
+ }
}
void PageClientImpl::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes