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

Unified Diff: Source/core/platform/ScrollableArea.cpp

Issue 65573002: Remove Scrollbar dependency on AXObjectCache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « Source/core/platform/ScrollableArea.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/ScrollableArea.cpp
diff --git a/Source/core/platform/ScrollableArea.cpp b/Source/core/platform/ScrollableArea.cpp
index 0c608acb7f7fd22c5b7b8b13c88c1b23837ca529..3fa7616400dab9c67f60be057ab1873b29297086 100644
--- a/Source/core/platform/ScrollableArea.cpp
+++ b/Source/core/platform/ScrollableArea.cpp
@@ -275,30 +275,23 @@ void ScrollableArea::finishCurrentScrollAnimations() const
scrollAnimator->finishCurrentScrollAnimations();
}
-void ScrollableArea::didAddVerticalScrollbar(Scrollbar* scrollbar)
+void ScrollableArea::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
{
- scrollAnimator()->didAddVerticalScrollbar(scrollbar);
-
- // <rdar://problem/9797253> AppKit resets the scrollbar's style when you attach a scrollbar
- setScrollbarOverlayStyle(scrollbarOverlayStyle());
-}
-
-void ScrollableArea::willRemoveVerticalScrollbar(Scrollbar* scrollbar)
-{
- scrollAnimator()->willRemoveVerticalScrollbar(scrollbar);
-}
-
-void ScrollableArea::didAddHorizontalScrollbar(Scrollbar* scrollbar)
-{
- scrollAnimator()->didAddHorizontalScrollbar(scrollbar);
+ if (orientation == VerticalScrollbar)
+ scrollAnimator()->didAddVerticalScrollbar(scrollbar);
+ else
+ scrollAnimator()->didAddHorizontalScrollbar(scrollbar);
// <rdar://problem/9797253> AppKit resets the scrollbar's style when you attach a scrollbar
setScrollbarOverlayStyle(scrollbarOverlayStyle());
}
-void ScrollableArea::willRemoveHorizontalScrollbar(Scrollbar* scrollbar)
+void ScrollableArea::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
{
- scrollAnimator()->willRemoveHorizontalScrollbar(scrollbar);
+ if (orientation == VerticalScrollbar)
+ scrollAnimator()->willRemoveVerticalScrollbar(scrollbar);
+ else
+ scrollAnimator()->willRemoveHorizontalScrollbar(scrollbar);
}
void ScrollableArea::contentsResized()
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698