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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 861553003: Invalidate CustomScrollbars on having window-inactive selector. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 years, 11 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/dom/StyleEngine.cpp ('k') | no next file » | 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 79c8bc6ed79e305da0bbcb7175273785db4eb902..405f3d09a4c0829d7b8ace6f4caa564d3f8b124b 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -340,15 +340,18 @@ void FrameView::recalculateCustomScrollbarStyle()
void FrameView::invalidateAllCustomScrollbarsOnActiveChanged()
{
+ bool usesWindowInactiveSelector = m_frame->document()->styleEngine()->usesWindowInactiveSelector();
+
const ChildrenWidgetSet* viewChildren = children();
for (const RefPtrWillBeMember<Widget>& child : *viewChildren) {
Widget* widget = child.get();
if (widget->isFrameView())
toFrameView(widget)->invalidateAllCustomScrollbarsOnActiveChanged();
- else if (widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar())
+ else if (usesWindowInactiveSelector && widget->isScrollbar() && toScrollbar(widget)->isCustomScrollbar())
toScrollbar(widget)->styleChanged();
}
- recalculateCustomScrollbarStyle();
+ if (usesWindowInactiveSelector)
+ recalculateCustomScrollbarStyle();
}
void FrameView::recalculateScrollbarOverlayStyle()
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698