Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp

Issue 1424983002: Invalidate scrollbars when window activity changes if needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: be forceful about 10.6-only Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698