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

Unified Diff: Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp

Issue 1308053003: Replace pinch scrollbars with regular scrollbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix comment Created 5 years, 4 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
Index: Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp b/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
index 63f56eff5de1c566f985714effbe658a72e07934..1aa161200af7a2cb47ccb758dbded004915a155e 100644
--- a/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
+++ b/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp
@@ -687,7 +687,7 @@ void DeprecatedPaintLayerScrollableArea::updateAfterLayout()
|| (box().style()->overflowX() == OSCROLL && !horizontalScrollbar());
bool verticalScrollBarChanged = (box().hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow))
|| (box().style()->overflowY() == OSCROLL && !verticalScrollbar());
- if (!visualViewportSuppliesScrollbars() && (horizontalScrollBarChanged || verticalScrollBarChanged)) {
+ if (horizontalScrollBarChanged || verticalScrollBarChanged) {
if (box().hasAutoHorizontalScrollbar() || (box().style()->overflowX() == OSCROLL && !horizontalScrollbar()))
setHasHorizontalScrollbar(box().style()->overflowX() == OSCROLL ? true : hasHorizontalOverflow);
if (box().hasAutoVerticalScrollbar() || (box().style()->overflowY() == OSCROLL && !verticalScrollbar()))
@@ -804,13 +804,6 @@ void DeprecatedPaintLayerScrollableArea::updateAfterStyleChange(const ComputedSt
if (!canHaveOverflowScrollbars(box()))
return;
- // Avoid drawing two sets of scrollbars when one is provided by the visual viewport.
- if (visualViewportSuppliesScrollbars()) {
- setHasHorizontalScrollbar(false);
- setHasVerticalScrollbar(false);
- return;
- }
-
EOverflow overflowX = box().style()->overflowX();
EOverflow overflowY = box().style()->overflowY();
@@ -1465,16 +1458,4 @@ void DeprecatedPaintLayerScrollableArea::setTopmostScrollChild(DeprecatedPaintLa
m_nextTopmostScrollChild = scrollChild;
}
-bool DeprecatedPaintLayerScrollableArea::visualViewportSuppliesScrollbars() const
-{
- if (!layer()->isRootLayer())
- return false;
-
- LocalFrame* frame = box().frame();
- if (!frame || !frame->isMainFrame() || !frame->settings())
- return false;
-
- return frame->settings()->viewportMetaEnabled();
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698