Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
index 469b6394d93039316d13b0c77627a23340e1f873..93f924051cc83c4dcd970604bb3372a3128b312f 100644 |
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp |
@@ -30,6 +30,11 @@ |
#include "platform/PlatformGestureEvent.h" |
#include "platform/PlatformMouseEvent.h" |
#include "platform/graphics/paint/CullRect.h" |
+// See windowActiveChangedForSnowLeopardOnly() below. |
+// TODO(ellyjones): remove this when Snow Leopard support is gone. |
+#if OS(MACOSX) |
+#include "platform/mac/VersionUtilMac.h" |
+#endif |
#include "platform/scroll/ScrollAnimatorBase.h" |
#include "platform/scroll/ScrollableArea.h" |
#include "platform/scroll/ScrollbarTheme.h" |
@@ -493,6 +498,21 @@ bool Scrollbar::shouldParticipateInHitTesting() |
return m_scrollableArea->scrollAnimator()->shouldScrollbarParticipateInHitTesting(this); |
} |
+// Don't use this method. It will be removed later. |
+// TODO(ellyjones): remove this method after Snow Leopard support drops. |
+void Scrollbar::windowActiveChangedForSnowLeopardOnly() |
+{ |
+#if OS(MACOSX) |
+ // On Snow Leopard, scrollbars need to be invalidated when the window |
+ // activity changes so that they take on the "inactive" scrollbar |
+ // appearance. Later OS X releases do not have such an appearance. |
+ if (m_theme && m_theme->invalidateOnWindowActiveChange()) { |
+ ASSERT(IsOSSnowLeopard()); |
+ invalidate(); |
+ } |
+#endif |
+} |
+ |
bool Scrollbar::isWindowActive() const |
{ |
return m_scrollableArea && m_scrollableArea->isActive(); |