Title: [158036] trunk/Source/WebKit/mac
- Revision
- 158036
- Author
- mr...@apple.com
- Date
- 2013-10-25 13:16:56 -0700 (Fri, 25 Oct 2013)
Log Message
Fix or disable some deprecation warnings.
Reviewed by Darin Adler.
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel cancel:]): On newer OS versions, use the modern API.
(-[WebAuthenticationPanel logIn:]): Ditto.
(-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]): Ditto. Translate the
response code in to the form that -sheetDidEnd:responseCode:contextInfo: expects.
* WebView/WebClipView.mm:
(-[WebClipView initWithFrame:]): Disable deprecation warnings since it's not obvious
how to avoid calling -releaseGState here.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (158035 => 158036)
--- trunk/Source/WebKit/mac/ChangeLog 2013-10-25 19:55:14 UTC (rev 158035)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-10-25 20:16:56 UTC (rev 158036)
@@ -1,3 +1,18 @@
+2013-10-25 Mark Rowe <mr...@apple.com>
+
+ Fix or disable some deprecation warnings.
+
+ Reviewed by Darin Adler.
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel cancel:]): On newer OS versions, use the modern API.
+ (-[WebAuthenticationPanel logIn:]): Ditto.
+ (-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]): Ditto. Translate the
+ response code in to the form that -sheetDidEnd:responseCode:contextInfo: expects.
+ * WebView/WebClipView.mm:
+ (-[WebClipView initWithFrame:]): Disable deprecation warnings since it's not obvious
+ how to avoid calling -releaseGState here.
+
2013-10-24 Mark Rowe <mr...@apple.com>
Remove references to OS X 10.7 from Xcode configuration settings.
Modified: trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m (158035 => 158036)
--- trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m 2013-10-25 19:55:14 UTC (rev 158035)
+++ trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m 2013-10-25 20:16:56 UTC (rev 158036)
@@ -77,7 +77,11 @@
[panel close];
if (usingSheet) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [panel.sheetParent endSheet:panel returnCode:NSModalResponseCancel];
+#else
[[NSApplication sharedApplication] endSheet:panel returnCode:1];
+#endif
} else {
[[NSApplication sharedApplication] stopModalWithCode:1];
}
@@ -93,7 +97,11 @@
[panel close];
if (usingSheet) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [panel.sheetParent endSheet:panel returnCode:NSModalResponseOK];
+#else
[[NSApplication sharedApplication] endSheet:panel returnCode:0];
+#endif
} else {
[[NSApplication sharedApplication] stopModalWithCode:0];
}
@@ -245,8 +253,15 @@
usingSheet = TRUE;
challenge = [chall retain];
-
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [window beginSheet:panel completionHandler:^(NSModalResponse modalResponse) {
+ int returnCode = (modalResponse == NSModalResponseCancel) ? 1 : 0;
+ [self sheetDidEnd:panel returnCode:returnCode contextInfo:NULL];
+ }];
+#else
[[NSApplication sharedApplication] beginSheet:panel modalForWindow:window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
+#endif
}
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
Modified: trunk/Source/WebKit/mac/WebView/WebClipView.mm (158035 => 158036)
--- trunk/Source/WebKit/mac/WebView/WebClipView.mm 2013-10-25 19:55:14 UTC (rev 158035)
+++ trunk/Source/WebKit/mac/WebView/WebClipView.mm 2013-10-25 20:16:56 UTC (rev 158036)
@@ -64,7 +64,9 @@
self = [super initWithFrame:frame];
if (!self)
return nil;
-
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// In WebHTMLView, we set a clip. This is not typical to do in an
// NSView, and while correct for any one invocation of drawRect:,
// it causes some bad problems if that clip is cached between calls.
@@ -75,7 +77,8 @@
// See these bugs for more information:
// <rdar://problem/3409315>: REGRESSSION (7B58-7B60)?: Safari draws blank frames on macosx.apple.com perf page
[self releaseGState];
-
+#pragma clang diagnostic pop
+
return self;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes