From 80258004b9eb492d5c6ef30971aa22e71c4cacb9 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 8 Feb 2017 11:23:13 -0500 Subject: [PATCH] macOS: Fix issue with display of auto-hide scrollbars --- patch/patch.cfg | 6 +++++ patch/patches/webkit_scroll_mac_688516.patch | 26 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 patch/patches/webkit_scroll_mac_688516.patch diff --git a/patch/patch.cfg b/patch/patch.cfg index 830bf76e5..227823b0c 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -330,4 +330,10 @@ patches = [ 'name': 'webkit_scroll_mac_644144', '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': '../', + }, ] diff --git a/patch/patches/webkit_scroll_mac_688516.patch b/patch/patches/webkit_scroll_mac_688516.patch new file mode 100644 index 000000000..ebda18e4f --- /dev/null +++ b/patch/patches/webkit_scroll_mac_688516.patch @@ -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);