WebCore:
authoradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2008 01:40:02 +0000 (01:40 +0000)
committeradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2008 01:40:02 +0000 (01:40 +0000)
        Reviewed by Antti.

        Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing

        * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
        Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.

LayoutTests:

        Reviewed by Antti.

        Removing test from Skipped list for <rdar://5683527> media/{audio,video|-controls-rendering.html failing

        * platform/win/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/rendering/RenderThemeSafari.cpp

index 962eafe..422f164 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-29  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Antti.
+
+        Removing test from Skipped list for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
+        
+        * platform/win/Skipped:
+
 2008-01-29  Dan Bernstein  <mitz@apple.com>
 
         - re-add  a couple of tests that are still failing back to the list
@@ -3785,7 +3793,6 @@ to skip list since it is still failing on tiger.
         * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt: Added.
         * svg/custom/foreignObject-crash-on-hover.xml: Added.
 
->>>>>>> .r29342
 2007-12-21  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Adele.
index 9a5c073..f19b074 100644 (file)
@@ -289,10 +289,6 @@ fast/xsl/sort-unicode.xml
 # <rdar://5683523> Failing on at least one bot
 fast/dom/Window/window-screen-properties.html
 
-# <rdar://5683527>
-media/audio-controls-rendering.html
-media/video-controls-rendering.html
-
 # <rdar://5686091> This test crashes, and sometimes freezes buildbot.
 fast/frames/frame-name-reset.html
 
index 9fe4634..4fe78b1 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-29  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Antti.
+
+        Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
+        
+        * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
+        Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.
+
 2008-01-29  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Dave Hyatt.
index ed82c54..56b25df 100644 (file)
@@ -207,13 +207,6 @@ bool RenderThemeSafari::isControlStyled(const RenderStyle* style, const BorderDa
 
     if (style->appearance() == TextFieldAppearance || style->appearance() == TextAreaAppearance || style->appearance() == ListboxAppearance)
         return style->border() != border;
-#if !defined(SAFARI_THEME_VERSION) || SAFARI_THEME_VERSION < 2
-    if (style->appearance() == MediaFullscreenButtonAppearance || style->appearance() == MediaMuteButtonAppearance || 
-        style->appearance() == MediaPlayButtonAppearance || style->appearance() == MediaSeekBackButtonAppearance || 
-        style->appearance() == MediaSeekForwardButtonAppearance || style->appearance() == MediaSliderAppearance || 
-        style->appearance() == MediaSliderThumbAppearance)
-        return true;
-#endif
     return RenderTheme::isControlStyled(style, border, background, backgroundColor);
 }
 
@@ -1128,9 +1121,8 @@ bool RenderThemeSafari::paintSearchFieldResultsButton(RenderObject* o, const Ren
 #if ENABLE(VIDEO)
 bool RenderThemeSafari::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    ASSERT(SafariThemeLibrary());
-
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     paintThemePart(MediaFullscreenButtonPart, paintInfo.context->platformContext(), r, NSRegularControlSize, determineState(o));
 #endif
 
@@ -1139,8 +1131,6 @@ bool RenderThemeSafari::paintMediaFullscreenButton(RenderObject* o, const Render
 
 bool RenderThemeSafari::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    ASSERT(SafariThemeLibrary());
-
     Node* node = o->element();
     Node* mediaNode = node ? node->shadowAncestorNode() : 0;
     if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
@@ -1151,6 +1141,7 @@ bool RenderThemeSafari::paintMediaMuteButton(RenderObject* o, const RenderObject
         return false;
 
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     paintThemePart(mediaElement->muted() ? MediaUnMuteButtonPart : MediaMuteButtonPart, paintInfo.context->platformContext(), r, NSRegularControlSize, determineState(o));
 #endif
 
@@ -1159,8 +1150,6 @@ bool RenderThemeSafari::paintMediaMuteButton(RenderObject* o, const RenderObject
 
 bool RenderThemeSafari::paintMediaPlayButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    ASSERT(SafariThemeLibrary());
-
     Node* node = o->element();
     Node* mediaNode = node ? node->shadowAncestorNode() : 0;
     if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
@@ -1171,6 +1160,7 @@ bool RenderThemeSafari::paintMediaPlayButton(RenderObject* o, const RenderObject
         return false;
 
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     paintThemePart(mediaElement->canPlay() ? MediaPlayButtonPart : MediaPauseButtonPart, paintInfo.context->platformContext(), r, NSRegularControlSize, determineState(o));
 #endif
 
@@ -1179,9 +1169,8 @@ bool RenderThemeSafari::paintMediaPlayButton(RenderObject* o, const RenderObject
 
 bool RenderThemeSafari::paintMediaSeekBackButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    ASSERT(SafariThemeLibrary());
-
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     paintThemePart(MediaSeekBackButtonPart, paintInfo.context->platformContext(), r, NSRegularControlSize, determineState(o));
 #endif
 
@@ -1190,9 +1179,8 @@ bool RenderThemeSafari::paintMediaSeekBackButton(RenderObject* o, const RenderOb
 
 bool RenderThemeSafari::paintMediaSeekForwardButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)
 {
-    ASSERT(SafariThemeLibrary());
-
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     paintThemePart(MediaSeekForwardButtonPart, paintInfo.context->platformContext(), r, NSRegularControlSize, determineState(o));
 #endif
 
@@ -1216,6 +1204,7 @@ bool RenderThemeSafari::paintMediaSliderTrack(RenderObject* o, const RenderObjec
             percentLoaded = player->maxTimeBuffered() / player->duration();
 
 #if defined(SAFARI_THEME_VERSION) && SAFARI_THEME_VERSION >= 2
+    ASSERT(SafariThemeLibrary());
     STPaintProgressIndicator(SafariTheme::MediaType, paintInfo.context->platformContext(), r, NSRegularControlSize, 0, percentLoaded);
 #endif
     return false;