[Mac] Remove "legacy" media UI
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 18:48:27 +0000 (18:48 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 18:48:27 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119752

Reviewed by Jer Noble.

Source/WebCore:

* WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.

* platform/mac/WebCoreSystemInterface.h: Update for API change.
* platform/mac/WebCoreSystemInterface.mm: Ditto.

* rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
(WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
(WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
    the current theme.
(WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
(WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
(WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
(WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
(WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
(WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
(WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
(WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceMountainLion.a

index ea8b10c..0b4da34 100644 (file)
@@ -1,3 +1,41 @@
+2013-08-15  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] Remove "legacy" media UI
+        https://bugs.webkit.org/show_bug.cgi?id=119752
+
+        Reviewed by Jer Noble.
+
+        * WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
+
+        * platform/mac/WebCoreSystemInterface.h: Update for API change.
+        * platform/mac/WebCoreSystemInterface.mm: Ditto.
+
+        * rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
+        (WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
+        (WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
+            the current theme.
+        (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
+        (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
+        (WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
+        (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
+        (WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
+        (WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
+        (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
+        (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
+        (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
+        (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
+        (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
+        (WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
+        (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
+        (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
+
 2013-08-15  Antti Koivisto  <antti@apple.com>
 
         <https://webkit.org/b/119834> Remove ElementShadow
index 244162e..72ea629 100644 (file)
@@ -1975,7 +1975,6 @@ _wkGetVerticalGlyphsForCharacters
 _wkGetWheelEventDeltas
 _wkHitTestMediaUIPart
 _wkMeasureMediaUIPart
-_wkMediaControllerThemeAvailable
 _wkPopupMenu
 _wkQTClearMediaDownloadCache
 _wkQTClearMediaDownloadCacheForSite
index ec8c681..b58eecc 100644 (file)
@@ -146,9 +146,9 @@ extern void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
 extern NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
 extern NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
 extern BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
-extern void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, 
+extern void (*wkDrawMediaSliderTrack)(CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
     float duration, unsigned state);
-extern void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
+extern void (*wkDrawMediaUIPart)(int part, CGContextRef context, CGRect rect, unsigned state);
 extern CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
 extern NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
 extern NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
@@ -159,8 +159,8 @@ extern NSDate *(*wkGetNSURLResponseLastModifiedDate)(NSURLResponse *response);
 extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response);
 extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous);
 extern UInt8 (*wkGetNSEventKeyChar)(NSEvent *);
-extern BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
-extern void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
+extern BOOL (*wkHitTestMediaUIPart)(int part, CGRect bounds, CGPoint point);
+extern void (*wkMeasureMediaUIPart)(int part, CGRect *bounds, CGSize *naturalSize);
 extern NSView *(*wkCreateMediaUIBackgroundView)(void);
 
 typedef enum {
@@ -177,7 +177,6 @@ extern NSControl *(*wkCreateMediaUIControl)(int);
 
 extern void (*wkWindowSetAlpha)(NSWindow *, float);
 extern void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect);
-extern BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
 extern void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*);
 extern unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void);
 extern int (*wkQTMovieDataRate)(QTMovie*);
index a9e6151..0125684 100644 (file)
@@ -50,16 +50,15 @@ void (*wkDrawFocusRing)(CGContextRef, CGColorRef, int radius);
 NSFont* (*wkGetFontInLanguageForRange)(NSFont*, NSString*, NSRange);
 NSFont* (*wkGetFontInLanguageForCharacter)(NSFont*, UniChar);
 BOOL (*wkGetGlyphTransformedAdvances)(CGFontRef, NSFont*, CGAffineTransform*, ATSGlyphRef*, CGSize* advance);
-void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, 
+void (*wkDrawMediaSliderTrack)(CGContextRef context, CGRect rect, float timeLoaded, float currentTime,
     float duration, unsigned state);
-BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point);
-void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
-void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
+BOOL (*wkHitTestMediaUIPart)(int part, CGRect bounds, CGPoint point);
+void (*wkDrawMediaUIPart)(int part, CGContextRef context, CGRect rect, unsigned state);
+void (*wkMeasureMediaUIPart)(int part, CGRect *bounds, CGSize *naturalSize);
 NSView *(*wkCreateMediaUIBackgroundView)(void);
 NSControl *(*wkCreateMediaUIControl)(int);
 void (*wkWindowSetAlpha)(NSWindow *, float);
 void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect);
-BOOL (*wkMediaControllerThemeAvailable)(int themeStyle);
 NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*);
 CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription);
 NSArray* (*wkGetExtensionsForMIMEType)(NSString*);
index a3cefee..188f8b4 100644 (file)
@@ -130,9 +130,7 @@ protected:
     virtual String extraFullScreenStyleSheet();
 #endif
 
-    virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const;
-    virtual bool usesMediaControlStatusDisplay();
-    virtual bool usesMediaControlVolumeSlider() const;
+    virtual bool usesMediaControlStatusDisplay() { return true; }
     virtual void adjustMediaSliderThumbSize(RenderStyle*) const;
     virtual IntPoint volumeSliderOffsetFromMuteButton(RenderBox*, const IntSize&) const OVERRIDE;
 #endif
index 3a8c286..1723af6 100644 (file)
@@ -182,33 +182,6 @@ NSView* RenderThemeMac::documentViewFor(RenderObject* o) const
 
 #if ENABLE(VIDEO)
 
-typedef enum {
-    MediaControllerThemeClassic   = 1,
-    MediaControllerThemeQuickTime = 2
-} MediaControllerThemeStyle;
-
-static int mediaControllerTheme()
-{
-    static int controllerTheme = -1;
-
-    if (controllerTheme != -1)
-        return controllerTheme;
-
-    controllerTheme = MediaControllerThemeClassic;
-
-    Boolean validKey;
-    Boolean useQTMediaUIPref = CFPreferencesGetAppBooleanValue(CFSTR("UseQuickTimeMediaUI"), CFSTR("com.apple.WebCore"), &validKey);
-
-    if (validKey && !useQTMediaUIPref)
-        return controllerTheme;
-
-    controllerTheme = MediaControllerThemeQuickTime;
-    return controllerTheme;
-}
-
-const int mediaSliderThumbWidth = 13;
-const int mediaSliderThumbHeight = 14;
-
 void RenderThemeMac::adjustMediaSliderThumbSize(RenderStyle* style) const
 {
     int wkPart;
@@ -226,15 +199,10 @@ void RenderThemeMac::adjustMediaSliderThumbSize(RenderStyle* style) const
         return;
     }
 
-    int width = mediaSliderThumbWidth;
-    int height = mediaSliderThumbHeight;
-
-    if (mediaControllerTheme() == MediaControllerThemeQuickTime) {
-        CGSize size;
-        wkMeasureMediaUIPart(wkPart, MediaControllerThemeQuickTime, NULL, &size);
-        width = size.width;
-        height = size.height;
-    }
+    CGSize size;
+    wkMeasureMediaUIPart(wkPart, NULL, &size);
+    int width = size.width;
+    int height = size.height;
 
     float zoomLevel = style->effectiveZoom();
     style->setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
@@ -263,7 +231,7 @@ static FloatRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const P
 {
     float zoomLevel = o->style()->effectiveZoom();
     FloatRect unzoomedRect(originalRect);
-    if (zoomLevel != 1.0f && mediaControllerTheme() == MediaControllerThemeQuickTime) {
+    if (zoomLevel != 1.0f) {
         unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
         unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
         paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
@@ -281,7 +249,7 @@ bool RenderThemeMac::paintMediaFullscreenButton(RenderObject* o, const PaintInfo
 
     if (node->isMediaControlElement()) {
         LocalCurrentGraphicsContext localContext(paintInfo.context);
-        wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+        wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     }
     return false;
 }
@@ -295,7 +263,7 @@ bool RenderThemeMac::paintMediaMuteButton(RenderObject* o, const PaintInfo& pain
 
     if (node->isMediaControlElement()) {
         LocalCurrentGraphicsContext localContext(paintInfo.context);
-        wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+        wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     }
     return false;
 }
@@ -309,7 +277,7 @@ bool RenderThemeMac::paintMediaPlayButton(RenderObject* o, const PaintInfo& pain
 
     if (node->isMediaControlElement()) {
         LocalCurrentGraphicsContext localContext(paintInfo.context);
-        wkDrawMediaUIPart(mediaControlElementType(node), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+        wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     }
     return false;
 }
@@ -321,7 +289,7 @@ bool RenderThemeMac::paintMediaSeekBackButton(RenderObject* o, const PaintInfo&
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaSeekBackButton, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaSeekBackButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -332,7 +300,7 @@ bool RenderThemeMac::paintMediaSeekForwardButton(RenderObject* o, const PaintInf
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaSeekForwardButton, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaSeekForwardButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -358,7 +326,7 @@ bool RenderThemeMac::paintMediaSliderTrack(RenderObject* o, const PaintInfo& pai
     CGContextRef context = cgContextContainer.context();
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
-    wkDrawMediaSliderTrack(mediaControllerTheme(), context, unzoomedRect,
+    wkDrawMediaSliderTrack(context, unzoomedRect,
         timeLoaded, currentTime, duration, getMediaUIPartStateFlags(node));
     return false;
 }
@@ -370,7 +338,7 @@ bool RenderThemeMac::paintMediaSliderThumb(RenderObject* o, const PaintInfo& pai
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaSliderThumb, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -381,7 +349,7 @@ bool RenderThemeMac::paintMediaRewindButton(RenderObject* o, const PaintInfo& pa
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaRewindButton, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaRewindButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -392,7 +360,7 @@ bool RenderThemeMac::paintMediaReturnToRealtimeButton(RenderObject* o, const Pai
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaReturnToRealtimeButton, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaReturnToRealtimeButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -403,7 +371,7 @@ bool RenderThemeMac::paintMediaControlsBackground(RenderObject* o, const PaintIn
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaTimelineContainer, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaTimelineContainer, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -416,7 +384,7 @@ bool RenderThemeMac::paintMediaCurrentTime(RenderObject* o, const PaintInfo& pai
     ContextContainer cgContextContainer(paintInfo.context);
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
-    wkDrawMediaUIPart(MediaCurrentTimeDisplay, mediaControllerTheme(), cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaCurrentTimeDisplay, cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -429,7 +397,7 @@ bool RenderThemeMac::paintMediaTimeRemaining(RenderObject* o, const PaintInfo& p
     ContextContainer cgContextContainer(paintInfo.context);
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
-    wkDrawMediaUIPart(MediaTimeRemainingDisplay, mediaControllerTheme(), cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaTimeRemainingDisplay, cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -440,7 +408,7 @@ bool RenderThemeMac::paintMediaVolumeSliderContainer(RenderObject* o, const Pain
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaVolumeSliderContainer, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaVolumeSliderContainer, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -451,7 +419,7 @@ bool RenderThemeMac::paintMediaVolumeSliderTrack(RenderObject* o, const PaintInf
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaVolumeSlider, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaVolumeSlider, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -462,7 +430,7 @@ bool RenderThemeMac::paintMediaVolumeSliderThumb(RenderObject* o, const PaintInf
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaVolumeSliderThumb, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaVolumeSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -473,7 +441,7 @@ bool RenderThemeMac::paintMediaFullScreenVolumeSliderTrack(RenderObject* o, cons
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaFullScreenVolumeSlider, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaFullScreenVolumeSlider, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
@@ -484,46 +452,22 @@ bool RenderThemeMac::paintMediaFullScreenVolumeSliderThumb(RenderObject* o, cons
         return false;
 
     LocalCurrentGraphicsContext localContext(paintInfo.context);
-    wkDrawMediaUIPart(MediaFullScreenVolumeSliderThumb, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+    wkDrawMediaUIPart(MediaFullScreenVolumeSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
     return false;
 }
 
 String RenderThemeMac::extraMediaControlsStyleSheet()
 {
-    if (mediaControllerTheme() == MediaControllerThemeQuickTime)
-        return String(mediaControlsQuickTimeUserAgentStyleSheet, sizeof(mediaControlsQuickTimeUserAgentStyleSheet));
-
-    return String();
+    return String(mediaControlsQuickTimeUserAgentStyleSheet, sizeof(mediaControlsQuickTimeUserAgentStyleSheet));
 }
 
 #if ENABLE(FULLSCREEN_API)
 String RenderThemeMac::extraFullScreenStyleSheet()
 {
-    if (mediaControllerTheme() == MediaControllerThemeQuickTime)
-        return String(fullscreenQuickTimeUserAgentStyleSheet, sizeof(fullscreenQuickTimeUserAgentStyleSheet));
-
-    return String();
+    return String(fullscreenQuickTimeUserAgentStyleSheet, sizeof(fullscreenQuickTimeUserAgentStyleSheet));
 }
 #endif
 
-bool RenderThemeMac::hasOwnDisabledStateHandlingFor(ControlPart part) const
-{
-    if (part == MediaMuteButtonPart)
-        return false;
-
-    return mediaControllerTheme() == MediaControllerThemeClassic;
-}
-
-bool RenderThemeMac::usesMediaControlStatusDisplay()
-{
-    return mediaControllerTheme() == MediaControllerThemeQuickTime;
-}
-
-bool RenderThemeMac::usesMediaControlVolumeSlider() const
-{
-    return mediaControllerTheme() == MediaControllerThemeQuickTime;
-}
-
 IntPoint RenderThemeMac::volumeSliderOffsetFromMuteButton(RenderBox* muteButtonBox, const IntSize& size) const
 {
     return RenderMediaControls::volumeSliderOffsetFromMuteButton(muteButtonBox, size);
index 1bc8013..f2656de 100644 (file)
@@ -1,3 +1,13 @@
+2013-08-15  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] Remove "legacy" media UI
+        https://bugs.webkit.org/show_bug.cgi?id=119752
+
+        Reviewed by Jer Noble.
+
+        * WebCoreSupport/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.
+
 2013-08-14  Tim Horton  <timothy_horton@apple.com>
 
         Remotely hosted plugins don’t work in window-server-hosted WebKit1 views
index 7c8db65..6ce6e31 100644 (file)
@@ -89,7 +89,6 @@ void InitWebCoreSystemInterface(void)
     INIT(CreateMediaUIControl);
     INIT(WindowSetAlpha);
     INIT(WindowSetScaledFrame);
-    INIT(MediaControllerThemeAvailable);
     INIT(PopupMenu);
     INIT(SetBaseCTM);
     INIT(SetCGFontRenderingMode);
index 69b7592..339dfb5 100644 (file)
@@ -1,3 +1,13 @@
+2013-08-15  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] Remove "legacy" media UI
+        https://bugs.webkit.org/show_bug.cgi?id=119752
+
+        Reviewed by Jer Noble.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+        (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.
+
 2013-08-14  Dean Jackson  <dino@apple.com>
 
         <https://webkit.org/b/119827> Allow primary plug-in detection to run more than once if necessary
index dd80341..76c6b6b 100644 (file)
@@ -77,7 +77,6 @@ void InitWebCoreSystemInterface(void)
         INIT(HitTestMediaUIPart);
         INIT(InitializeMaximumHTTPConnectionCountPerHost);
         INIT(MeasureMediaUIPart);
-        INIT(MediaControllerThemeAvailable);
         INIT(PopupMenu);
         INIT(QTIncludeOnlyModernMediaFileTypes);
         INIT(QTMovieDataRate);
index 8828b1c..bce3130 100644 (file)
@@ -1,3 +1,14 @@
+2013-08-15  Eric Carlson  <eric.carlson@apple.com>
+
+        [Mac] Remove "legacy" media UI
+        https://bugs.webkit.org/show_bug.cgi?id=119752
+
+        Reviewed by Jer Noble.
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLion.a:
+        * libWebKitSystemInterfaceMountainLion.a:
+
 2013-08-13  Simon Fraser  <simon.fraser@apple.com>
 
         Various media tests spew "CGContextScaleCTM: invalid context 0x0" errors
index 587f7cb..7844689 100644 (file)
@@ -41,7 +41,6 @@ NSArray *WKGetExtensionsForMIMEType(NSString *type);
 NSString *WKGetMIMETypeForExtension(NSString *extension);
 
 NSDate *WKGetNSURLResponseLastModifiedDate(NSURLResponse *response);
-NSTimeInterval WKGetNSURLResponseFreshnessLifetime(NSURLResponse *response);
 NSString *WKCopyNSURLResponseStatusLine(NSURLResponse *response);
 
 CFArrayRef WKCopyNSURLResponseCertificateChain(NSURLResponse *response);
@@ -298,22 +297,16 @@ typedef enum {
 } WKMediaUIPart;
 
 typedef enum {
-    WKMediaControllerThemeClassic   = 1,
-    WKMediaControllerThemeQuickTime = 2
-} WKMediaControllerThemeStyle;
-
-typedef enum {
     WKMediaControllerFlagDisabled = 1 << 0,
     WKMediaControllerFlagPressed = 1 << 1,
     WKMediaControllerFlagDrawEndCaps = 1 << 3,
     WKMediaControllerFlagFocused = 1 << 4
 } WKMediaControllerThemeState;
 
-BOOL WKMediaControllerThemeAvailable(int themeStyle);
-BOOL WKHitTestMediaUIPart(int part, int themeStyle, CGRect bounds, CGPoint point);
-void WKMeasureMediaUIPart(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize);
-void WKDrawMediaUIPart(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state);
-void WKDrawMediaSliderTrack(int themeStyle, CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
+BOOL WKHitTestMediaUIPart(int part, CGRect bounds, CGPoint point);
+void WKMeasureMediaUIPart(int part, CGRect *bounds, CGSize *naturalSize);
+void WKDrawMediaUIPart(int part, CGContextRef context, CGRect rect, unsigned state);
+void WKDrawMediaSliderTrack(CGContextRef context, CGRect rect, float timeLoaded, float currentTime, float duration, unsigned state);
 NSView *WKCreateMediaUIBackgroundView(void);
 
 typedef enum {
index e93552b..21834e8 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLion.a and b/WebKitLibraries/libWebKitSystemInterfaceLion.a differ
index 6878d09..cce86ae 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a and b/WebKitLibraries/libWebKitSystemInterfaceMountainLion.a differ