macOS: Fix issue with display of auto-hide scrollbars

This commit is contained in:
Marshall Greenblatt 2017-02-08 11:23:13 -05:00
parent 0ba0378d19
commit 80258004b9
2 changed files with 32 additions and 0 deletions

View File

@ -330,4 +330,10 @@ patches = [
'name': 'webkit_scroll_mac_644144', 'name': 'webkit_scroll_mac_644144',
'path': '../', 'path': '../',
}, },
{
# Fix issue with display of auto-hide scrollbars on macOS.
# https://bugs.chromium.org/p/chromium/issues/detail?id=688516#c6
'name': 'webkit_scroll_mac_688516',
'path': '../',
},
] ]

View File

@ -0,0 +1,26 @@
diff --git third_party/WebKit/Source/core/frame/FrameView.cpp third_party/WebKit/Source/core/frame/FrameView.cpp
index 3ed16e5..3b2ce10 100644
--- third_party/WebKit/Source/core/frame/FrameView.cpp
+++ third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -386,9 +386,9 @@ void FrameView::ScrollbarManager::setHasHorizontalScrollbar(bool hasScrollbar) {
if (hasScrollbar) {
m_hBar = createScrollbar(HorizontalScrollbar);
m_scrollableArea->layoutBox()->document().view()->addChild(m_hBar.get());
+ m_hBarIsAttached = 1;
m_scrollableArea->didAddScrollbar(*m_hBar, HorizontalScrollbar);
m_hBar->styleChanged();
- m_hBarIsAttached = 1;
} else {
m_hBarIsAttached = 0;
destroyScrollbar(HorizontalScrollbar);
@@ -404,9 +404,9 @@ void FrameView::ScrollbarManager::setHasVerticalScrollbar(bool hasScrollbar) {
if (hasScrollbar) {
m_vBar = createScrollbar(VerticalScrollbar);
m_scrollableArea->layoutBox()->document().view()->addChild(m_vBar.get());
+ m_vBarIsAttached = 1;
m_scrollableArea->didAddScrollbar(*m_vBar, VerticalScrollbar);
m_vBar->styleChanged();
- m_vBarIsAttached = 1;
} else {
m_vBarIsAttached = 0;
destroyScrollbar(VerticalScrollbar);