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

Unified Diff: Source/core/platform/mac/ScrollAnimatorMac.mm

Issue 21296003: Split ScrollbarThemeMac into Overlay and NonOverlay subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@composited_scrollbar_after_refactor
Patch Set: Rebase Created 7 years, 5 months 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
« no previous file with comments | « no previous file | Source/core/platform/mac/ScrollbarThemeMac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/mac/ScrollAnimatorMac.mm
diff --git a/Source/core/platform/mac/ScrollAnimatorMac.mm b/Source/core/platform/mac/ScrollAnimatorMac.mm
index 51624ec0c4bea4842af3d920d197556dab32a673..43d411dc6107680f8cb3ded63b206855f0041966 100644
--- a/Source/core/platform/mac/ScrollAnimatorMac.mm
+++ b/Source/core/platform/mac/ScrollAnimatorMac.mm
@@ -63,15 +63,16 @@ static bool supportsContentAreaScrolledInDirection()
return globalSupportsContentAreaScrolledInDirection;
}
-static ScrollbarThemeMac* macScrollbarTheme()
+static ScrollbarThemeMacOverlayAPI* macOverlayScrollbarTheme()
{
+ RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(isScrollbarOverlayAPIAvailable());
ScrollbarTheme* scrollbarTheme = ScrollbarTheme::theme();
- return !scrollbarTheme->isMockTheme() ? static_cast<ScrollbarThemeMac*>(scrollbarTheme) : 0;
+ return !scrollbarTheme->isMockTheme() ? static_cast<ScrollbarThemeMacOverlayAPI*>(scrollbarTheme) : 0;
}
static ScrollbarPainter scrollbarPainterForScrollbar(Scrollbar* scrollbar)
{
- if (ScrollbarThemeMac* scrollbarTheme = macScrollbarTheme())
+ if (ScrollbarThemeMacOverlayAPI* scrollbarTheme = macOverlayScrollbarTheme())
return scrollbarTheme->painterForScrollbar(scrollbar);
return nil;
@@ -1189,7 +1190,7 @@ void ScrollAnimatorMac::updateScrollerStyle()
return;
}
- ScrollbarThemeMac* macTheme = macScrollbarTheme();
+ ScrollbarThemeMacOverlayAPI* macTheme = macOverlayScrollbarTheme();
if (!macTheme) {
m_needsScrollerStyleUpdate = false;
return;
« no previous file with comments | « no previous file | Source/core/platform/mac/ScrollbarThemeMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698