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

Unified Diff: sky/engine/core/rendering/RenderLayerScrollableArea.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
Index: sky/engine/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/sky/engine/core/rendering/RenderLayerScrollableArea.cpp b/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
index 256d20d050e67acbe0d1bf240f9a0a15f441d09e..b858ed39557e068579af38bc71244eb0f0d20c6e 100644
--- a/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
+++ b/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
@@ -327,15 +327,8 @@ IntPoint RenderLayerScrollableArea::maximumScrollPosition() const
IntRect RenderLayerScrollableArea::visibleContentRect(IncludeScrollbarsInRect scrollbarInclusion) const
{
- int verticalScrollbarWidth = 0;
- int horizontalScrollbarHeight = 0;
- if (scrollbarInclusion == IncludeScrollbars) {
- verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()) ? verticalScrollbar()->width() : 0;
- horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar()) ? horizontalScrollbar()->height() : 0;
- }
-
return IntRect(IntPoint(scrollXOffset(), scrollYOffset()),
- IntSize(max(0, layer()->size().width() - verticalScrollbarWidth), max(0, layer()->size().height() - horizontalScrollbarHeight)));
+ IntSize(max(0, layer()->size().width()), max(0, layer()->size().height())));
}
int RenderLayerScrollableArea::visibleHeight() const
@@ -430,7 +423,7 @@ void RenderLayerScrollableArea::computeScrollDimensions()
m_overflowRect = box().layoutOverflowRect();
- int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft() - (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box().verticalScrollbarWidth() : 0);
+ int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft();
int scrollableTopOverflow = m_overflowRect.y() - box().borderTop();
setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
}
@@ -739,20 +732,6 @@ void RenderLayerScrollableArea::setHasVerticalScrollbar(bool hasScrollbar)
}
}
-int RenderLayerScrollableArea::verticalScrollbarWidth(OverlayScrollbarSizeRelevancy relevancy) const
-{
- if (!m_vBar || (m_vBar->isOverlayScrollbar() && (relevancy == IgnoreOverlayScrollbarSize || !m_vBar->shouldParticipateInHitTesting())))
- return 0;
- return m_vBar->width();
-}
-
-int RenderLayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy relevancy) const
-{
- if (!m_hBar || (m_hBar->isOverlayScrollbar() && (relevancy == IgnoreOverlayScrollbarSize || !m_hBar->shouldParticipateInHitTesting())))
- return 0;
- return m_hBar->height();
-}
-
void RenderLayerScrollableArea::positionOverflowControls(const IntSize& offsetFromRoot)
{
if (!hasScrollbar())
« no previous file with comments | « sky/engine/core/rendering/RenderLayerScrollableArea.h ('k') | sky/engine/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698