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

Unified Diff: sky/engine/platform/scroll/ScrollableArea.cpp

Issue 707233006: Remove scrollbar width/height computations from layout. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/rendering/RenderLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/scroll/ScrollableArea.cpp
diff --git a/sky/engine/platform/scroll/ScrollableArea.cpp b/sky/engine/platform/scroll/ScrollableArea.cpp
index d467c57ef89e9f49c43c0ea6dd56bef33b6d1fd4..b4a046d7264b0279cb3b6b1e2a67f8d76e34c1aa 100644
--- a/sky/engine/platform/scroll/ScrollableArea.cpp
+++ b/sky/engine/platform/scroll/ScrollableArea.cpp
@@ -422,20 +422,10 @@ void ScrollableArea::cancelProgrammaticScrollAnimation()
IntRect ScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion) const
{
- int verticalScrollbarWidth = 0;
- int horizontalScrollbarHeight = 0;
-
- if (scrollbarInclusion == IncludeScrollbars) {
- if (Scrollbar* verticalBar = verticalScrollbar())
- verticalScrollbarWidth = !verticalBar->isOverlayScrollbar() ? verticalBar->width() : 0;
- if (Scrollbar* horizontalBar = horizontalScrollbar())
- horizontalScrollbarHeight = !horizontalBar->isOverlayScrollbar() ? horizontalBar->height() : 0;
- }
-
return IntRect(scrollPosition().x(),
scrollPosition().y(),
- std::max(0, visibleWidth() + verticalScrollbarWidth),
- std::max(0, visibleHeight() + horizontalScrollbarHeight));
+ std::max(0, visibleWidth()),
+ std::max(0, visibleHeight()));
}
IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) const
« no previous file with comments | « sky/engine/core/rendering/RenderLayerScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698