<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[179376] trunk/Source/WebKit/mac</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/179376">179376</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2015-01-29 16:02:02 -0800 (Thu, 29 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove more Mountain Lion code from WebKit
https://bugs.webkit.org/show_bug.cgi?id=141050

Reviewed by Anders Carlsson.

* History/WebHistory.mm:
(getDayBoundaries):
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel cancel:]):
(-[WebAuthenticationPanel logIn:]):
(-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebView/WebFrameView.mm:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(needsScreenFontsEnabledQuirk):
* WebView/WebView.mm:
(+[WebView registerForMemoryNotifications]):
(-[WebView _preferencesChanged:]):
(+[WebView initialize]):
(+[WebView _shouldAutomaticQuoteSubstitutionBeEnabled]):
(+[WebView _shouldAutomaticDashSubstitutionBeEnabled]):
(+[WebView _didChangeAutomaticDashSubstitutionEnabled:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacHistoryWebHistorymm">trunk/Source/WebKit/mac/History/WebHistory.mm</a></li>
<li><a href="#trunkSourceWebKitmacPanelsWebAuthenticationPanelm">trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm">trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFrameViewmm">trunk/Source/WebKit/mac/WebView/WebFrameView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-01-29  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Remove more Mountain Lion code from WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=141050
+
+        Reviewed by Anders Carlsson.
+
+        * History/WebHistory.mm:
+        (getDayBoundaries):
+        * Panels/WebAuthenticationPanel.m:
+        (-[WebAuthenticationPanel cancel:]):
+        (-[WebAuthenticationPanel logIn:]):
+        (-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]):
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface):
+        * WebView/WebFrameView.mm:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        (needsScreenFontsEnabledQuirk):
+        * WebView/WebView.mm:
+        (+[WebView registerForMemoryNotifications]):
+        (-[WebView _preferencesChanged:]):
+        (+[WebView initialize]):
+        (+[WebView _shouldAutomaticQuoteSubstitutionBeEnabled]):
+        (+[WebView _shouldAutomaticDashSubstitutionBeEnabled]):
+        (+[WebView _didChangeAutomaticDashSubstitutionEnabled:]):
+
</ins><span class="cx"> 2015-01-29  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove support for screen font substitution
</span></span></pre></div>
<a id="trunkSourceWebKitmacHistoryWebHistorymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/History/WebHistory.mm (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/History/WebHistory.mm        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/History/WebHistory.mm        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -154,7 +154,6 @@
</span><span class="cx"> 
</span><span class="cx"> static void getDayBoundaries(NSTimeInterval interval, NSTimeInterval&amp; beginningOfDay, NSTimeInterval&amp; beginningOfNextDay)
</span><span class="cx"> {
</span><del>-#if (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 80000) || (PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090)
</del><span class="cx">     NSDate *date = [NSDate dateWithTimeIntervalSinceReferenceDate:interval];
</span><span class="cx">     
</span><span class="cx">     NSCalendar *calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
</span><span class="lines">@@ -165,17 +164,6 @@
</span><span class="cx">     
</span><span class="cx">     beginningOfDay = beginningOfDayDate.timeIntervalSinceReferenceDate;
</span><span class="cx">     beginningOfNextDay = beginningOfDay + dayLength;
</span><del>-#else
-    CFTimeZoneRef timeZone = CFTimeZoneCopyDefault();
-    CFGregorianDate date = CFAbsoluteTimeGetGregorianDate(interval, timeZone);
-    date.hour = 0;
-    date.minute = 0;
-    date.second = 0;
-    beginningOfDay = CFGregorianDateGetAbsoluteTime(date, timeZone);
-    date.day += 1;
-    beginningOfNextDay = CFGregorianDateGetAbsoluteTime(date, timeZone);
-    CFRelease(timeZone);
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline NSTimeInterval beginningOfDay(NSTimeInterval date)
</span></span></pre></div>
<a id="trunkSourceWebKitmacPanelsWebAuthenticationPanelm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/Panels/WebAuthenticationPanel.m        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -78,12 +78,7 @@
</span><span class="cx">     [[self retain] autorelease];
</span><span class="cx"> 
</span><span class="cx">     if (usingSheet) {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">         [panel.sheetParent endSheet:panel returnCode:NSModalResponseCancel];
</span><del>-#else
-        [panel orderOut:sender];
-        [[NSApplication sharedApplication] endSheet:panel returnCode:1];
-#endif
</del><span class="cx">     } else {
</span><span class="cx">         [panel orderOut:sender];
</span><span class="cx">         [[NSApplication sharedApplication] stopModalWithCode:1];
</span><span class="lines">@@ -99,12 +94,7 @@
</span><span class="cx">     [[panel retain] autorelease];
</span><span class="cx"> 
</span><span class="cx">     if (usingSheet) {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">         [panel.sheetParent endSheet:panel returnCode:NSModalResponseOK];
</span><del>-#else
-        [panel orderOut:sender];
-        [[NSApplication sharedApplication] endSheet:panel returnCode:0];
-#endif
</del><span class="cx">     } else {
</span><span class="cx">         [panel orderOut:sender];
</span><span class="cx">         [[NSApplication sharedApplication] stopModalWithCode:0];
</span><span class="lines">@@ -258,14 +248,10 @@
</span><span class="cx">     usingSheet = TRUE;
</span><span class="cx">     challenge = [chall retain];
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     [window beginSheet:panel completionHandler:^(NSModalResponse modalResponse) {
</span><span class="cx">         int returnCode = (modalResponse == NSModalResponseCancel) ? 1 : 0;
</span><span class="cx">         [self sheetDidEnd:panel returnCode:returnCode contextInfo:NULL];
</span><span class="cx">     }];
</span><del>-#else
-    [[NSApplication sharedApplication] beginSheet:panel modalForWindow:window modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void  *)contextInfo
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -184,11 +184,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     INIT(CreateVMPressureDispatchOnMainQueue);
</span><del>-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     INIT(CreateMemoryStatusPressureCriticalDispatchOnMainQueue);
</span><del>-#endif
-
</del><span class="cx">     INIT(ExecutableWasLinkedOnOrBeforeLion);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> - (BOOL)_scrollTo:(const NSPoint *)newOrigin animate:(BOOL)animate; // need the boolean result from this method
</span><span class="cx"> @end
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(MAC)
</ins><span class="cx"> @interface NSView (Details)
</span><span class="cx"> - (void)setBackgroundColor:(NSColor *)color;
</span><span class="cx"> @end
</span><span class="lines">@@ -546,7 +546,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><ins>+#if PLATFORM(MAC)
</ins><span class="cx"> - (BOOL)wantsUpdateLayer
</span><span class="cx"> {
</span><span class="cx">     return YES;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (179375 => 179376)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-01-29 23:57:04 UTC (rev 179375)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-01-30 00:02:02 UTC (rev 179376)
</span><span class="lines">@@ -1267,11 +1267,7 @@
</span><span class="cx">         [WebView _handleMemoryWarning];
</span><span class="cx">     }, shouldAutoClearPressureOnMemoryRelease);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     static dispatch_source_t memoryNotificationEventSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MEMORYSTATUS, 0, DISPATCH_MEMORYSTATUS_PRESSURE_WARN, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
</span><del>-#else
-    static dispatch_source_t memoryNotificationEventSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_VM, 0, DISPATCH_VM_PRESSURE, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
-#endif
</del><span class="cx">     dispatch_source_set_event_handler(memoryNotificationEventSource, ^{
</span><span class="cx">         // Set memory pressure flag and schedule releasing memory in web thread runloop exit.
</span><span class="cx">         memoryPressureHandler().setReceivedMemoryPressure(WebCore::MemoryPressureReasonVMPressure);
</span><span class="lines">@@ -4669,10 +4665,7 @@
</span><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesRemovedNotification:) name:WebPreferencesRemovedNotification object:nil];
</span><span class="cx"> 
</span><span class="cx">     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
</span><del>-
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     [defaults registerDefaults:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey]];
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     continuousSpellCheckingEnabled = NO;
</span><span class="lines">@@ -4696,14 +4689,11 @@
</span><span class="cx">         name:NSSpellCheckerDidChangeAutomaticTextReplacementNotification object:nil];
</span><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeAutomaticSpellingCorrectionEnabled:)
</span><span class="cx">         name:NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification object:nil];
</span><del>-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeAutomaticQuoteSubstitutionEnabled:)
</span><span class="cx">         name:NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification object:nil];
</span><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_didChangeAutomaticDashSubstitutionEnabled:)
</span><span class="cx">         name:NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification object:nil];
</span><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -4738,24 +4728,21 @@
</span><span class="cx"> + (BOOL)_shouldAutomaticQuoteSubstitutionBeEnabled
</span><span class="cx"> {
</span><span class="cx">     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     if (![defaults objectForKey:WebAutomaticQuoteSubstitutionEnabled])
</span><span class="cx">         return [NSSpellChecker isAutomaticQuoteSubstitutionEnabled];
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     return [defaults boolForKey:WebAutomaticQuoteSubstitutionEnabled];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> + (BOOL)_shouldAutomaticDashSubstitutionBeEnabled
</span><span class="cx"> {
</span><span class="cx">     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx">     if (![defaults objectForKey:WebAutomaticDashSubstitutionEnabled])
</span><span class="cx">         return [NSSpellChecker isAutomaticDashSubstitutionEnabled];
</span><del>-#endif
</del><ins>+
</ins><span class="cx">     return [defaults boolForKey:WebAutomaticDashSubstitutionEnabled];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</del><span class="cx"> + (void)_didChangeAutomaticQuoteSubstitutionEnabled:(NSNotification *)notification
</span><span class="cx"> {
</span><span class="cx">     automaticQuoteSubstitutionEnabled = [self _shouldAutomaticQuoteSubstitutionBeEnabled];
</span><span class="lines">@@ -4767,7 +4754,6 @@
</span><span class="cx">     automaticDashSubstitutionEnabled = [self _shouldAutomaticDashSubstitutionBeEnabled];
</span><span class="cx">     [[NSSpellChecker sharedSpellChecker] updatePanels];
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx"> 
</span><span class="cx"> + (void)_applicationWillTerminate
</span><span class="cx"> {   
</span></span></pre>
</div>
</div>

</body>
</html>