Remove code for Mac Lion
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Oct 2013 00:14:28 +0000 (00:14 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Oct 2013 00:14:28 +0000 (00:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123542

Reviewed by Anders Carlsson.

Source/WebCore:

Removed the code for Mac OS X 10.7.

* platform/graphics/ImageBuffer.h:
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::context):
(WebCore::ImageBuffer::flushContext):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::imageSourceOptions):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::scrollAnimationEnabledForSystem):
* platform/mac/ScrollElasticityController.mm:
(WebCore::reboundDeltaForElasticDelta):
* platform/mac/ThemeMac.mm:
(WebCore::updateStates):
(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):
* platform/mac/WebCoreNSCellExtras.h:
* platform/mac/WebCoreNSCellExtras.m:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::textField):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView attachRootLayer:]):
* WebView/WebView.mm:

Source/WebKit2:

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* UIProcess/API/mac/WKView.mm:
(-[WKView viewWillMoveToWindow:]):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158330 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ImageBuffer.h
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
Source/WebCore/platform/mac/PlatformEventFactoryMac.mm
Source/WebCore/platform/mac/ScrollAnimatorMac.mm
Source/WebCore/platform/mac/ScrollElasticityController.mm
Source/WebCore/platform/mac/ThemeMac.mm
Source/WebCore/platform/mac/WebCoreNSCellExtras.h
Source/WebCore/platform/mac/WebCoreNSCellExtras.m
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
Source/WebKit2/Shared/mac/WebEventFactory.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in

index 74c2629..7fc05fa 100644 (file)
@@ -1,3 +1,12 @@
+2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove code for Mac Lion
+        https://bugs.webkit.org/show_bug.cgi?id=123542
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/Platform.h:
+
 2013-10-30  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
 
         Remove PCRE workaround.
index b88d62f..c5ab35c 100644 (file)
 #define ENABLE_BINDING_INTEGRITY 1
 #endif
 
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 #define WTF_USE_AVFOUNDATION 1
 #endif
 
 #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
 #endif
 
-#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
-#define HAVE_INVERTED_WHEEL_EVENTS 1
-#endif
-
 #if PLATFORM(MAC) && !PLATFORM(IOS)
 #define WTF_USE_COREAUDIO 1
 #endif
 #define WTF_USE_AUTOMATIC_TEXT_REPLACEMENT 1
 #endif
 
-#if !PLATFORM(IOS) && (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
 /* Some platforms provide UI for suggesting autocorrection. */
 #define WTF_USE_AUTOCORRECTION_PANEL 1
 #endif
-#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+
+#if PLATFORM(MAC)
 /* Some platforms use spelling and autocorrection markers to provide visual cue. On such platform, if word with marker is edited, we need to remove the marker. */
 #define WTF_USE_MARKER_REMOVAL_UPON_EDITING 1
 #endif
index e961c00..ff7a8bc 100644 (file)
@@ -1,3 +1,39 @@
+2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove code for Mac Lion
+        https://bugs.webkit.org/show_bug.cgi?id=123542
+
+        Reviewed by Anders Carlsson.
+
+        Removed the code for Mac OS X 10.7.
+
+        * platform/graphics/ImageBuffer.h:
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+        (WebCore::ImageBuffer::context):
+        (WebCore::ImageBuffer::flushContext):
+        * platform/graphics/cg/ImageBufferDataCG.h:
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        (WebCore::imageSourceOptions):
+        * platform/graphics/mac/ComplexTextControllerCoreText.mm:
+        (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::scrollAnimationEnabledForSystem):
+        * platform/mac/ScrollElasticityController.mm:
+        (WebCore::reboundDeltaForElasticDelta):
+        * platform/mac/ThemeMac.mm:
+        (WebCore::updateStates):
+        (WebCore::paintCheckbox):
+        (WebCore::paintRadio):
+        (WebCore::paintButton):
+        * platform/mac/WebCoreNSCellExtras.h:
+        * platform/mac/WebCoreNSCellExtras.m:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::paintTextField):
+        (WebCore::RenderThemeMac::paintMenuList):
+        (WebCore::RenderThemeMac::setPopupButtonCellState):
+        (WebCore::RenderThemeMac::textField):
+
 2013-10-30  Alexey Proskuryakov  <ap@apple.com>
 
         85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()
