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

Unified Diff: Source/core/frame/FrameView.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
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/VisualViewport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index feffce69b9fc3057ce92d0ef13c11897d32aa012..704530f2b7b1dea3924434ccc600b7874f904358 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -676,6 +676,13 @@ bool FrameView::usesCompositedScrolling() const
return false;
}
+GraphicsLayer* FrameView::layerForScrollbarContainer() const
skobes 2015/08/25 00:19:01 Do we need a similar override in DeprecatedPaintLa
aelias_OOO_until_Jul13 2015/08/25 02:50:27 Done, and I also fixed the layer attachment with t
+{
+ if (m_frame->isMainFrame())
+ return page()->frameHost().visualViewport().layerForScrollbarContainer();
+ return layerForContainer();
+}
+
GraphicsLayer* FrameView::layerForScrolling() const
{
LayoutView* layoutView = this->layoutView();
@@ -2957,11 +2964,6 @@ bool FrameView::isFlippedDocument() const
return layoutView->hasFlippedBlocksWritingMode();
}
-bool FrameView::visualViewportSuppliesScrollbars() const
-{
- return m_frame->isMainFrame() && m_frame->settings() && m_frame->settings()->viewportMetaEnabled();
-}
-
AXObjectCache* FrameView::axObjectCache() const
{
if (frame().document())
@@ -3209,7 +3211,6 @@ void FrameView::windowResizerRectChanged()
bool FrameView::hasOverlayScrollbars() const
{
-
return (m_horizontalScrollbar && m_horizontalScrollbar->isOverlayScrollbar())
|| (m_verticalScrollbar && m_verticalScrollbar->isOverlayScrollbar());
}
@@ -3241,8 +3242,11 @@ void FrameView::computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool&
if (vScroll == ScrollbarAuto)
newHasVerticalScrollbar = docSize.height() > visibleHeight();
- if (hasOverlayScrollbars())
+ if (hasOverlayScrollbars()) {
+ if (m_frame->isMainFrame())
+ newHasHorizontalScrollbar = newHasVerticalScrollbar = true;
skobes 2015/08/25 00:19:01 Why is this needed?
aelias_OOO_until_Jul13 2015/08/25 02:50:27 So that scrollbars are shown when zooming in (part
aelias_OOO_until_Jul13 2015/08/26 04:47:48 Unfortunately, this approach turned out to be flak
return;
+ }
IntSize fullVisibleSize = visibleContentRect(IncludeScrollbars).size();
@@ -3383,14 +3387,6 @@ bool FrameView::shouldIgnoreOverflowHidden() const
void FrameView::updateScrollbars(const DoubleSize& desiredOffset)
{
- // Avoid drawing two sets of scrollbars when visual viewport is enabled.
- if (visualViewportSuppliesScrollbars()) {
- setHasHorizontalScrollbar(false);
- setHasVerticalScrollbar(false);
- setScrollOffsetFromUpdateScrollbars(desiredOffset);
- return;
- }
-
if (m_inUpdateScrollbars)
return;
InUpdateScrollbarsScope inUpdateScrollbarsScope(this);
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/VisualViewport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698