WebKit Bugzilla
Attachment 373042 Details for
Bug 199279
: Move WebKitLegacy off of a couple AppKit ivars
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199279-20190627120341.patch (text/plain), 5.61 KB, created by
Timothy Hatcher
on 2019-06-27 12:03:41 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-06-27 12:03:41 PDT
Size:
5.61 KB
patch
obsolete
>Subversion Revision: 246888 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 6edcec89bbb4f44806bfcda4718a8faa3cc9a061..1b6304dfa862e60783c3fc3cca67059f40baff82 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,13 @@ >+2019-06-27 Timothy Hatcher <timothy@apple.com> >+ >+ Move WebKitLegacy off of a couple AppKit ivars. >+ https://bugs.webkit.org/show_bug.cgi?id=199279 >+ rdar://problem/34983438 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Platform.h: Added HAVE_SUBVIEWS_IVAR_SPI. >+ > 2019-06-27 Don Olmstead <don.olmstead@sony.com> > > [FTW] Build JavaScriptCore >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 1a5b6c921963f3bfba23a10d1569e83028bfbab0..7cf75daf9dbec1298236f2cf4ba3d012e72b0007 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2019-06-27 Timothy Hatcher <timothy@apple.com> >+ >+ Move WebKitLegacy off of a couple AppKit ivars. >+ https://bugs.webkit.org/show_bug.cgi?id=199279 >+ rdar://problem/34983438 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebHTMLView.mm: >+ (-[NSView _setSubviewsIvar:]): Added. Implement on older systems. >+ (-[NSView _subviewsIvar]): Added. Ditto. >+ (needsCursorRectsSupportAtPoint): Use _borderView property. >+ (-[WebHTMLView _setAsideSubviews]): Use _subviewsIvar property. >+ (-[NSWindow _web_borderView]): Deleted. >+ > 2019-06-27 Saam Barati <sbarati@apple.com> > > Make WEBGPU enabled only on Mojave and later. >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index 33a4bb8d9e2b27b63200a7c1d4e4648d88817edb..fbaec6679b9eda68934b614fa94ef81afe4b0dc1 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -1599,3 +1599,7 @@ > #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 101300 > #define USE_INTEL_METAL_WORKAROUND 1 > #endif >+ >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500 >+#define HAVE_SUBVIEWS_IVAR_SPI 1 >+#endif >diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >index f1bdcdb89ce33cf6c1e4e8abdf4ac31ee5e32574..48ea18647ceb79857464f1608197c3adadbdca3c 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >@@ -213,12 +213,32 @@ - (void)_windowChangedKeyState; > @end > > @interface NSWindow () >+@property (readonly) __kindof NSView *_borderView; >+ > - (id)_newFirstResponderAfterResigning; > @end > >-@interface NSWindow (WebBorderViewAccess) >-- (NSView *)_web_borderView; >+@interface NSView (SubviewsIvar) >+@property (nullable, assign, setter=_setSubviewsIvar:) NSMutableArray<__kindof NSView *> *_subviewsIvar; >+@end >+ >+#if !HAVE(SUBVIEWS_IVAR_SPI) >+@implementation NSView (SubviewsIvar) >+ >+- (void)_setSubviewsIvar:(NSMutableArray<__kindof NSView *> *)subviews { >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ _subviews = subviews; >+ ALLOW_DEPRECATED_DECLARATIONS_END >+} >+ >+- (NSMutableArray<__kindof NSView *> *)_subviewsIvar { >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ return (NSMutableArray *)_subviews; >+ ALLOW_DEPRECATED_DECLARATIONS_END >+} >+ > @end >+#endif > > using WebEvent = NSEvent; > const auto WebEventMouseDown = NSEventTypeLeftMouseDown; >@@ -626,17 +646,6 @@ - (void)forwardContextMenuAction:(id)sender > > @end > >-@implementation NSWindow (WebBorderViewAccess) >- >-- (NSView *)_web_borderView >-{ >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- return _borderView; >- ALLOW_DEPRECATED_DECLARATIONS_END >-} >- >-@end >- > @interface WebResponderChainSink : NSResponder { > NSResponder* _lastResponderInChain; > BOOL _receivedUnhandledCommand; >@@ -685,7 +694,7 @@ static WebHTMLView *lastHitView; > static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point) > { > forceNSViewHitTest = YES; >- NSView* view = [[window _web_borderView] hitTest:point]; >+ NSView* view = [window._borderView hitTest:point]; > forceNSViewHitTest = NO; > > // WebHTMLView doesn't use cursor rects. >@@ -1544,17 +1553,13 @@ - (void)_setAsideSubviews > #if PLATFORM(MAC) > ASSERT(!_private->subviewsSetAside); > ASSERT(_private->savedSubviews == nil); >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- _private->savedSubviews = _subviews; >- ALLOW_DEPRECATED_DECLARATIONS_END >+ _private->savedSubviews = self._subviewsIvar; > // We need to keep the layer-hosting view in the subviews, otherwise the layers flash. > if (_private->layerHostingView) { >- NSArray* newSubviews = [[NSArray alloc] initWithObjects:_private->layerHostingView, nil]; >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- _subviews = newSubviews; >+ NSMutableArray* newSubviews = [[NSMutableArray alloc] initWithObjects:_private->layerHostingView, nil]; >+ self._subviewsIvar = newSubviews; > } else >- _subviews = nil; >- ALLOW_DEPRECATED_DECLARATIONS_END >+ self._subviewsIvar = nil; > _private->subviewsSetAside = YES; > #endif > } >@@ -1564,13 +1569,11 @@ - (void)_setAsideSubviews > #if PLATFORM(MAC) > ASSERT(_private->subviewsSetAside); > if (_private->layerHostingView) { >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- [_subviews release]; >- _subviews = _private->savedSubviews; >+ [self._subviewsIvar release]; >+ self._subviewsIvar = _private->savedSubviews; > } else { >- ASSERT(_subviews == nil); >- _subviews = _private->savedSubviews; >- ALLOW_DEPRECATED_DECLARATIONS_END >+ ASSERT(self._subviewsIvar == nil); >+ self._subviewsIvar = _private->savedSubviews; > } > _private->savedSubviews = nil; > _private->subviewsSetAside = NO;
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 199279
: 373042