index f44f74c..1d4f085 100644 (file)
@@ -138,7 +138,6 @@ namespace WebCore {
 #if USE(CG)
         RetainPtr<CGImageRef> copyNativeImage(BackingStoreCopy = CopyBackingStore) const;
         void flushContext() const;
-        void flushContextIfNecessary() const;
 #endif
         void clip(GraphicsContext*, const FloatRect&) const;
 
index 61c7dd3..bdae1e2 100644 (file)
 #include <IOSurface/IOSurface.h>
 #endif
 
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-#include <wtf/CurrentTime.h>
-#endif
-
 using namespace std;
 
 namespace WebCore {
@@ -180,9 +176,6 @@ ImageBuffer::ImageBuffer(const IntSize& size, float resolutionScale, ColorSpace
     m_context->scale(FloatSize(1, -1));
     m_context->translate(0, -size.height());
     m_context->setIsAcceleratedContext(accelerateRendering);
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    m_data.m_lastFlushTime = monotonicallyIncreasingTimeMS();
-#endif
     success = true;
 }
 
@@ -192,32 +185,12 @@ ImageBuffer::~ImageBuffer()
 
 GraphicsContext* ImageBuffer::context() const
 {
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    flushContextIfNecessary();
-#endif
     return m_context.get();
 }
 
-void ImageBuffer::flushContextIfNecessary() const
-{
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    // Force a flush if last flush was more than 20ms ago
-    if (m_context->isAcceleratedContext()) {
-        double elapsedTime = monotonicallyIncreasingTimeMS() - m_data.m_lastFlushTime;
-        double maxFlushInterval = 20; // in ms
-
-        if (elapsedTime > maxFlushInterval)
-            flushContext();
-    }
-#endif
-}
-
 void ImageBuffer::flushContext() const
 {
     CGContextFlush(m_context->platformContext());
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    m_data.m_lastFlushTime = monotonicallyIncreasingTimeMS();
-#endif
 }
 
 PassRefPtr<Image> ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior scaleBehavior) const
@@ -264,12 +237,8 @@ RetainPtr<CGImageRef> ImageBuffer::copyNativeImage(BackingStoreCopy copyBehavior
         }
     }
 #if USE(IOSURFACE_CANVAS_BACKING_STORE)
-    else {
+    else
         image = wkIOSurfaceContextCreateImage(context()->platformContext());
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-        m_data.m_lastFlushTime = monotonicallyIncreasingTimeMS();
-#endif
-    }
 #endif
 
     return adoptCF(image);
index 8fde6b3..c399209 100644 (file)
@@ -54,9 +54,6 @@ public:
     Checked<unsigned, RecordOverflow> m_bytesPerRow;
     CGColorSpaceRef m_colorSpace;
     RetainPtr<IOSurfaceRef> m_surface;
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    mutable double m_lastFlushTime;
-#endif
 
     PassRefPtr<Uint8ClampedArray> getData(const IntRect&, const IntSize&, bool accelerateRendering, bool unmultiplied, float resolutionScale) const;
     void putData(Uint8ClampedArray*& source, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, const IntSize&, bool accelerateRendering, bool unmultiplied, float resolutionScale);
index 126be70..e4c166f 100644 (file)
@@ -102,17 +102,7 @@ static CFDictionaryRef imageSourceOptions(ImageSource::ShouldSkipMetadata skipMe
 
     if (!options) {
         const unsigned numOptions = 3;
-
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-        // Lion and Snow Leopard only return Orientation when kCGImageSourceSkipMetadata is false,
-        // and incorrectly return cached metadata if an image is queried once with kCGImageSourceSkipMetadata true
-        // and then subsequently with kCGImageSourceSkipMetadata false.
-        // <rdar://problem/11148192>
-        UNUSED_PARAM(skipMetadata);
-        const CFBooleanRef imageSourceSkipMetadata = kCFBooleanFalse;
-#else
         const CFBooleanRef imageSourceSkipMetadata = (skipMetadata == ImageSource::SkipMetadata) ? kCFBooleanTrue : kCFBooleanFalse;
-#endif
         const void* keys[numOptions] = { kCGImageSourceShouldCache, kCGImageSourceShouldPreferRGB32, kCGImageSourceSkipMetadata };
         const void* values[numOptions] = { kCFBooleanTrue, kCFBooleanTrue, imageSourceSkipMetadata };
         options = CFDictionaryCreate(NULL, keys, values, numOptions, 
index c588a47..4960a4d 100644 (file)
@@ -219,14 +219,8 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
         static CFDictionaryRef ltrTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, ltrOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
         static CFDictionaryRef rtlTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, rtlOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
         ProviderInfo info = { cp, length, stringAttributes.get() };
         RetainPtr<CTTypesetterRef> typesetter = adoptCF(wkCreateCTTypesetterWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions));
-#else
-        RetainPtr<CFStringRef> string = adoptCF(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, cp, length, kCFAllocatorNull));
-        RetainPtr<CFAttributedStringRef> attributedString = adoptCF(CFAttributedStringCreate(kCFAllocatorDefault, string.get(), stringAttributes.get()));
-        RetainPtr<CTTypesetterRef> typesetter = adoptCF(CTTypesetterCreateWithAttributedStringAndOptions(attributedString.get(), m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions));
-#endif
 
         line = adoptCF(CTTypesetterCreateLine(typesetter.get(), CFRangeMake(0, 0)));
     } else {
index ec350ac..be82a9a 100644 (file)
@@ -446,12 +446,7 @@ public:
         m_phase                             = phaseForEvent(event);
         m_momentumPhase                     = momentumPhaseForEvent(event);
         m_hasPreciseScrollingDeltas         = continuous;
-
-#if HAVE(INVERTED_WHEEL_EVENTS)
         m_directionInvertedFromDevice       = [event isDirectionInvertedFromDevice];
-#else
-        m_directionInvertedFromDevice       = false;
-#endif
     }
 };
 
