Chromium Code Reviews| 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); |