Title: [158330] trunk/Source
Revision
158330
Author
rn...@webkit.org
Date
2013-10-30 17:14:28 -0700 (Wed, 30 Oct 2013)

Log Message

Remove code for Mac Lion
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:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (158329 => 158330)


--- trunk/Source/WTF/ChangeLog	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WTF/ChangeLog	2013-10-31 00:14:28 UTC (rev 158330)
@@ -1,3 +1,12 @@
+2013-10-30  Ryosuke Niwa  <rn...@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-sze...@partner.samsung.com>
 
         Remove PCRE workaround.

Modified: trunk/Source/WTF/wtf/Platform.h (158329 => 158330)


--- trunk/Source/WTF/wtf/Platform.h	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WTF/wtf/Platform.h	2013-10-31 00:14:28 UTC (rev 158330)
@@ -964,7 +964,7 @@
 #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
 
@@ -992,10 +992,6 @@
 #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
@@ -1018,11 +1014,12 @@
 #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

Modified: trunk/Source/WebCore/ChangeLog (158329 => 158330)


--- trunk/Source/WebCore/ChangeLog	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/ChangeLog	2013-10-31 00:14:28 UTC (rev 158330)
@@ -1,3 +1,39 @@
+2013-10-30  Ryosuke Niwa  <rn...@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  <a...@apple.com>
 
         85 inspector tests asserting in DrawingAreaProxyImpl::updateAcceleratedCompositingMode()

Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (158329 => 158330)


--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h	2013-10-31 00:14:28 UTC (rev 158330)
@@ -138,7 +138,6 @@
 #if USE(CG)
         RetainPtr<CGImageRef> copyNativeImage(BackingStoreCopy = CopyBackingStore) const;
         void flushContext() const;
-        void flushContextIfNecessary() const;
 #endif
         void clip(GraphicsContext*, const FloatRect&) const;
 

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (158329 => 158330)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2013-10-31 00:14:28 UTC (rev 158330)
@@ -50,10 +50,6 @@
 #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 @@
     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 @@
 
 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,13 +237,9 @@
         }
     }
 #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);
 }

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h (158329 => 158330)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h	2013-10-31 00:14:28 UTC (rev 158330)
@@ -54,9 +54,6 @@
     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);

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (158329 => 158330)


--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp	2013-10-31 00:14:28 UTC (rev 158330)
@@ -102,17 +102,7 @@
 
     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, 

Modified: trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm (158329 => 158330)


--- trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -219,14 +219,8 @@
         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 {

Modified: trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -446,12 +446,7 @@
         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
     }
 };
 

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -668,12 +668,7 @@
 
 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;
 }

Modified: trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/ScrollElasticityController.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -63,33 +63,8 @@
 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 @@
 {
     return wkNSReboundDeltaForElasticDelta(delta);
 }
-#endif
 
 static float scrollWheelMultiplier()
 {

Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/ThemeMac.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -172,14 +172,6 @@
     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 @@
     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 @@
     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 @@
         [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])

Modified: trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.h	2013-10-31 00:14:28 UTC (rev 158330)
@@ -25,12 +25,6 @@
 
 #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

Modified: trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.m (158329 => 158330)


--- trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.m	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSCellExtras.m	2013-10-31 00:14:28 UTC (rev 158330)
@@ -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

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (158329 => 158330)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -759,21 +759,6 @@
 {
     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 @@
 
     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 @@
     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 @@
         [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();

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in (158329 => 158330)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/AboutDataHaveFeatures.in	2013-10-31 00:14:28 UTC (rev 158330)
@@ -20,7 +20,6 @@
 HEADER_DETECTION_H
 HOSTED_CORE_ANIMATION
 INTERNAL_VISIBILITY
-INVERTED_WHEEL_EVENTS
 ISDEBUGGERPRESENT
 JNI
 LANGINFO_H

Modified: trunk/Source/WebKit/mac/ChangeLog (158329 => 158330)


--- trunk/Source/WebKit/mac/ChangeLog	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-10-31 00:14:28 UTC (rev 158330)
@@ -1,3 +1,14 @@
+2013-10-30  Ryosuke Niwa  <rn...@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  <aes...@apple.com>
 
         [iOS] Upstream Source/WebKit/ios/

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (158329 => 158330)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -5431,13 +5431,8 @@
     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

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (158329 => 158330)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -5122,19 +5122,6 @@
     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

Modified: trunk/Source/WebKit2/ChangeLog (158329 => 158330)


--- trunk/Source/WebKit2/ChangeLog	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit2/ChangeLog	2013-10-31 00:14:28 UTC (rev 158330)
@@ -1,3 +1,16 @@
+2013-10-30  Ryosuke Niwa  <rn...@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  <m...@apple.com>
 
         Try to fix the !WK_API_ENABLED Mac build.

Modified: trunk/Source/WebKit2/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in (158329 => 158330)


--- trunk/Source/WebKit2/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit2/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2013-10-31 00:14:28 UTC (rev 158330)
@@ -14,24 +14,6 @@
 (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

Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm (158329 => 158330)


--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -382,13 +382,7 @@
     }
 
     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;

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (158329 => 158330)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-10-31 00:14:28 UTC (rev 158330)
@@ -1906,16 +1906,7 @@
     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];

Modified: trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in (158329 => 158330)


--- trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in	2013-10-30 23:59:25 UTC (rev 158329)
+++ trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in	2013-10-31 00:14:28 UTC (rev 158330)
@@ -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")
 
@@ -23,37 +20,6 @@
             (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
@@ -278,10 +244,6 @@
        (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"))
@@ -291,12 +253,7 @@
 (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")
@@ -309,7 +266,3 @@
        (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
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to