index 68ccee9..63d9ddf 100644 (file)
@@ -668,12 +668,7 @@ ScrollAnimatorMac::~ScrollAnimatorMac()
 
 static bool scrollAnimationEnabledForSystem()
 {
-    NSString* scrollAnimationDefaultsKey = 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-        @"AppleScrollAnimationEnabled";
-#else
-        @"NSScrollAnimationEnabled";
-#endif
+    NSString* scrollAnimationDefaultsKey = @"NSScrollAnimationEnabled";
     static bool enabled = [[NSUserDefaults standardUserDefaults] boolForKey:scrollAnimationDefaultsKey];
     return enabled;
 }
index 543e3a5..731fe0b 100644 (file)
@@ -63,31 +63,6 @@ static const float scrollVelocityZeroingTimeout = 0.10f;
 static const float rubberbandDirectionLockStretchRatio = 1;
 static const float rubberbandMinimumRequiredDeltaBeforeStretch = 10;
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-static const float rubberbandStiffness = 20;
-static const float rubberbandAmplitude = 0.31f;
-static const float rubberbandPeriod = 1.6f;
-
-static float elasticDeltaForTimeDelta(float initialPosition, float initialVelocity, float elapsedTime)
-{
-    float amplitude = rubberbandAmplitude;
-    float period = rubberbandPeriod;
-    float criticalDampeningFactor = expf((-elapsedTime * rubberbandStiffness) / period);
-
-    return (initialPosition + (-initialVelocity * elapsedTime * amplitude)) * criticalDampeningFactor;
-}
-
-static float elasticDeltaForReboundDelta(float delta)
-{
-    float stiffness = std::max(rubberbandStiffness, 1.0f);
-    return delta / stiffness;
-}
-
-static float reboundDeltaForElasticDelta(float delta)
-{
-    return delta * rubberbandStiffness;
-}
-#else
 static float elasticDeltaForTimeDelta(float initialPosition, float initialVelocity, float elapsedTime)
 {
     return wkNSElasticDeltaForTimeDelta(initialPosition, initialVelocity, elapsedTime);
@@ -102,7 +77,6 @@ static float reboundDeltaForElasticDelta(float delta)
 {
     return wkNSReboundDeltaForElasticDelta(delta);
 }
-#endif
 
 static float scrollWheelMultiplier()
 {
index 5b3b797..d90add0 100644 (file)
@@ -172,14 +172,6 @@ static void updateStates(NSCell* cell, ControlStates states)
     bool enabled = states & EnabledState;
     if (enabled != oldEnabled)
         [cell setEnabled:enabled];
-    
-#if BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
-    // Focused state
-    bool oldFocused = [cell showsFirstResponder];
-    bool focused = states & FocusState;
-    if (focused != oldFocused)
-        [cell setShowsFirstResponder:focused];
-#endif
 
     // Checked and Indeterminate
     bool oldIndeterminate = [cell state] == NSMixedState;
@@ -302,10 +294,8 @@ static void paintCheckbox(ControlStates states, GraphicsContext* context, const
     LocalCurrentGraphicsContext localContext(context);
     NSView *view = ThemeMac::ensuredView(scrollView);
     [checkboxCell drawWithFrame:NSRect(inflatedRect) inView:view];
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
     if (states & FocusState)
         [checkboxCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
-#endif
     [checkboxCell setControlView:nil];
     
     END_BLOCK_OBJC_EXCEPTIONS
@@ -383,10 +373,8 @@ static void paintRadio(ControlStates states, GraphicsContext* context, const Int
     BEGIN_BLOCK_OBJC_EXCEPTIONS
     NSView *view = ThemeMac::ensuredView(scrollView);
     [radioCell drawWithFrame:NSRect(inflatedRect) inView:view];
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
     if (states & FocusState)
         [radioCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
-#endif
     [radioCell setControlView:nil];
     END_BLOCK_OBJC_EXCEPTIONS
 }
@@ -498,10 +486,8 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
         [window setDefaultButtonCell:nil];
 
     [buttonCell drawWithFrame:NSRect(inflatedRect) inView:view];
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
     if (states & FocusState)
         [buttonCell _web_drawFocusRingWithFrame:NSRect(inflatedRect) inView:view];
-#endif
     [buttonCell setControlView:nil];
 
     if (![previousDefaultButtonCell isEqual:buttonCell])
index 005334c..47edff8 100644 (file)
 
 #import <AppKit/AppKit.h>
 
-#define BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING (__MAC_OS_X_VERSION_MIN_REQUIRED <= 1070)
-
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
-
 @interface NSCell (WebCoreFocusRingDrawing)
 - (void)_web_drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
 @end
-
-#endif
index 870679b..a568931 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "WebCoreNSCellExtras.h"
 
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
-
 @implementation NSCell (WebCoreFocusRingDrawing)
 
 - (void)_web_drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
@@ -42,5 +40,3 @@
 }
 
 @end
-
-#endif // !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
index 980604a..a479e20 100644 (file)
@@ -759,21 +759,6 @@ bool RenderThemeMac::paintTextField(RenderObject* o, const PaintInfo& paintInfo,
 {
     LocalCurrentGraphicsContext localContext(paintInfo.context);
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-    bool useNSTextFieldCell = o->style().hasAppearance()
-        && o->style().visitedDependentColor(CSSPropertyBackgroundColor) == Color::white
-        && !o->style().hasBackgroundImage();
-
-    // We do not use NSTextFieldCell to draw styled text fields on Lion and SnowLeopard because
-    // there are a number of bugs on those platforms that require NSTextFieldCell to be in charge
-    // of painting its own background. We need WebCore to paint styled backgrounds, so we'll use
-    // this WebCoreSystemInterface function instead.
-    if (!useNSTextFieldCell) {
-        wkDrawBezeledTextFieldCell(r, isEnabled(o) && !isReadOnlyControl(o));
-        return false;
-    }
-#endif
-
     NSTextFieldCell *textField = this->textField();
 
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
@@ -872,10 +857,8 @@ bool RenderThemeMac::paintMenuList(RenderObject* o, const PaintInfo& paintInfo,
 
     NSView *view = documentViewFor(o);
     [popupButton drawWithFrame:inflatedRect inView:view];
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
     if (isFocused(o) && o->style().outlineStyleIsAuto())
         [popupButton _web_drawFocusRingWithFrame:inflatedRect inView:view];
-#endif
     [popupButton setControlView:nil];
 
     return false;
@@ -1369,9 +1352,6 @@ void RenderThemeMac::setPopupButtonCellState(const RenderObject* o, const IntRec
     updateCheckedState(popupButton, o);
     updateEnabledState(popupButton, o);
     updatePressedState(popupButton, o);
-#if BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
-    updateFocusedState(popupButton, o);
-#endif
 }
 
 const IntSize* RenderThemeMac::menuListSizes() const
@@ -1928,15 +1908,10 @@ NSTextFieldCell* RenderThemeMac::textField() const
         [m_textField.get() setBezeled:YES];
         [m_textField.get() setEditable:YES];
         [m_textField.get() setFocusRingType:NSFocusRingTypeExterior];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-        [m_textField.get() setDrawsBackground:YES];
-        [m_textField.get() setBackgroundColor:[NSColor whiteColor]];
-#else
         // Post-Lion, WebCore can be in charge of paintinng the background thanks to
         // the workaround in place for <rdar://problem/11385461>, which is implemented
         // above as _coreUIDrawOptionsWithFrame.
         [m_textField.get() setDrawsBackground:NO];
-#endif
     }
 
     return m_textField.get();
index 9b1ee95..3c328a1 100644 (file)
@@ -20,7 +20,6 @@ GLX
 HEADER_DETECTION_H
 HOSTED_CORE_ANIMATION
 INTERNAL_VISIBILITY
-INVERTED_WHEEL_EVENTS
 ISDEBUGGERPRESENT
 JNI
 LANGINFO_H
index ce0a5b6..280a90a 100644 (file)
@@ -1,3 +1,14 @@
+2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove code for Mac Lion
+        https://bugs.webkit.org/show_bug.cgi?id=123542
+
+        Reviewed by Anders Carlsson.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView attachRootLayer:]):
+        * WebView/WebView.mm:
+
 2013-10-29  Andy Estes  <aestes@apple.com>
 
         [iOS] Upstream Source/WebKit/ios/
index ea090d6..a2aef2a 100644 (file)
@@ -5431,13 +5431,8 @@ static BOOL writingDirectionKeyBindingsEnabled()
     if ([[self _webView] _postsAcceleratedCompositingNotifications])
         [[NSNotificationCenter defaultCenter] postNotificationName:_WebViewDidStartAcceleratedCompositingNotification object:[self _webView] userInfo:nil];
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-    // Do geometry flipping here, which flips all the compositing layers so they are top-down.
-    [viewLayer setGeometryFlipped:YES];
-#else
     if (WKExecutableWasLinkedOnOrBeforeLion())
         [viewLayer setGeometryFlipped:YES];
-#endif
 }
 
 - (void)detachRootLayer
index 9ab14a2..bea3675 100644 (file)
@@ -5122,19 +5122,6 @@ static BOOL findString(NSView <WebDocumentSearching> *searchView, NSString *stri
     return kit(_private->page->rangeOfString(string, core(previousRange), coreOptions(options)).get());
 }
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
-// FIXME: Remove once WebKit no longer needs to support versions of Safari that call this.
-- (void)setHoverFeedbackSuspended:(BOOL)newValue
-{
-}
-
-// FIXME: Remove once WebKit no longer needs to support versions of Safari that call this.
-- (BOOL)isHoverFeedbackSuspended
-{
-    return NO;
-}
-#endif
-
 - (void)setMainFrameDocumentReady:(BOOL)mainFrameDocumentReady
 {
     // by setting this to NO, calls to mainFrameDocument are forced to return nil
index 9b07c81..79332b8 100644 (file)
@@ -1,3 +1,16 @@
+2013-10-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove code for Mac Lion
+        https://bugs.webkit.org/show_bug.cgi?id=123542
+
+        Reviewed by Anders Carlsson.
+
+
+        * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView viewWillMoveToWindow:]):
+        * WebProcess/com.apple.WebProcess.sb.in:
+
 2013-10-30  Dan Bernstein  <mitz@apple.com>
 
         Try to fix the !WK_API_ENABLED Mac build.
index 7ba86c0..a360517 100644 (file)
 (define (home-literal home-relative-literal)
     (literal (string-append (param "HOME_DIR") home-relative-literal)))
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-;; Low level networking. Defined in system.sb on newer OS versions.
-(define (system-network)
-  (allow file-read*
-         (literal "/Library/Preferences/com.apple.networkd.plist"))
-  (allow mach-lookup
-         (global-name "com.apple.SystemConfiguration.PPPController")
-         (global-name "com.apple.SystemConfiguration.SCNetworkReachability")
-         (global-name "com.apple.networkd"))
-  (allow network-outbound
-         (control-name "com.apple.netsrc")
-         (control-name "com.apple.network.statistics"))
-  (allow system-socket
-         (require-all (socket-domain AF_SYSTEM)
-                      (socket-protocol 2)) ; SYSPROTO_CONTROL
-         (socket-domain AF_ROUTE)))
-#endif
-
 ;; Read-only preferences and data
 (allow file-read*
     ;; Basic system paths
index 57b34d9..fcf6b18 100644 (file)
@@ -382,13 +382,7 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windo
     }
 
     WebWheelEvent::Granularity granularity  = WebWheelEvent::ScrollByPixelWheelEvent;
-
-#if HAVE(INVERTED_WHEEL_EVENTS)
     bool directionInvertedFromDevice        = [event isDirectionInvertedFromDevice];
-#else
-    bool directionInvertedFromDevice        = false;
-#endif
-
     WebWheelEvent::Phase phase              = phaseForEvent(event);
     WebWheelEvent::Phase momentumPhase      = momentumPhaseForEvent(event);
     bool hasPreciseScrollingDeltas          = continuous;
index 1778c79..21343ba 100644 (file)
@@ -1906,16 +1906,7 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
     if (window == currentWindow)
         return;
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-    // Avoid calling the code added in 121482 that ensures that the undo stack is cleaned up
-    // before the WKView is moved from one window to another when the WKView is being moved
-    // out of a popover window. This avoids a bug in OS X 10.7 that was fixed in 10.8.
-    // While this technically reopens a potentially crashing code path that 121482 closed,
-    // it only reopens it for WKViews that are used for text editing and that are removed
-    // from an NSPopover at some time earlier than tear-down of the NSPopover.
-    if (![currentWindow isKindOfClass:NSClassFromString(@"_NSPopoverWindow")])
-#endif
-        _data->_pageClient->viewWillMoveToAnotherWindow();
+    _data->_pageClient->viewWillMoveToAnotherWindow();
     
     [self removeWindowObservers];
     [self addWindowObserversForWindow:window];
index 6859dd1..90bb0e6 100644 (file)
@@ -1,9 +1,6 @@
 (version 1)
 (deny default (with partial-symbolication))
 (allow system-audit file-read-metadata)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-(allow ipc-posix-shm)
-#endif
 
 (import "system.sb")
 
             (allow file-read* (subpath path))
             (allow file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") (subpath path))))))
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-;; Low level networking. Defined in system.sb on newer OS versions.
-(define (system-network)
-  (allow file-read*
-         (literal "/Library/Preferences/com.apple.networkd.plist"))
-  (allow mach-lookup
-         (global-name "com.apple.SystemConfiguration.PPPController")
-         (global-name "com.apple.SystemConfiguration.SCNetworkReachability")
-         (global-name "com.apple.networkd"))
-  (allow network-outbound
-         (control-name "com.apple.netsrc")
-         (control-name "com.apple.network.statistics"))
-  (allow system-socket
-         (require-all (socket-domain AF_SYSTEM)
-                      (socket-protocol 2)) ; SYSPROTO_CONTROL
-         (socket-domain AF_ROUTE)))
-
-;; Low level graphics. Defined in system.sb on newer OS versions.
-(define (system-graphics)
-    (allow mach-lookup (global-name "com.apple.cvmsServ"))
-    (allow iokit-open
-        (iokit-connection "IOAccelerator")
-        (iokit-user-client-class "IOAccelerationUserClient")
-        (iokit-user-client-class "IOSurfaceRootUserClient")
-        (iokit-user-client-class "IOSurfaceSendRight")
-        (iokit-user-client-class "IOFramebufferSharedUserClient")
-        (iokit-user-client-class "AppleSNBFBUserClient")
-        (iokit-user-client-class "AGPMClient")
-        (iokit-user-client-class "AppleGraphicsControlClient")))
-#endif
-
 ;; Read-only preferences and data
 (allow file-read*
        ;; Basic system paths
        (home-subpath "/Library/Caches/com.apple.WebProcess") ;; <rdar://problem/12656814>
 #endif
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-       (subpath (string-append (param "DARWIN_USER_CACHE_DIR") "/com.nvidia.OpenGL")) ;; <rdar://problem/13402976>
-#endif
-
        ;; FIXME: Should be removed after <rdar://problem/10463881> is fixed.
        (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2")
        (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2-journal"))
 (deny file-read* (with no-log)
        (home-literal "/Library/Preferences/com.apple.speech.recognition.AppleSpeechRecognition.prefs.plist")
        (subpath "/Library/InputManagers")
-       (home-subpath "/Library/InputManagers")
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-       (literal (string-append (param "DARWIN_USER_CACHE_DIR") "/com.apple.IntlDataCache.le"))
-       (literal (string-append (param "DARWIN_USER_CACHE_DIR") "/com.apple.IntlDataCache.le.kbdx"))
-#endif
-       )
+       (home-subpath "/Library/InputManagers"))
 (deny mach-lookup (with no-log)
        (global-name "com.apple.coreservices.appleevents")
        (global-name "com.apple.pasteboard.1")
        (home-subpath "/Library/Components")
        (home-subpath "/Library/Keyboard Layouts")
        (home-subpath "/Library/Input Methods"))
-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070
-(deny mach-lookup (with no-log) (global-name "com.apple.tsm.uiserver")) ;; <rdar://problem/13902706>
-#endif