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

Unified Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 856443005: Delete some noop and dead scrollbar code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | sky/engine/platform/Widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/sky/engine/core/rendering/RenderLayerScrollableArea.cpp b/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
index 37bf7b37d2abfaacb81f4a88fd5ae96f8ffb51ab..bf0fa93791f0edba2ad32bd928afac3024f5033d 100644
--- a/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
+++ b/sky/engine/core/rendering/RenderLayerScrollableArea.cpp
@@ -376,12 +376,6 @@ void RenderLayerScrollableArea::updateAfterLayout()
bool hasHorizontalOverflow = this->hasHorizontalOverflow();
bool hasVerticalOverflow = this->hasVerticalOverflow();
- // overflow:scroll should just enable/disable.
- if (box().style()->overflowX() == OSCROLL)
- horizontalScrollbar()->setEnabled(hasHorizontalOverflow);
- if (box().style()->overflowY() == OSCROLL)
- verticalScrollbar()->setEnabled(hasVerticalOverflow);
-
// overflow:auto may need to lay out again if scrollbars got added/removed.
if (box().hasAutoHorizontalScrollbar())
setHasHorizontalScrollbar(hasHorizontalOverflow);
@@ -462,22 +456,13 @@ void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty
EOverflow overflowY = box().style()->overflowY();
// To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep any automatic scrollbar that was already present.
+ // FIXME(sky): We only have overlay scrollbars, so we never do a relayout
+ // due to scrollbars. We probably don't need to do this at all. Also,
+ // updateScrollbarsAfterLayout not longer exists.
bool needsHorizontalScrollbar = (hasHorizontalScrollbar() && overflowDefinesAutomaticScrollbar(overflowX)) || overflowRequiresScrollbar(overflowX);
bool needsVerticalScrollbar = (hasVerticalScrollbar() && overflowDefinesAutomaticScrollbar(overflowY)) || overflowRequiresScrollbar(overflowY);
setHasHorizontalScrollbar(needsHorizontalScrollbar);
setHasVerticalScrollbar(needsVerticalScrollbar);
-
- // With overflow: scroll, scrollbars are always visible but may be disabled.
- // When switching to another value, we need to re-enable them (see bug 11985).
- if (needsHorizontalScrollbar && oldStyle && oldStyle->overflowX() == OSCROLL && overflowX != OSCROLL) {
- ASSERT(hasHorizontalScrollbar());
- m_hBar->setEnabled(true);
- }
-
- if (needsVerticalScrollbar && oldStyle && oldStyle->overflowY() == OSCROLL && overflowY != OSCROLL) {
- ASSERT(hasVerticalScrollbar());
- m_vBar->setEnabled(true);
- }
}
bool RenderLayerScrollableArea::updateAfterCompositingChange()
« no previous file with comments | « no previous file | sky/engine/platform/Widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698